diff --git a/src/graphics/opengl/OpenGlPainter.cpp b/src/graphics/opengl/OpenGlPainter.cpp index 32f9926..df67c2a 100644 --- a/src/graphics/opengl/OpenGlPainter.cpp +++ b/src/graphics/opengl/OpenGlPainter.cpp @@ -18,15 +18,20 @@ void OpenGlPainter::paint(DrawingContext* context) auto surface = context->getSurface(); const auto width = double(surface->getWidth()); const auto height = double(surface->getHeight()); - - std::cout << "Painting into width " << width << " and height " << height << std::endl; - const auto num_mesh = context->getScene()->getNumMeshes(); glClearColor(1.0, 1.0, 1.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); - //glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); + glViewport(0, 0, width, height); + glOrtho(0, width, 0, height, -1.0, 1.0); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + //glMatrixMode(GL_MODELVIEW); + //glLoadIdentity(); + + std::cout << "Bounds are : " << width << " | " << height << std::endl; for (std::size_t idx=0; idx