[Bf-codereview] 2.5x blenderplayer (BGE) anti-aliasing & embedding (issue4431072)

dfelinto at gmail.com dfelinto at gmail.com
Thu Apr 28 19:15:20 CEST 2011


some comments on top of the original patch. This patch is actually the
original work from Sebastian Korczak with small cleans from me.

The patch works fine. BGE can now be embed in a .Net context :)

Things pending to be implemented as later commits:
1) expose the multisample options to the UI (in the blenderplayer
panel).
2) focus/unfocus context + keyboard (to be ported from Burster patch).
3) resize of window (not working for windows at least).


http://codereview.appspot.com/4431072/diff/1/intern/ghost/intern/GHOST_WindowWin32.cpp
File intern/ghost/intern/GHOST_WindowWin32.cpp (right):

http://codereview.appspot.com/4431072/diff/1/intern/ghost/intern/GHOST_WindowWin32.cpp#newcode228
intern/ghost/intern/GHOST_WindowWin32.cpp:228: int wintype =
WS_OVERLAPPEDWINDOW;
maybe to move variable declaration to top? C++ doesn't mind it, but I
know it's a good C practice.

http://codereview.appspot.com/4431072/diff/1/intern/ghost/intern/GHOST_WindowWin32.cpp#newcode548
intern/ghost/intern/GHOST_WindowWin32.cpp:548:
We need to find a way to combine parented windows + resizing.

If we simply set the state as GHOST_kWindowStateEmbedded we will need to
check for them somewhere else. it's also strange that in Windows is the
only platform we need to make this separation.

Should it pass for the time being?

http://codereview.appspot.com/4431072/diff/1/intern/ghost/intern/GHOST_WindowWin32.cpp#newcode717
intern/ghost/intern/GHOST_WindowWin32.cpp:717: #ifdef BF_GHOST_DEBUG
GHOST_PRINTF is not working (and commented out on its declaration file).
This would be a place to use it. #ifdef BF_GHOST_DEBUG works too but :/

http://codereview.appspot.com/4431072/diff/1/intern/ghost/intern/GHOST_WindowWin32.cpp#newcode734
intern/ghost/intern/GHOST_WindowWin32.cpp:734: printf("no available
pixel format\n");
here GHOST_PRINT() can be used.

http://codereview.appspot.com/4431072/diff/1/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
File source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (right):

http://codereview.appspot.com/4431072/diff/1/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp#newcode239
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp:239: printf("  -i:
parent windows ID \n\n");
on windows the "parent windows ID" is called hwnd.
Should we bother adding a
#ifdef WIN:
printf("  -i: parent windows ID (/hwnd) \n\n");
#else....

http://codereview.appspot.com/4431072/


More information about the Bf-codereview mailing list