NewBEE! Questions if you Have the Time.

Started by
9 comments, last by co-co 21 years, 4 months ago
I just finished learning C and C++, still not familiar with the compiler environments and wanting to learn opengl.... Although I have books on the subject including OpenGl Programming Guide, I still can''t figure out what I need and where to start with making opengl programs. I have both BorlandC++5.02 and MSVisualC++5.0. Which is better? Or is it only a personal preference. I''m not too familiar with the environment of the programs as I am with the language C/C++ itself. I do more studying by textbook than I do coding. I am new to the OpenGL API however. 1) First off. Before I go downloading tons of files and placing them all over my computer, I want to know exactly and only what I need. I''ve seen many different tutorials which required different combinations of the following in either .lib .dll or .h formats: gl glu glut glut32 windows glx glaux...and more Which of these files do I need? Which types? What is the significance of each? And where do i put them. i assume .h in /include/gl and .lib in /lib/gl , not sure about the dll files though. I''ve downloaded some files that i''ve already had and they were different sizes. Does this mean they''re newer, altered, or what? It''s like there''s not just one place that says where to get what you need to start out. I know that my versions of Borland and MSVisual are a few years old. Borland came with some opengl files and msvisualc++ seemed to not come with any. 2) Ok, once I''ve got that done, how do I set up a project in Borland or Visual environments for opengl... are there many different ways? if so just give me something to work with that''s simple. So it seems I pretty much know nothing, true, but after that I''m pretty much set to start learning, I have so many tutorials I''ll never run out. It''s just kinda hard to do when you''re not setup to do them. Thanks if you can help.
Advertisement
> I just finished learning C and C++

Holy crow! Well, you''re certainly ahead of me.

> Although I have books on the subject including OpenGl
> Programming Guide, I still can''t figure out what I need
> and where to start with making opengl programs.

You need the headers (gl.h, glu.h, and glut.h) and
their corresponding dlls. That''s it.

> I have both BorlandC++5.02 and MSVisualC++5.0.
> Which is better? Or is it only a personal preference.

Haven''t used either. I''ve used MSVC++6, and that was
pretty nice if you don''t mind being tied to MS. I''ve
also used the cygwin tools (unix tools for windows)
to compile and run little cross-platform glut apps.
Very nice.

> Which of these files do I need? Which types? What is the
> significance of each?

Of course, you #include the headers into your .cpp files.
The linker resolves names in your newly-compiled object
files to connect them with the compiled GL/GLU/glut code
in the dll''s.

> I know that my versions of Borland and MSVisual are a few
> years old. Borland came with some opengl files and
> msvisualc++ seemed to not come with any.

I think the cygwin tools come with the headers and libs
that you''ll need. It did back when I downloaded them a
while back.

> Ok, once I''ve got that done, how do I set up a project in
> Borland or Visual environments for opengl... are there many
> different ways?

Note, in the unix/linux world (and when using cygwin),
a makefile takes the place of a "MSVC++ project".

Good luck!
>> Although I have books on the subject including OpenGl Programming Guide, I still can''t figure out what I need and where to start with making opengl programs.

Well, if you''re using Borland or VC++, you should already have the libraries and headers. Check the include\ directory of your complier and check for a folder called include\gl\. If there is a folder by that name, you probably do have it installed.

>> I have both BorlandC++5.02 and MSVisualC++5.0.
Which is better? Or is it only a personal preference.

I''ve used the Borland Commandline Compiler and MSVC++. BCC32 wasn''t too bad, but you can''t beat IDE''s for big projects. I haven''t tried Borland''s C++ IDE, but I''m willing to bet a penny it isn''t as nice as VC++. My suggestion: go with VC++. Most "professional" Windows developers use it. Conform damnit! =-)


>> 1) First off. Before I go downloading tons of files and placing them all over my computer, I want to know exactly and only what I need. I''ve seen many different tutorials which required different combinations of the following in either .lib .dll or .h formats:
gl glu glut glut32 windows glx glaux...and more
>> Which of these files do I need? Which types? What is the significance of each? And where do i put them. i assume .h in /include/gl and .lib in /lib/gl , not sure about the dll files though.


Well, most likely OpenGL development files will be installed with your compiler, so you don''t have to download a thing (unless your runtime drivers are out of date).

In every OpenGL program for Win32, you need to #include gl/gl.h and gl/glaux.h to access all the OpenGL commands. gl/glu.h is for GL Utilities such as quadric objects. GLUT is a platform independent windowing API used to make simple OpenGL apps. Generally, once you learn Win32''s API, you don''t use GLUT.


>> I''ve downloaded some files that i''ve already had and they were different sizes. Does this mean they''re newer, altered, or what? It''s like there''s not just one place that says where to get what you need to start out.

Your OpenGL development files should be preinstalled with your compiler (at least, if you invested in a decent compiler). I''m not sure about what if you don''t have the latest files. Check out www.opengl.org for information on getting up to date.

>> 2) Ok, once I''ve got that done, how do I set up a project in Borland or Visual environments for opengl... are there many different ways? if so just give me something to work with that''s simple.

If you''re using the real Win32 API, you just create a new window application project and code away. I''m not sure if you''re using GLUT tho.


"You TK''ed my chicken!"
>>I have both BorlandC++5.02 and MSVisualC++5.0.
Which is better? Or is it only a personal preference.<<

ive used borlandc 3 + 4 (but not 5) they were good in their day
ive used vc5 before also.

one thing to watch out for with vc is libs that are built for one version aint compatable with a different version eg glut built for vc6 wont work on vc5. u will find that most libs out there use vc6 thus this will be a major hassle.
with borland5 also u will have the same problem. (i believe there is an app that will convert libs from one compiler -> borland5 though)

another option is dev-c++, i find the IDE superior to vc6. oddly enuf dev-c++ is free to download + use, perhaps check that out

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
Ok, I know you create a Win32 app
but what about all those options before you click
ok and create your project... what''s all those checkboxes
and menus?

And those two files that are automatically included in borland c++, in your project window, are those for windows apps? do i need to keep them or what.

Is there a good place to find very basic tutorials on OpenGL
english:
nehe.gamedev.net
...
search with google, it return tons of usable pages

german:
pixel-house.net
Just found that place tody. It''s pretty good.
Project->Settings->Link Tab->Object/library modules field: add opengl32.lib glu32.lib to end of string.

Include the appropriate headers, make sure it''s a win app, make sure your system handles OGL... should work. NeHe''s site is a big help.
Alternatively to adding thos libraries, you can also add them via some pre-processor directives in the source:

#ifdef WIN32
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#endif

Notice, that there is no ';' behind those directives!

[edited by - BlackLight on December 26, 2002 7:13:27 AM]
wouldn''t it be (lib/gl, "opengl32.lib") ? and same for glut32.lib

This topic is closed to new replies.

Advertisement