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.
This commit is contained in:
@@ -76,7 +76,6 @@ extern "C"
|
||||
#include "SCA_IActuator.h"
|
||||
#include "RAS_MeshObject.h"
|
||||
#include "RAS_OpenGLRasterizer.h"
|
||||
#include "RAS_VAOpenGLRasterizer.h"
|
||||
#include "RAS_ListRasterizer.h"
|
||||
#include "RAS_GLExtensionManager.h"
|
||||
#include "KX_PythonInit.h"
|
||||
@@ -582,16 +581,12 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
|
||||
if (!m_rendertools)
|
||||
goto initFailed;
|
||||
|
||||
if (useLists) {
|
||||
if (GLEW_VERSION_1_1)
|
||||
m_rasterizer = new RAS_ListRasterizer(m_canvas, true);
|
||||
else
|
||||
m_rasterizer = new RAS_ListRasterizer(m_canvas);
|
||||
}
|
||||
else if (GLEW_VERSION_1_1)
|
||||
m_rasterizer = new RAS_VAOpenGLRasterizer(m_canvas);
|
||||
//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);
|
||||
else
|
||||
m_rasterizer = new RAS_OpenGLRasterizer(m_canvas);
|
||||
m_rasterizer = new RAS_OpenGLRasterizer(m_canvas, gm->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