diff options
Diffstat (limited to 'src/graphics')
| -rw-r--r-- | src/graphics/Renderer.cpp | 8 | ||||
| -rw-r--r-- | src/graphics/Renderer.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 23ebcf0..86c0c58 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -161,6 +161,11 @@ void Renderer::RenderEnd() #endif } +void Renderer::SetSample(int x, int y) +{ + sampleColor = GetPixel(x, y); +} + void Renderer::clearScreen(float alpha) { #ifdef OGLR @@ -2379,7 +2384,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim): colour_mode(0), gridSize(0), blackDecorations(false), - debugLines(false) + debugLines(false), + sampleColor(0xFFFFFFFF) { this->g = g; this->sim = sim; diff --git a/src/graphics/Renderer.h b/src/graphics/Renderer.h index 2b6cc14..a1ed159 100644 --- a/src/graphics/Renderer.h +++ b/src/graphics/Renderer.h @@ -63,6 +63,7 @@ public: Simulation * sim; Graphics * g; gcache_item *graphicscache; + pixel sampleColor; //Mouse position for debug information int mousePosX, mousePosY; @@ -94,8 +95,7 @@ public: void ClearAccumulation(); void clearScreen(float alpha); - - //class SolidsRenderer; + void SetSample(int x, int y); #ifdef OGLR void checkShader(GLuint shader, char * shname); |
