frog04
11-22-2008, 09:38 AM
I have to visualize a "chess-board" but with more than 160.000 sqaures each colored according to some measurment-values.
I'm usging wxWidgets with a wxGLCanvas-object.
Now i set up a glOrtho (only 2D is needed) and paint the squares.
I'm using multiple windows so more "measurement-objects" could be viewn.
Now i had the problem with scroll, size, overlapping,..., everything that calls a PaintEvent. There are too many float-values to render it every-time.
So i tried following trick:
OnPaint(..)
{
if(first)
{
glDrawBuffer(GL_FRONT);
Render();
glDrawBuffer(GL_BACK);
Render();
first = false;
}
SwapBuffers();
}
But this code makes errors on some systems, picture is getting blurred and black, a total mass.
Now i'm seraching for some kind of buffer-object or anything like this!?
instead of rendering it everytime (it's not animated + not texture!).
Any suggestions?
I'm usging wxWidgets with a wxGLCanvas-object.
Now i set up a glOrtho (only 2D is needed) and paint the squares.
I'm using multiple windows so more "measurement-objects" could be viewn.
Now i had the problem with scroll, size, overlapping,..., everything that calls a PaintEvent. There are too many float-values to render it every-time.
So i tried following trick:
OnPaint(..)
{
if(first)
{
glDrawBuffer(GL_FRONT);
Render();
glDrawBuffer(GL_BACK);
Render();
first = false;
}
SwapBuffers();
}
But this code makes errors on some systems, picture is getting blurred and black, a total mass.
Now i'm seraching for some kind of buffer-object or anything like this!?
instead of rendering it everytime (it's not animated + not texture!).
Any suggestions?