Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / CBuilder & OpenGL Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
OGLfan

May 31, 1999, 04:00 PM

Hi, I've been trying for sometime to put my little first OpenGL program
to work under Borland CBuilder3. It compiles perfectly but when I run it
I can see a big blank panel (exactly what I want) but nothing is drawn
to it.

Can someone, please, give me an idea how can I start to program OpenGL
with the Borland CBuilder3? I have seen some example programs but they
do a little bit more things than I need so I cannot understand from them
what's my mistake!

Thank you!

 
Conor Stokes

June 01, 1999, 07:36 AM



OGLfan wrote:
>>Hi, I've been trying for sometime to put my little first OpenGL program
>>to work under Borland CBuilder3. It compiles perfectly but when I run it
>>I can see a big blank panel (exactly what I want) but nothing is drawn
>>to it.
>>
>>Can someone, please, give me an idea how can I start to program OpenGL
>>with the Borland CBuilder3? I have seen some example programs but they
>>do a little bit more things than I need so I cannot understand from them
>>what's my mistake!
>>
>>Thank you!

Well the first thing you gotta do is make sure the form you have made is actually got the
right settings, eg make sure it is pop up and stuff. Personally, I don't use forms with
CBuilder3 for OGL, mainly because it is more trouble than simply creating a window, and making
a rendering context for it. And also, I have noticed that loading OGL dynamically seems to
also be more reliable than including a implib dll. So, I use that. Also, I don't think you can
use the forms correctly to get fullscreen ogl with mode changes
(you end up with a windows bar).

Conor Stokes (aKa DirtyPunk)

 
OGLfan

June 01, 1999, 06:06 PM


>>Well the first thing you gotta do is make sure the form you have made is actually got the
>>right settings, eg make sure it is pop up and stuff. Personally, I don't use forms with
>>CBuilder3 for OGL, mainly because it is more trouble than simply creating a window, and making
>>a rendering context for it. And also, I have noticed that loading OGL dynamically seems to
>>also be more reliable than including a implib dll. So, I use that. Also, I don't think you can
>>use the forms correctly to get fullscreen ogl with mode changes
>>(you end up with a windows bar).


How do you compile the programs without the IDE? I'm quite new to the CBuilder3 too. My first
attempt was to compile OGL programs like yours but I get lots of link errors. Probably I'm missing
something about how the compiler works. Are there any special settings?

 
Conor Stokes

June 02, 1999, 04:57 AM



OGLfan wrote:
>>
>>>>Well the first thing you gotta do is make sure the form you have made is actually got the
>>>>right settings, eg make sure it is pop up and stuff. Personally, I don't use forms with
>>>>CBuilder3 for OGL, mainly because it is more trouble than simply creating a window, and making
>>>>a rendering context for it. And also, I have noticed that loading OGL dynamically seems to
>>>>also be more reliable than including a implib dll. So, I use that. Also, I don't think you can
>>>>use the forms correctly to get fullscreen ogl with mode changes
>>>>(you end up with a windows bar).
>>
>>
>>How do you compile the programs without the IDE? I'm quite new to the CBuilder3 too. My first
>>attempt was to compile OGL programs like yours but I get lots of link errors. Probably I'm missing
>>something about how the compiler works. Are there any special settings?

Well, first of all, get rid of all the packages connected. You don't need that. Also, make
sure you start with a application with no forms. Also, the IDE tends to work by using
keywords in the file vcl/vcl.h. These keywords are BCB specific I think, but generally they
simply mean you can include units and libraries.

The IDE doesn't seem to be engineered towards these keywords, and doesn't like you
avoiding them. So the keywords like USEOBJ and USELIB are important. Notice the macro
basically tells the compiler to include the file, because the compiler often calls the
linker itself, instead of waiting on the make program. You can specifically use the
compiler and linker yourself from the command line, or batch file (bcc32 and tlink/ilink).

You could edit the makefile, but they tend to be hard to work with. So,
I do recommend using the simple keyword. There is normally a .cpp file that is the main
project file. To use .cpp source file throughout the entire project, just use the USEUNIT()
macro, with the file in the brackets. EG USEUNIT("FOO.CPP"). Not that hard really.

Conor Stokes

 
Conor Stokes

June 02, 1999, 04:58 AM



OGLfan wrote:
>>
>>>>Well the first thing you gotta do is make sure the form you have made is actually got the
>>>>right settings, eg make sure it is pop up and stuff. Personally, I don't use forms with
>>>>CBuilder3 for OGL, mainly because it is more trouble than simply creating a window, and making
>>>>a rendering context for it. And also, I have noticed that loading OGL dynamically seems to
>>>>also be more reliable than including a implib dll. So, I use that. Also, I don't think you can
>>>>use the forms correctly to get fullscreen ogl with mode changes
>>>>(you end up with a windows bar).
>>
>>
>>How do you compile the programs without the IDE? I'm quite new to the CBuilder3 too. My first
>>attempt was to compile OGL programs like yours but I get lots of link errors. Probably I'm missing
>>something about how the compiler works. Are there any special settings?

Well, first of all, get rid of all the packages connected. You don't need that. Also, make
sure you start with a application with no forms. Also, the IDE tends to work by using
keywords in the file vcl/vcl.h. These keywords are BCB specific I think, but generally they
simply mean you can include units and libraries.

The IDE doesn't seem to be engineered towards these keywords, and doesn't like you
avoiding them. So the keywords like USEOBJ and USELIB are important. Notice the macro
basically tells the compiler to include the file, because the compiler often calls the
linker itself, instead of waiting on the make program. You can specifically use the
compiler and linker yourself from the command line, or batch file (bcc32 and tlink/ilink).

You could edit the makefile, but they tend to be hard to work with. So,
I do recommend using the simple keyword. There is normally a .cpp file that is the main
project file. To use .cpp source file throughout the entire project, just use the USEUNIT()
macro, with the file in the brackets. EG USEUNIT("FOO.CPP"). Not that hard really.

Conor Stokes

 
OGLfan

June 08, 1999, 10:00 PM

Oh, thanx!

 
Gabor

June 22, 1999, 02:16 AM

There's a really good OpenGL component for Builder. It comes with tons of examples. Some are very basic. For Example: rotating a single polygon in 2D.

Check out this page:
http://pc-heartbreak.physiol.ox.ac.uk/OpenGL/

--Gabor

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.