summaryrefslogtreecommitdiff
path: root/src/interface/Engine.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-21 21:46:37 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-21 21:46:37 (GMT)
commit96506610b276be1b4bc1cbc462d991237750fc62 (patch)
treec05e6d55d2a0aa2ad178cfa30f00041a104d6fed /src/interface/Engine.cpp
parent75a9460c835f4ebea501a89d23e0c5f46da985cc (diff)
downloadpowder-96506610b276be1b4bc1cbc462d991237750fc62.zip
powder-96506610b276be1b4bc1cbc462d991237750fc62.tar.gz
Clean out graphics, add openGL graphics in seperate file, change brush to use unsigned char rather than boolean for bitmap/outline
Diffstat (limited to 'src/interface/Engine.cpp')
-rw-r--r--src/interface/Engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interface/Engine.cpp b/src/interface/Engine.cpp
index 751cbcb..aea89e7 100644
--- a/src/interface/Engine.cpp
+++ b/src/interface/Engine.cpp
@@ -74,7 +74,10 @@ void Engine::ShowWindow(Window * window)
prevBuffers.push(lastBuffer);
}
lastBuffer = (pixel*)malloc((width_ * height_) * PIXELSIZE);
+
+#ifndef OGLR
memcpy(lastBuffer, g->vid, (width_ * height_) * PIXELSIZE);
+#endif
windows.push(state_);
}
@@ -167,7 +170,9 @@ void Engine::Draw()
if(lastBuffer && !(state_->Position.X == 0 && state_->Position.Y == 0 && state_->Size.X == width_ && state_->Size.Y == height_))
{
g->Clear();
+#ifndef OGLR
memcpy(g->vid, lastBuffer, (width_ * height_) * PIXELSIZE);
+#endif
}
else
{