Archived

This topic is now archived and is closed to further replies.

TheMummy

OpenGL OpenGL in Borland VCL-windows

Recommended Posts

Hi there, I am using Builder 3 now! So I tested to write an OpenGL app with it. I start with a TForm window, where the user can choose the resolution.. Then I set all elements of the window to invisible, switch to fullscreen, maximze the window and setup openGL into the window. Since the window doesn''t want to refresh, when I want it to, I created a Timer funcition that refreshs the window every ms. BUT this is incredibly slow, and it looks as if the window dosent support double buffering. What can I do? Get rid of vcl ? Has anyone used OpenGL in Builder

Share this post


Link to post
Share on other sites
Yes, I used BCB3 with OpenGL an while ago. I just did what you said, creating a fullscreen TForm and using that as the OpenGL target. However, I did set up double buffering through the PixelFormat descriptor. Using glSwapBuffers did the double buffering trick, just as you would expect. The rendering was done from the OnIdle function.

What exactly do you mean with ''The window doesn''t want to refresh''?

DaBit.

Share this post


Link to post
Share on other sites
Thanks for repling!
I found the bug, I activated PFD_DOULBEBUFFER and PFD_SUPPORT_GDI at the same. So doublebuffering was deactivated... It runs now fast and perfect.
I will check the OnIdle event. Thanks!

Share this post


Link to post
Share on other sites
Thanks for repling!
I found the bug, I activated PFD_DOULBEBUFFER and PFD_SUPPORT_GDI at the same. So doublebuffering was deactivated... It runs now fast and perfect.
I will check the OnIdle event. Thanks!

Share this post


Link to post
Share on other sites
Thanks for repling!
I found the bug, I activated PFD_DOULBEBUFFER and PFD_SUPPORT_GDI at the same. So doublebuffering was deactivated... It runs now fast and perfect.
I will check the OnIdle event, where does it happen ? Thanks!

Share this post


Link to post
Share on other sites
Sorry for posting the last reply 3 times. GDN was busy and laagy yesterday.
O haven''t found anything coresponding to a OnIdle function, where can I find such an event?

Share this post


Link to post
Share on other sites