Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2015-12-07 02:24:55 +0300
committerMitchell Stokes <mogurijin@gmail.com>2015-12-08 06:05:09 +0300
commitfe2f3a131d96e4b0d1c85e1379b30c73f6378ffd (patch)
tree90b2b683fe86eb62c880995986573993807aa0cb /source/gameengine/BlenderRoutines
parent9d03307033338dc6ce57a2258e4dd01d09f1dcb3 (diff)
OpenGL/BGE: Remove RAS_StorageIM (glBegin/glEnd rendering of mesh data)
The only use we had for RAS_StorageIM was to render derived meshes using Blender's mesh drawing. This is now handled as a special case in RAS_OpenGLRasterizer instead of in RAS_StorageIM. We are now left with RAS_StorageVA and RAS_StorageVBO. At the moment vertex arrays are still the default since our vertex array with display lists implementation is still much faster than our VBO code in a lot of cases. As we improve our VBO code, we can drop vertex arrays since Blender's minimum OpenGL version is being bumped up to 2.1, which supports VBOs.
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 976590cadaf..0d04ab61919 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -302,12 +302,20 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
canvas->SetSwapInterval((startscene->gm.vsync == VSYNC_ON) ? 1 : 0);
RAS_IRasterizer* rasterizer = NULL;
+ RAS_STORAGE_TYPE raster_storage = RAS_AUTO_STORAGE;
+
+ if (startscene->gm.raster_storage == RAS_STORE_VBO) {
+ raster_storage = RAS_VBO;
+ }
+ else if (startscene->gm.raster_storage == RAS_STORE_VA) {
+ raster_storage = RAS_VA;
+ }
//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);
+ if (displaylists && raster_storage != RAS_VBO)
+ rasterizer = new RAS_ListRasterizer(canvas, true, raster_storage);
else
- rasterizer = new RAS_OpenGLRasterizer(canvas, startscene->gm.raster_storage);
+ rasterizer = new RAS_OpenGLRasterizer(canvas, raster_storage);
RAS_IRasterizer::MipmapOption mipmapval = rasterizer->GetMipmapping();