diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-12-19 00:56:25 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-12-19 00:56:25 +0400 |
commit | ef0473994b6b21aa49bbfab26a483d90d0fef004 (patch) | |
tree | 18d9dd7d2fbe6eddaf58f66b6b301c694cb43a50 /source/gameengine/BlenderRoutines | |
parent | 6b2af22d37dc1a039104f2ca0b3b4b56aca7d41c (diff) |
BGE: Some as of yet unmerged work I did in the Swiss branch. These changes include:
* Cleaning up the conversion code to avoid a per-face material conversion. Materials are now stored in buckets and only converted if a new material is found. This replaces some of Campbell's earlier work on the subject. His work wasn't as thorough, but it was much safer for a release.
* Shaders are only compiled for LibLoaded materials once. Before they could be compiled twice, which could really slow things down.
* Refactoring the rasterizer code to use a strategy design pattern to handle different geometry rendering methods such as immediate mode, vertex arrays and vertex buffer objects. VBOs are added, but they will be disabled in a following commit since they are still slower than vertex arrays with display lists. However, VBOs are still useful for mobile, so it's good to keep them around.
* Better multi-uv support. The BGE should now be able to handle more than two UV layers, which should help it better match the viewport.
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r-- | source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 6807f531f0a..9f788b29ac6 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -58,7 +58,6 @@ #include "RAS_GLExtensionManager.h" #include "RAS_OpenGLRasterizer.h" -#include "RAS_VAOpenGLRasterizer.h" #include "RAS_ListRasterizer.h" #include "NG_LoopBackNetworkDeviceInterface.h" @@ -287,16 +286,12 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c RAS_IRenderTools* rendertools = new KX_BlenderRenderTools(); RAS_IRasterizer* rasterizer = NULL; - if (displaylists) { - if (GLEW_VERSION_1_1 && !novertexarrays) - rasterizer = new RAS_ListRasterizer(canvas, true, true); - else - rasterizer = new RAS_ListRasterizer(canvas); - } - else if (GLEW_VERSION_1_1 && !novertexarrays) - rasterizer = new RAS_VAOpenGLRasterizer(canvas, false); + //Don't use displaylists with VBOs + //If auto starts using VBOs, make sure to check for that here + if (displaylists && startscene->gm.raster_storage != RAS_STORE_VBO) + rasterizer = new RAS_ListRasterizer(canvas, true, startscene->gm.raster_storage); else - rasterizer = new RAS_OpenGLRasterizer(canvas); + rasterizer = new RAS_OpenGLRasterizer(canvas, startscene->gm.raster_storage); // create the inputdevices KX_BlenderKeyboardDevice* keyboarddevice = new KX_BlenderKeyboardDevice(); |