Skip to content
Snippets Groups Projects
Commit 49f5a4a4 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fixme

parent 45f4b390
Branches
Tags
No related merge requests found
...@@ -73,11 +73,16 @@ class drawContextFltkStringTexture::queueString { ...@@ -73,11 +73,16 @@ class drawContextFltkStringTexture::queueString {
glLoadIdentity (); glLoadIdentity ();
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glPushMatrix(); glPushMatrix();
glLoadIdentity (); glLoadIdentity();
// FIXME: this is not correct with high-resolution graphics, as w(), h() are
// in FLTK coordinates, and glRasterPos uses true pixels.
// The size of the QUAD needs to be changed, too.
float winw = Fl_Window::current()->w(); float winw = Fl_Window::current()->w();
float winh = Fl_Window::current()->h(); float winh = Fl_Window::current()->h();
glScalef(2.0f / winw, 2.0f / winh, 1.0f); glScalef(2.0f / winw, 2.0f / winh, 1.0f);
glTranslatef(-winw / 2.0f, -winh / 2.0f, 0.0f); glTranslatef(-winw / 2.0f, -winh / 2.0f, 0.0f);
//write the texture on screen //write the texture on screen
glEnable(GL_TEXTURE_RECTANGLE_ARB); glEnable(GL_TEXTURE_RECTANGLE_ARB);
glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT); glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment