Advertisement

OpenGL - How did YOU learn?

Started by July 10, 2000 11:35 PM
22 comments, last by Dragen 24 years, 4 months ago
Hey all, Very nice site, and excellent tutorials! I guess I would consider myself a newbie, although I have been programming for quite some time.. I have never touched C++ until a few years back, and I didn''t study much.. and this is my first time using OpenGL. I am picking up on it pretty quick, but i''m trying to get a good idea of what you guys went through and what was the best way to learn. Sure, it''s a broad question, and it''s different for everybody. But I think, somehow, everybody has something in common, the desire and the dream to create your own 3D world. This has inspired me. Unfortunately, I find myself getting discouraged after I run into problems. I never give up, but I push myself very hard. What is the best way to learn everything, thoroughly, and without going insane? I don''t know if many of you followed the hornets.org site.. they had tons of demos.. and TBL (The Black Lotus) team absolutely blew me away. Some day, I am going to write some really cool demos. Unfortunately, all I know how to do is texture map a cube.. and having tons of problems figuring out how to load multiple textures. Any ideas on that? Share your thoughts, I think it''s cool to hear about everyone''s story on OpenGL.. (The ultimate 3D API on the face of the planet!) See you guys around! -Dragen Remember, Software doesn''t have bugs, it just has random features.
Remember, Software doesn''t have bugs, it just has random features.
Welcome,

But let me first warn you, for me, going insane was inevitable.. For others, maybe OpenGL is easy.. But for me it''s quite hard..

It all depends on what you want out of the experience.. If you''re goal is to learn, have fun, and produce demos, then you''re no doubt on your way to all those things.. But it WILL take time.. And lots of it..

Having a FIRM grasp on C/C++ is a great way to start as I don''t and it''s a bit difficult..

Having a background before hand in 3d math is an excellent bonus.. If you don''t have that, I''d develop an insatiable appetite for it.

Patience will become your friend or OpenGL will destroy you..

Apart from that, TBL rocked... The old demo scene rocked and hornet.org rocked.. Ahh .. I wish the demo scene in the U.S. was HALF as active as that in Europe..

In lieu of that, I was hoping to wait until Worthless 2 was done, but if anyone reads this and is interested in making "old school" demos, NOT 3D games, drop me a line.. I''d like to start an OpenGL demo group...


bosco()
bosco4@home.com




--
leader of the free world .. or something ..
--leader of the free world .. or something ..
Advertisement
Yes, I''m in the Demo pool.. love them! I wish TBL was still producing stuff, they were my absolute favorite group. Unfortunately, hornet.org stopped with the demo stuff a while back. It doesn''t "breathe" like it used to.

I always wanted to do a game, but to me, making a sweet demo with Volumetric lighting, particle engines, advanced quadratic manipulation/morhping, reflective surfaces, radiosity lighting, halos, lens flares, light coronas, and all the other little effects you can create, is the way to go. Sure a game is great.. but when you like to write music too.. nothing is better than seeing your songs COME ALIVE!

After my post last night.. I fell back on some old work that I call "Alpha".. It was my original OpenGL source which rotated the cube and pyramid. I changed the layout in the files so the drawGL function was in it''s own file.. seperating and making it easier to edit/manage then having it all crammed in one file.

I also discovered some new tricks by playing around with the code. I attached 6 pyramids to the cube and rotated the entire object (a spike looking thing) on a random rotation of all Axis. Then I took the 6 Pyramids and applied a glRotatef(0.0f,0.0f,0.0f) which caused them to collapse and then expand. This made the cube shoot spikes out of it, and then collapse. I then added a counter to delay the constant collapsing to give it a cool effect. I was pretty excited, but up until 1:00am and I had to work the next day. I think my wife was irritated with me.

Anyway, what is the best way to write progressive frames? Like in a demo? Do you have to design a counter of some sort?

This is just a story of a new OpenGL programmer getting started with some fun stuff!

-Dragen
Remember, Software doesn''t have bugs, it just has random features.
Hehe, sounds kindof interesting.. Umm, check out tutorial 21 for some timing code.. That''s the best way in my opinion.. That way if a scene runs too slow on one machine, the person only has to bare it for a set amount of time.. not a set amount of frames ( ouch! been there done that.. )...

Yeah having the DrawGLScene() in a seperate file is good.. But generally the only thing in my DrawGLScene() are function calls to my scenes..

C++ is a real nice way to program demos too..

anyway...

bosco()




--
leader of the free world .. or something ..
--leader of the free world .. or something ..
i had a strong C++ background before learning OpenGL, which helped greatly. i''ve always wanted to make a game, but never had the means to do it, so i gave up for a long time. until, i had my opengl class last semester. i got the textbook (actually, it was the redbook) for the class, and a week later, i had created a whole chessboard and pieces using basic cones, cylinders, cubes, etc. i thought that creating that chessboard was a good way to practice opengl manipulations, to find out how matrices worked, as well as the interactive features of getasynckeystate, and mouse functions to move around chess pieces around the board. i built upon it, and added features like capturing pieces, etc, (never got to doing AI), and texturemapping the board surface, but still, it was a good learning experience, and a good way to learn OpenGL. i dunno if you wanna do that too, but that''s how i did it.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Yea, it seems that looking at examples and tutorials is useful, but you forget it so fast! If you try and figure something out on your own, or incorporate your own idea, everything is so much more clear. However sometimes this can lead to confusion if there is something too complicated and you don''t realize it.

That chess board idea sounds cool. I can already think how I would do it. However, I have to figure out how to get multiple textures to load.. in a good way.. and also move cameras.

I will take a look at that tutorial about framerate.
It would be good to run a demo/game at a speed that is the same on every PC.

You guys have really cool stories to talk about!

-Dragen

Remember, Software doesn''t have bugs, it just has random features.
Remember, Software doesn''t have bugs, it just has random features.
Advertisement
In my case, I was already working on a game when I wanted to add hardware acceleration to it, so I looked at OpenGL and found NeHe''s tutorials. I had modified v0.6 of my game to a total v0.6.5 OpenGL version. I am now rewriting the entire thing for v0.7, but I am taking a break for now, as I don''t even have a 3D card...

EL

----------------------------------------
"Inash neteia haeg joa kavari quilm..." SD4
----------------------------------------"Inash neteia haeg joa kavari quilm..." SD4
For me, it was pretty hard..
(well, I''m 13 yrs old.. maybe it''s just me ;-)

I got all my current books in one shopping spree
(after careful thinking)

Absolute Begginers Guide To C
The C Programming Language
OpenGL Superbible
Tricks of the Game Programming Gurus

You should ABSOLUTELY HAVE A VERY GOOD KNOWLEDGE
OF YOUR LANGUAGE BEFORE ATTEMPTING OPENGL!!
I got 1/2 way through Absolute BG to C, and then
I started Tricks of the GPG, which by the way is
a GREAT book.. after that, I read the OpenGL
superbible. It is a great book, but I just never
got past the 3rd chapter until about a month ago
(I didn''t know enough C!) You really have to
know your language before even trying. The book
is in C, which is good, because I was using plain
old C. Now I can make final fantasy tactics - style
maps with OpenGL- easily!

My map editor (is it called an engine? I dont know)
is fairly simple- it is console based, but still
pretty easy to use. The map editor basically uses
cubes. Just slap a texture on each side, mold the
cube a bit (so the map doesn''t look blocky), and
it''s pretty much a map!

BTW, the OpenGL Superbible uses GLUT for most of
its chapters (17/19).. They still use basic
gl functions (glVertex, etc) and some of the demos
the author(s) created are actually pretty nice!
The book is rich in detail and highly reccomended.

-Phil
Online RPGs.. Almost like another life! Except for whenswitching back to real life, sometimes I forget there isn'ta profanity filter..
Actually i find OpenGL easy. Very easy. I''ve always been scared of trying to do 3d, and sticked to 2d with DirectX. I thought it was too difficult. Well, i don''t know if it''s because i''m a 23 years student in computer-science, or a good C programmer, but i''ve been quite surprised not to have found a real problem when trying to do what i wanted in 3d. I learnt the basics (drawing polygons, loading textures, texture-mapping) in 2 days. At the end of the week i was playing with alpha-blending and mip-mapping, and camera movement (ala Quake). At the end of the month i was able to make my own lit landscape, smooth shaded, and move on it. Since then, i''ve added many features to my engine and it really starts to look nice. Well, there''s still a lot of work to do on it, but the 3d part isn''t the problem...

The main problems i''ve meet are, how to organize the code, and how to load dynamically the OpenGL drivers. I also had a bad bug in my octree creation, and it took me a good week to fix it, but it''s not really OpenGL related..

Y.
Yea, that seems to be the problem I am having, even though I am not completely familiar with C++ like you are. OpenGL is very easy, it is composed of function calls and parameters.. the math is done for you! That''s what I really like about it. My main problem is trying to figure out what im doing with C++. Meaning, which is the best way to do it? There are a lot of things that I don''t understand about C++ either.

How do you organize your code? Structures and classes? Should you declare global variables in your own header file and spread it out across all your GL source files? (Like QuakeII. g_local.h was there real big header file)

To me, it seems structures and pointers are more important than anything. What do you guys think?

-Dragen

Remember, Software doesn''t have bugs, it just has random features.
Remember, Software doesn''t have bugs, it just has random features.

This topic is closed to new replies.

Advertisement