[Bf-codereview] BGE resize callback (issue4639043)

dfelinto at gmail.com dfelinto at gmail.com
Fri Jun 17 19:24:41 CEST 2011


Hi Mitchell,

I never implemented callbacks, but it seems like you did the right way
(assuming GHOST resize event is really not reliable).

I added some code syntax comments along the patch.
(adding bf-codereview as CC)


https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
File source/gameengine/Ketsji/KX_KetsjiEngine.cpp (right):

https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_KetsjiEngine.cpp#newcode111
source/gameengine/Ketsji/KX_KetsjiEngine.cpp:111: * ResizeCallback
functions
use a tab between instead of space here (doxygen style along the rest of
the file)

https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_KetsjiEngine.cpp#newcode209
source/gameengine/Ketsji/KX_KetsjiEngine.cpp:209: m_prevWidth(0),
I would not include "prev" in the variable name (i.e. call it m_width
and m_height or m_viewWidth, m_windowsWidth, m_canvasWidth. ...)

https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_KetsjiEngine.cpp#newcode239
source/gameengine/Ketsji/KX_KetsjiEngine.cpp:239:
don't you also need to clear m_pyfunc?

https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_Scene.cpp
File source/gameengine/Ketsji/KX_Scene.cpp (right):

https://codereview.appspot.com/4639043/diff/1/source/gameengine/Ketsji/KX_Scene.cpp#newcode129
source/gameengine/Ketsji/KX_Scene.cpp:129: // This callback is used to
update the 2D filter manager
I don't think we need this comment here.

https://codereview.appspot.com/4639043/


More information about the Bf-codereview mailing list