Click to See Complete Forum and Search --> : OPenGL beginner's questions
Homestead
December 24th, 2003, 03:43 AM
This after noon I went to a bookstore and picked up OpenGL..If I setup Console Application as a project, will it also work for me ori do I have to use Windows application ? I dont know how to start to code ? Please give me instructions., Okay ?
Thank you very much,
Regards,
homestead
Marc G
December 24th, 2003, 05:38 AM
Take a look at the fist few lessons at http://nehe.gamedev.net/lesson.asp?index=01
Homestead
December 24th, 2003, 11:18 AM
Originally posted by Marc G
Take a look at the fist few lessons at http://nehe.gamedev.net/lesson.asp?index=01
Thanks Marc a lot for the links., :)
Regards,
Homestead
galathaea
December 25th, 2003, 07:08 PM
NeHe is where I started too. They go over a lot of the basics and give a basic outline of what code is needed. You can replace in the examples the WinMain with the console main and things will still work fine (I do that because I write my test code in main and output the results and tracings of the tests into the console). The main will still create your window which gets attached to openGL and you will do your openGL output in the other window.
A great way to get to know the structure of openGL that I use is to start factoring out the bits and pieces of the tutorial code into various objects. A simple start would be to have a general interface for all objects in your 3d world and an object that manages the world objects (in many frameworks, these are known as the node and scene graph objects) and a projection screen object (which connects to a camera object) which walks through the 3d world object / graph / poset and has the various nodes draw themselves.
Toss together a few node objects that respect the interface. The tutorials have some starters, and other sites of other examples. Look at what openGL operations are needed particularly for drawing the objects (excluding all the other initialisation, translation, and other stuff). Try to look for other things that you might want other objects in your program to take care of (a texture manager is probably a good idea, along with a physics engine that avtually manipulates positions, calculates collisions, etc.). Maybe your objects will want to get more complex and skeletons can be used,..
Oh and maybe having an interface that manages the initialisation / destruction of the main openGL system can help focus that stuff as well.
Basically, I'm just saying that reading the tutorials is a good first start, but mess around with the code as well. Put your hands on it. Throw it around. See what happens. That's the way I learn best, at least.
One of the older openGL reference books from the standards committee is also available online, too (legally I believe). Look for red or blue book with openGL.
Homestead
December 25th, 2003, 08:29 PM
Thanks a llot
Regards,
Hometown
Homestead
December 30th, 2003, 03:19 PM
Originally posted by Marc G
Take a look at the fist few lessons at http://nehe.gamedev.net/lesson.asp?index=01
Nehe program doesnt work, the window still stays dead in the system, he doesnt show himself up before me no matter how many times I try to execute....:(
Could you tell me what the problem is ? How can i fix it ?
Thank you,
Regards,
homestead
antinotgalatean
January 8th, 2004, 04:13 AM
i copied the code from the pdfs to a project
i also needed to set up my linker and check the include directory pathway to make sure I was pointed to my openAL install
i had some problems with the code in the pdf spilling comments over lines, but that was fixed by just deleting them back to the previous line
then it compiled and ran for me
do these help?
Homestead
January 8th, 2004, 06:26 AM
Originally posted by antinotgalatean
i copied the code from the pdfs to a project
i also needed to set up my linker and check the include directory pathway to make sure I was pointed to my openAL install
i had some problems with the code in the pdf spilling comments over lines, but that was fixed by just deleting them back to the previous line
then it compiled and ran for me
do these help?
I have my own book and I will study my book first...
Homestead
January 8th, 2004, 07:30 AM
I forgot to say Thanks, :)
Regards,
Hometown
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.