0
我正在爲移動設備編寫遊戲引擎,並且我試圖支持多種分辨率。遊戲世界可能比屏幕大得多,所以我使用剪輯器在世界上創建一個視口。DirectDraw:如果表面大於後緩衝區,剪切將失敗
我的設備的分辨率爲240x320。當我將視口設置爲240x320並將我的世界設置爲240x320時,一切正常。我可以毫無問題地在屏幕外滑動世界。然而,當我視是220x320,我的世界是240×320,位圖傳輸失敗,DDERR_INVALIDPARAMS
當畫面外表面移動左側:
(09:02:06) - INFO - ERROR! DirectDraw: One or more of the passed parameters are incorrect. (DDERR_INVALIDPARAMS)
(09:02:06) - INFO - ERROR! Couldn't copy to screen. (RECT: -1, 0, 239, 320) (line 125 in file .\src\SurfaceDirectDraw.cpp)
(09:02:06) - INFO - Dimensions: (0, 0, 240, 320)
(09:02:06) - INFO - ERROR! DirectDraw: One or more of the passed parameters are incorrect. (DDERR_INVALIDPARAMS)
(09:02:06) - INFO - ERROR! Couldn't copy to screen. (RECT: -2, 0, 238, 320) (line 125 in file .\src\SurfaceDirectDraw.cpp)
(09:02:06) - INFO - Dimensions: (0, 0, 240, 320)
(09:02:06) - INFO - ERROR! DirectDraw: One or more of the passed parameters are incorrect. (DDERR_INVALIDPARAMS)
(09:02:06) - INFO - ERROR! Couldn't copy to screen. (RECT: -3, 0, 237, 320) (line 125 in file .\src\SurfaceDirectDraw.cpp)
(09:02:06) - INFO - Dimensions: (0, 0, 240, 320)
移動表面的屏幕外右側做工精細,表面正確剪輯。
當表面大於後緩衝器時,如何在我的後緩衝器上剪切表面?
在此先感謝
由於表面位於後緩衝器的左側,因此數字呈負值。 – knight666 2010-07-02 07:29:33