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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user