From 8f72e8e666acf1e9f2839fe902f8393137758393 Mon Sep 17 00:00:00 2001 From: andreja6 Date: Sat, 2 Jun 2018 12:06:19 -0700 Subject: [PATCH] Removed inner border on 9x machines --- PhysicalInstance.cpp | 2 +- main.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PhysicalInstance.cpp b/PhysicalInstance.cpp index 721d37e..ff0ae8c 100644 --- a/PhysicalInstance.cpp +++ b/PhysicalInstance.cpp @@ -117,7 +117,7 @@ Box PhysicalInstance::getBox() void PhysicalInstance::render(RenderDevice* rd) { if(changed) - Box box = getBox(); + Box box = getBox(); glColor(color); glBegin(GL_QUADS); for(int i = 0; i < 96; i+=16) diff --git a/main.cpp b/main.cpp index 6345987..e5cef7b 100644 --- a/main.cpp +++ b/main.cpp @@ -703,7 +703,7 @@ void Demo::onInit() { - //setDesiredFrameRate(FPSVal[index]); + //setDesiredFrameRate(60); @@ -1049,7 +1049,10 @@ void Demo::onGraphics(RenderDevice* rd) { renderDevice->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor)); renderDevice->setAmbientLightColor(lighting.ambient); + rd->beforePrimitive(); dataModel->getWorkspace()->render(rd); + rd->afterPrimitive(); + if(selectedInstance != NULL) { PhysicalInstance* part = (PhysicalInstance*)selectedInstance; @@ -1400,7 +1403,7 @@ void Demo::main() { RealTime now=0, lastTime=0; double simTimeRate = 1.0f; - float fps=30.f; + float fps=30.0f; RealTime desiredFrameDuration=1.0/fps; onInit(); @@ -1500,7 +1503,7 @@ int main(int argc, char** argv) { HWND hwndMain = CreateWindowEx( - WS_EX_ACCEPTFILES | WS_EX_CLIENTEDGE, + WS_EX_ACCEPTFILES, "mainHWND", "Main test", WS_OVERLAPPEDWINDOW,