OpenGL and Borland C++ Builder forms
Hey guys,
Is it possible to split up a Borland C++Builder 6 (personal) form? I.E.,
+--------+
| OpenGL |
| GFX |
+--------+
| UI |
+--------+
If possible, could someone point me to a tutorial or give me an explanation on how to do it? Thank you!
-StaticEdge
-StaticEdgeThe Immersion Project
Of course it is. When creating the OpenGL context, pass the window handle of the control you want to use for the OpenGL rendering window instead of the handle for the form. I did this by making my own custom OpenGL control that I just drop on the form, but there is nothing to stop you from using a TPanel or something similar.
Steve ''Sly'' Williams Monkey Wrangler Krome Studios
turbo game development with Borland compilers
Steve ''Sly'' Williams Monkey Wrangler Krome Studios
turbo game development with Borland compilers
EDIT :: D'oh - Sly got there first. [grr - it's happened twice today!]
AFAIK OpenGL only needs a Device Context to render to, so you could just put a TPanel or something on the form, and render to that. Or you could make the viewport part of the form, instead of the whole thing. I know it's possible - I've done it, but I did it in Delphi (which AFAIK has almost the same VCL, so it should be pretty easy).
Hope that helps,
John B
[edited by - JohnBSmall on April 10, 2002 7:01:56 PM]
AFAIK OpenGL only needs a Device Context to render to, so you could just put a TPanel or something on the form, and render to that. Or you could make the viewport part of the form, instead of the whole thing. I know it's possible - I've done it, but I did it in Delphi (which AFAIK has almost the same VCL, so it should be pretty easy).
Hope that helps,
John B
[edited by - JohnBSmall on April 10, 2002 7:01:56 PM]
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
Thank you guys for the quick and timely response! I will look into it. I am relatively new to Builder and OpenGL so I have a task ahead of me =) I really want to write my own 2d game. That is what I am *trying* to do right now... heh... Having a tough time with Ortho-OpenGL (not much info on it...). Anyway, thank you again.
-StaticEdge
-StaticEdge
-StaticEdgeThe Immersion Project
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement