Made it possible to switch between legacy renderer and new renderer in code

This commit is contained in:
andreja6
2019-11-05 13:14:24 -08:00
parent bb01d01950
commit 55f3ff8964
4 changed files with 16 additions and 14 deletions

View File

@@ -56,6 +56,7 @@ PartInstance* Application::makePart()
Application::Application(HWND parentWindow) { //: GApp(settings,window) {
std::string tempPath = ((std::string)getenv("temp")) + "/"+g_PlaceholderName;
CreateDirectory(tempPath.c_str(), NULL);
@@ -585,7 +586,13 @@ void Application::onGraphics(RenderDevice* rd) {
rd->beforePrimitive();
CoordinateFrame forDraw = rd->getObjectToWorldMatrix();
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
_dataModel->getWorkspace()->render(rd);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
rd->setObjectToWorldMatrix(forDraw);
rd->afterPrimitive();