Blender Git Loki
Git Commits -> Revision 39cecc6
Revision 39cecc6 by Brecht Van Lommel (apricot) June 16, 2008, 16:58 (GMT) |
Apricot Branch ============== Refactoring of the use of opengl extensions and other drawing code in the game engine, and cleaning up some hacks related to GLSL integration. These changes will be merged into trunk too after this. The game engine graphics demos & apricot level survived my tests, but this could use some good testing of course. For uses: please test with the options "Generate Display Lists" and "Vertex Arrays" enabled, these should be the fastest and are supposed to be "unreliable", but if that's the case that's probably due to bugs that can be fixed. * The game engine now also uses GLEW for extensions, replacing the custom opengl extensions code that was there. This means also that all extensions will now always be compiled in, regardless of the glext.h on the platform where compilation happens. Removes a lot of #ifdef's, but the runtime checks stay of course. * Removed the WITHOUT_GLEXT environment variable. This was added to work around a specific bug and only disabled multitexturing anyway. It might also have caused a slowdown since it was retrieving the environment variable for every vertex in immediate mode (bug #13680). * Refactored the code to allow drawing skinned meshes with vertex arrays too, removing some specific immediate mode drawing functions for this that only did extra normal calculation. Now it always splits vertices of flat faces instead. * Refactored normal recalculation with some minor optimizations, required for the above change. * Removed some outdated code behind the __NLA_OLDDEFORM #ifdef. * Fixed various bugs in setting of multitexture coordinates and vertex attributes for vertex arrays. These were not being enabled/disabled correct according to the opengl spec, leading to crashes. Also tangent attributes used an immediate mode call for vertex arrays, which can't work. * Fixed use of uninitialized variable in RAS_TexVert. * Also in the GLSL shaders, removed conditional returns since some graphics cards don't support this. And fix a bug with orco's not being created in textured mode. |
Commit Details:
Full Hash: 39cecc6044b031366bb9da49d4133641af88c9fb
SVN Revision: 15244
Parent Commit: 9725cb1
Lines Changed: +1648, -4609
4 Deleted Paths:
/source/gameengine/BlenderRoutines/mac_compat_glext.h (+0, -132)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h (+0, -150)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/EXT_separate_specular_color.h (+0, -12)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/mkglext.py (+0, -627)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h (+0, -150)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/EXT_separate_specular_color.h (+0, -12)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/mkglext.py (+0, -627)
56 Modified Paths:
/source/blender/blenkernel/intern/DerivedMesh.c (+5, -0) (Diff)
/source/blender/gpu/intern/gpu_material.c (+1, -1) (Diff)
/source/blender/gpu/intern/material_shaders.glsl (+102, -80) (Diff)
/source/blender/gpu/intern/material_shaders.glsl.c (+582, -577) (Diff)
/source/blender/include/BIF_gl.h (+1, -16) (Diff)
/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp (+15, -29) (Diff)
/source/gameengine/BlenderRoutines/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h (+2, -6) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp (+10, -39) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp (+2, -11) (Diff)
/source/gameengine/BlenderRoutines/Makefile (+1, -0) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+3, -0) (Diff)
/source/gameengine/Converter/BL_MeshDeformer.cpp (+108, -52) (Diff)
/source/gameengine/Converter/BL_MeshDeformer.h (+3, -4) (Diff)
/source/gameengine/Converter/BL_SkinDeformer.cpp (+5, -38) (Diff)
/source/gameengine/Converter/BL_SkinMeshObject.cpp (+0, -8) (Diff)
/source/gameengine/Converter/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Converter/Makefile (+1, -0) (Diff)
/source/gameengine/GamePlayer/common/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/GamePlayer/common/GPC_Canvas.h (+6, -12) (Diff)
/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp (+1, -18) (Diff)
/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp (+3, -7) (Diff)
/source/gameengine/GamePlayer/common/GPC_RenderTools.h (+4, -11) (Diff)
/source/gameengine/GamePlayer/common/Makefile (+2, -0) (Diff)
/source/gameengine/GamePlayer/common/SConscript (+2, -1) (Diff)
/source/gameengine/GamePlayer/ghost/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.cpp (+6, -34) (Diff)
/source/gameengine/GamePlayer/ghost/Makefile (+2, -0) (Diff)
/source/gameengine/GamePlayer/ghost/SConscript (+2, -1) (Diff)
/source/gameengine/Ketsji/BL_BlenderShader.cpp (+27, -19) (Diff)
/source/gameengine/Ketsji/BL_BlenderShader.h (+1, -1) (Diff)
/source/gameengine/Ketsji/BL_Shader.cpp (+119, -187) (Diff)
/source/gameengine/Ketsji/BL_Texture.cpp (+49, -112) (Diff)
/source/gameengine/Ketsji/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Ketsji/KX_BlenderMaterial.cpp (+52, -82) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+20, -48) (Diff)
/source/gameengine/Ketsji/Makefile (+1, -0) (Diff)
/source/gameengine/Ketsji/SConscript (+1, -1) (Diff)
/source/gameengine/Rasterizer/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Rasterizer/Makefile (+1, -0) (Diff)
/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp (+26, -37) (Diff)
/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp (+0, -13) (Diff)
/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h (+0, -4) (Diff)
/source/gameengine/Rasterizer/RAS_IRasterizer.h (+6, -24) (Diff)
/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp (+3, -31) (Diff)
/source/gameengine/Rasterizer/RAS_MeshObject.cpp (+13, -11) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile (+2, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp (+27, -651) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h (+4, -504) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp (+7, -12) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+236, -825) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h (+11, -27) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp (+154, -150) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h (+6, -1) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript (+3, -3) (Diff)
/source/blender/gpu/intern/gpu_material.c (+1, -1) (Diff)
/source/blender/gpu/intern/material_shaders.glsl (+102, -80) (Diff)
/source/blender/gpu/intern/material_shaders.glsl.c (+582, -577) (Diff)
/source/blender/include/BIF_gl.h (+1, -16) (Diff)
/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp (+15, -29) (Diff)
/source/gameengine/BlenderRoutines/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h (+2, -6) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp (+10, -39) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp (+2, -11) (Diff)
/source/gameengine/BlenderRoutines/Makefile (+1, -0) (Diff)
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+3, -0) (Diff)
/source/gameengine/Converter/BL_MeshDeformer.cpp (+108, -52) (Diff)
/source/gameengine/Converter/BL_MeshDeformer.h (+3, -4) (Diff)
/source/gameengine/Converter/BL_SkinDeformer.cpp (+5, -38) (Diff)
/source/gameengine/Converter/BL_SkinMeshObject.cpp (+0, -8) (Diff)
/source/gameengine/Converter/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Converter/Makefile (+1, -0) (Diff)
/source/gameengine/GamePlayer/common/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/GamePlayer/common/GPC_Canvas.h (+6, -12) (Diff)
/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp (+1, -18) (Diff)
/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp (+3, -7) (Diff)
/source/gameengine/GamePlayer/common/GPC_RenderTools.h (+4, -11) (Diff)
/source/gameengine/GamePlayer/common/Makefile (+2, -0) (Diff)
/source/gameengine/GamePlayer/common/SConscript (+2, -1) (Diff)
/source/gameengine/GamePlayer/ghost/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_Application.cpp (+6, -34) (Diff)
/source/gameengine/GamePlayer/ghost/Makefile (+2, -0) (Diff)
/source/gameengine/GamePlayer/ghost/SConscript (+2, -1) (Diff)
/source/gameengine/Ketsji/BL_BlenderShader.cpp (+27, -19) (Diff)
/source/gameengine/Ketsji/BL_BlenderShader.h (+1, -1) (Diff)
/source/gameengine/Ketsji/BL_Shader.cpp (+119, -187) (Diff)
/source/gameengine/Ketsji/BL_Texture.cpp (+49, -112) (Diff)
/source/gameengine/Ketsji/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Ketsji/KX_BlenderMaterial.cpp (+52, -82) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+20, -48) (Diff)
/source/gameengine/Ketsji/Makefile (+1, -0) (Diff)
/source/gameengine/Ketsji/SConscript (+1, -1) (Diff)
/source/gameengine/Rasterizer/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Rasterizer/Makefile (+1, -0) (Diff)
/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp (+26, -37) (Diff)
/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp (+0, -13) (Diff)
/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h (+0, -4) (Diff)
/source/gameengine/Rasterizer/RAS_IRasterizer.h (+6, -24) (Diff)
/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp (+3, -31) (Diff)
/source/gameengine/Rasterizer/RAS_MeshObject.cpp (+13, -11) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile (+2, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp (+27, -651) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h (+4, -504) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp (+7, -12) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+236, -825) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h (+11, -27) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp (+154, -150) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h (+6, -1) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript (+3, -3) (Diff)