Show drawing partically...

Hi,

I want draw the view partically: draw the first line and the user will see it, draw second line and the user will see both… and so on…

I use Tao in windows.

How can I do this?

Thank’s
Alexei

Draw the first line
Wait some time
Draw the second line
Wait some time
Draw the third line
Wait some time
etc …

But I don’t really thing that is really your question :slight_smile:

Hi,

I mean:
first line - show it
second line - show both
third line - show 3 lines

last line - show all lines

I have tryed to use glFlush but it doesn’t help me. I get the black screen an after it i get the all lines.

I am using Tao.

So how can I solve my problem?

Thank’s
Alexei

you have to use “swap buffers”; don’t know the tao equivalent…

Hi,

The swap buffers helps me.

Thank’s
Alexei

Or, just don’t do double buffering? (i.e. remove GLX_DOUBLEBUFFER and/or GLUT_DOUBLE).

Originally posted by Hampel:
you have to use “swap buffers”; don’t know the tao equivalent…
I am affraid it will work only if the “swap buffers” copies the contents of the back buffer to the front buffer. Otherwise, if the buffers are actually swapped, the resulting image ends up splattered between two buffers.
Use single buffering as in the previous post or call at startup the following code.

glDrawBuffer (GL_FRONT);

I am not sure but I believe these can disable hardware acceleration in your application.

Two things I think might be worth pointing out:

If using GL_FRONT with double buffering, followed by a swap, display will likely not be what OP wants. :slight_smile: In the double buffering scenario it’d have to be GL_FRONT_AND_BACK. This will obviously be a slowdown, but inspecting the result OP wants this might actually be a good thing.

Revealing contents line-by-line (and vsynch’ing) could potentially take a LOT of time. Imagine running at 60Hz on 1280x1024. 1024/60 = over 17 seconds.

Now for my humble suggestion:
If I understood OP’s question, the way I would do this would be to have the intended display result put in a texture (or perhaps not even that, if the scene is simple enough), then draw one full-screen quad with this texture, followed by a solid black or-whatever quad on top that “reveals” the image that’s eventually to be displayed.