diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2015-12-07 02:24:55 +0300 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2015-12-08 06:05:09 +0300 |
commit | fe2f3a131d96e4b0d1c85e1379b30c73f6378ffd (patch) | |
tree | 90b2b683fe86eb62c880995986573993807aa0cb /source/gameengine/GamePlayer | |
parent | 9d03307033338dc6ce57a2258e4dd01d09f1dcb3 (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/GamePlayer')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 2b357f43031..2940e6d07ee 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -607,12 +607,20 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) if (gm->flag & GAME_SHOW_MOUSE) m_canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL); + RAS_STORAGE_TYPE raster_storage = RAS_AUTO_STORAGE; + + if (gm->raster_storage == RAS_STORE_VBO) { + raster_storage = RAS_VBO; + } + else if (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 (useLists && gm->raster_storage != RAS_STORE_VBO) - m_rasterizer = new RAS_ListRasterizer(m_canvas, false, gm->raster_storage); + if (useLists && raster_storage != RAS_VBO) + m_rasterizer = new RAS_ListRasterizer(m_canvas, true, raster_storage); else - m_rasterizer = new RAS_OpenGLRasterizer(m_canvas, gm->raster_storage); + m_rasterizer = new RAS_OpenGLRasterizer(m_canvas, raster_storage); /* Stereo parameters - Eye Separation from the UI - stereomode from the command-line/UI */ m_rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) stereoMode); |