PDA

View Full Version : Newbie at OpenGL!! many questions need answers



08-26-2001, 02:40 PM
Hi,
I know c++ programming and I would like to learn OpenGL. All I have is Borlan C++ so I am stuck using this compiler and its included lib's. First of all I do not know win32 programming. I know that if I use Glut I can get by without knowing Win32. I have tried many of the tutorials and successfully compile and ran some of them, but others, I get tons of linking errors or external references. Here are questions I need detailed explanation on:

1. Where can I download documentation on OpenGl? I have the glut documentation on pdf. but I also need all the built-in functions of OpenGl preferalbly in pdf format. I checked some of the links on the documentation page, but they are dead.

2. How do I setup Borland to compile OpenGl code? Like what settings I need in the new project dialog-box. I know I am suppose to put all the glut stuff in the c\:windows directory, but where do I put the other stuff like gl.h, glu.h, glaux.h, and do I really need them?

Any help would be greatly appreciated.

niko
08-26-2001, 08:50 PM
For the documentation: do google search with 'Red Book' and all the variants so you should get at least couple of hits. If this fails however, inform me and I can email a bunch of .pdfs to you.

Are you using regular Borland C++ compiler or some version of Builder? If you use Builder the OpenGL headers are located in your .../include/gl directory.

- Niko

Fastian
08-27-2001, 04:48 AM
Hi,

I was also wondering where can I get latest glut documentation in pdf format. I tried searching but couldn't find it. If anyone has a link to it please post it.

Fastian

08-28-2001, 06:47 AM
you can get the glut documents here
<<http://reality.sgi.com/mjk_asd/glut3/glut3.html>>

cyclone
08-28-2001, 07:07 AM
For ALLS beginners !!!

Please, don't begin OpenGL programming with Windows, Microsoft seem to make all it can for to make this really difficult ...

Make this on another OS where the compilation of opengl programs isn't a nightmare ...

For example, opengl compilation in Linux is as simple as :

gcc test.c -o test -L/usr/X11R6/lib -lglut -lGLU -lGL -lXext -lX11 -lm

This compile a opengl .C file named test.c and make one executable named test.

The compilation of Opengl's programs can really be very simple, no ?

It's nothing but I'm tired about the lot of specific Windows problems for to compile opengl's programs : this is really very difficult when this can be really simple ...

If Microsoft don't want really to make something for the opengl community, then this is the opengl community that to have to make something for it !!!

And why NVidia, Ati and others don't want to make an Opengl SDK for others OS that Windows, they really think that Microsoft is a reference into the Opengl history ???

No, it's only a big child that don't want what it want and perturb all others !!!


@+
Cyclone

08-28-2001, 12:35 PM
I agree that it is hard to get openGl to compile on windows for beginers like me, and that is why everybody has so many questions. But I got my first computer with windows installed so I depend heavily on GUI and am somewhat uncomfotable with command lines. I just learn by trial and error and now I am doing pretty well with borland C++ on Win98.

Any way, I have a request, can somebody give me a demo code or ponit me to one that does something like this:

a cube on the screen and the user is able to move around it using the arrows keys and the mouse.I got the straffing and forward backward right, but I do not know how make it so that when I turn, the cube translates to the opposite direction and rotating at the same time allowing me to make a full 360 turn and come back to the object.

If anybody just happen to have that code or can point me to a tutorial I would really appreciate it.

MarsuGL
08-28-2001, 02:21 PM
For example, opengl compilation in Linux is as simple as :

gcc test.c -o test -L/usr/X11R6/lib -lglut -lGLU -lGL -lXext -lX11 -lm


easy ?

I think that for someone wich is new to linux, the learning time is less important with windows and all the lib, .h compiler stuff, and at least your know what you are doing, it just need to be demistified at startup, like many others learnings, linux included.
I don't really see any reason to use linux better than windows for a beginner.

no offense,
Marsu-Win

niko
08-28-2001, 07:46 PM
Right. Learning OpenGL under Windows is not inherently difficult. Only lousy tools make it difficult. Here's an excellent tool: Borland C++ Builder. Doing OpenGL apps could not be easier than it is with bcb: Install bcb, include gl.h and start coding. No tedious hasling with rpms, trying to figure out what the hell is the correct version of this and that for this Linux distribution and so on and so on. For me it's not a big deal because I am comfortable with UNIX systems anyways but for newbie... can't wait until the C++ Kylix hits the streets, though http://www.opengl.org/discussion_boards/ubb/wink.gif

- Niko

ffish
08-28-2001, 08:13 PM
Originally posted by the newbie:
... a cube on the screen and the user is able to move around it using the arrows keys and the mouse.I got the straffing and forward backward right, but I do not know how make it so that when I turn, the cube translates to the opposite direction and rotating at the same time allowing me to make a full 360 turn and come back to the object.

If anybody just happen to have that code or can point me to a tutorial I would really appreciate it.

If you work through the tutorials on http://nehe.gamedev.net you should be able to work this out.

Hope that helps.

marcus256
08-29-2001, 02:35 AM
Originally posted by cyclone:

For example, opengl compilation in Linux is as simple as :

gcc test.c -o test -L/usr/X11R6/lib -lglut -lGLU -lGL -lXext -lX11 -lm
Cyclone

Well, under Windows with MinGW (GCC port) it is as simple as:

gcc test.c -o test.exe -lglut32 -lglu32 -lopengl32 -lm

http://www.opengl.org/discussion_boards/ubb/wink.gif

Or, if you want to use Windows GDI instead of GLUT:

gcc test.c -o test.exe -lglu32 -lopengl32 -lgdi32 -lm

How's that for simple??

08-29-2001, 06:42 AM
It is not so hard to get OpenGL working with DELPHI http://www.opengl.org/discussion_boards/ubb/smile.gif

Rob The Bloke
08-29-2001, 03:35 PM
I personally hate unix for programming in general. I'm sorry, but typing in a command line is far too much hassle when my compiler has a button. :>

john
08-29-2001, 03:48 PM
you type in 'make'.
or, even, if you're very clever;
make all
or, if you are very lazy
alias m make
and you just do
m
=)

but! wait! if you have a shell with command history, then all you need is to press the up arrow and hit enter. But! If you are even lazier than THAT, you could cut and paste the make<carriage return> into the x-selection and merely hit the middle mouse button to make!

Each to their own, I guess... but... I've seen a colleague use visual C++ and I... hmm. "why is it trying to autocomplete my class name? why do i need to run a class wizard? whhhyyyyyy!!?"

Give me emacs, or give me death!!

cheers,
John