View Full Version : what does opengl cover?
02-19-2006, 12:20 PM
I am a programming student, I have started working on a game w/ a group of fellow students. it is going to be in 3d.
Summary of below:
Is opengl only for displaying and rendering, or does it also have the ability to manage that which it displays.
How much does opengl have? I know it takes care of rendering and graphics/shading and all that other overated cynematic stuff...
my question is does opengl have it's own 'stuff' for managing objects in 3d space, or only for displaying them. for insatnce say I need a class that holds several 3d objects and lets me move them around. Does opengl have stuff in it to do this, or do I need to write that myself then call opengl when I need it displayed? also does opengl have a class for 3d objects?
I also hear that opengl is C not C++, if this si so how can it manage objects if it is not object oriented?
02-19-2006, 12:44 PM
OpenGL is an programming API that defines a powerfull state machine for rendering geometry.
It is rather low-level. How you define your objects is up to you. You pass primitives in and define how they are rendered, that's all. If you want scene management, you'll have to do it yourself(there are lots of third-party libraries for it).
You can use OpenGL under C++ too, why not?
02-19-2006, 12:59 PM
ok, great, so I write my own game, I write the 3d manager that holds the 3d objects and lets you manipulate them. I then write the 3d object code, and how 3d objects move/interact. I then write the engine that forces the objects to act in accordance with game rules. then I pass specific information to opengl to have it rendered. I do not need to incorperate opengl anywhere other than at rendering?
02-19-2006, 01:06 PM
What I am gonna write:
A class that holds 3d objects and lets you manipulate them, it will also allow you to check if objects intersect, or would intersect if moved a specific distance in a specific direction. rotation will also be here.
A class that holds a 3d objects, vertices, surfaces, motion.
a class that contains the 3d manipulator, it will take care of gravity/collision detecting, etc.
At the end: Have the last class I just specified call the proper library stuff to display the 3d information to the screen
now, am I correct in assuming I only need to use opengl (or other library that uses opengl) in that last class that 'puts the information on screen'
02-19-2006, 02:18 PM
Like that, yes :-)
You should really read the specs. I think it will bemore clear for you then
02-19-2006, 10:43 PM
If you want to create your own 3D game and don't want to put in a lot of work on the 3D engine itself I suggest you have a look at one of the existing engines like Crystal Space (http://www.crystalspace.org) for example
02-20-2006, 03:09 PM
thanx, I am aware of crystal space. I really want to work on the 3d engine, I want to build the 3d engine, I just don't want to deal with display/rendering/ui I want very much to program a 3d engine as far as managing 3d objects in 3d space. but since eventually I will be working with someone to have it displayed I wanted to make sure opengl didn't already have the part I wanted to do covered.
I should ahve made it clear, everyone assumes I am tryingto do less work hoping gl covers more, but in reality I want to do more work hoping gl covers less :-P
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.