OpenGL and CBuilder - annoying problem

Hi,

I have a certain problem - I would like to do my own 3d objects design program; an editing window is larger than monitor’s resolution, so window has a scrollbar. The problem is, when I scroll window - it is being refresh, but not full visible widnow area. Is like that, because window is refreshed first, and scrolled as second, so scrolled area isn’t rendered. Does somebody now how to get rid of that problem???

Well I think you will have problems if you try to scroll the OpenGL rendering that way.

Instead, try to override the default canvas behaviour, and send the ‘scroll up’ & ‘scroll down’ commands directly to OpenGL with glTranslate. Do not translate the canvas itself, just what it ‘sees’.

I may be wrong, but I have never seen any CAD program doing it your way. They often use ‘mouse middle button drag’ to pan the view for example.

In C++ Builder 5 TPanel has some problems
with repainting when size is changed.In 6 version it should be ok.
In 5 version use only TForm if you need
to change the size in runtime.

Originally posted by zbuffer_:
[b]Well I think you will have problems if you try to scroll the OpenGL rendering that way.

Instead, try to override the default canvas behaviour, and send the ‘scroll up’ & ‘scroll down’ commands directly to OpenGL with glTranslate. Do not translate the canvas itself, just what it ‘sees’.

I may be wrong, but I have never seen any CAD program doing it your way. They often use ‘mouse middle button drag’ to pan the view for example.[/b]

Oh yea, I haven’t thought about using glTranslate. I’ll try it. Thanks for the tip!

Originally posted by hexa:
In C++ Builder 5 TPanel has some problems
with repainting when size is changed.In 6 version it should be ok.
In 5 version use only TForm if you need
to change the size in runtime.

I actually use BCB 6, and that problem with TPanel is still actual But I will try another way - the ZBuffer suggestion. Thanks!

[This message has been edited by raybones (edited 12-30-2003).]