Redraw only some objects

  • Follow


Hi,


I am quite new to OpenGl and I have got a performance issue which I do 
not know how to handle.

My application receives periodically from the network the position of 
moving objects.
These information arrives without specific order and there is one 
message per object.
I want my application to redraw the scene immediately after each 
individual update.
When drawing the objects as a simple polygon, there is no problem but 
when using complex 3D objects (3000 points each), my application hangs up.

Right now my paint function calls the draw method of all of my objects 
which are LightWave objects (maybe this is a bad choice for my test 
application).
If there is 30 objects and if the period is a few seconds, let's say 4. 
I have got 30 * 30 objects redrawn during these 4 seconds. My computer 
can not handle this load, there are too many calculations.

Maybe there is a way to redraw only the updated object but I do not know 
how. I am not sure or I can not understand how to use clipping  or if 
glCopyPixel, glReadPixel, glDrawPixel or glAccum may be of any use ?
As I am using double-buffering, how can I redraw just part of a scene ?

Thanks,

Jose
0
Reply juanito 2/6/2005 9:30:52 AM

juanito wrote:
>
 > [redraw just part of the screen]
> 
> Maybe there is a way to redraw only the updated object but I do not know 
> how. I am not sure or I can not understand how to use clipping  or if 
> glCopyPixel, glReadPixel, glDrawPixel or glAccum may be of any use ?
> As I am using double-buffering, how can I redraw just part of a scene ?

I'm quite new to OpenGL and cg. But isn't it possible using the stencil 
buffer to pick out a certain screen area to work with. In your case to 
change/move/do sth else/.. with the object?

Greetings,
  Manuel
0
Reply Manuel 2/6/2005 5:32:21 PM


juanito wrote:
> 
> As I am using double-buffering, how can I redraw just part of a scene ?
> 

You can't. That line of thinking is unproductive
in OpenGL.


As for the rest, I suspect you have a bug in
your program somewhere. There's no reason why
it should "lock up".



-- 
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.
0
Reply fungus 2/6/2005 5:56:10 PM

juanito wrote:

> If there is 30 objects and if the period is a few seconds,
> let's say 4. I have got 30 * 30 objects redrawn during these 4
> seconds. My computer can not handle this load, there are too
> many calculations.

30 Objects with 3000 vertices? That's not a lot data to render
with modern GPUs. Just put every object into a Display List. Use
triangle stips for optimal performance.

-- 
Wolfgang Draxinger

0
Reply Wolfgang 2/6/2005 9:51:55 PM

3 Replies
308 Views

(page loaded in 0.074 seconds)

Similiar Articles:













7/22/2012 6:02:52 AM


Reply: