Tsproggy's picture

Stuck on object orientation

Hello all,

This is my first post on the forum. I've heard alot of good things about OpenGL and have migrated from my small experience with Direct X / XNA Game Studio to pursue OpenGL through this toolkit library. I've been going through the tutorials and I like how they encourage you to explore and experiment because in truth this how i've always found to learn things while programming but i'll get to why i've started this topic.

The problem is I don't know if i'm looking at this particular element of the tutorial wrong. It's funny because it's the first tutorial and I feel that I can't really move forward unless I get passed this little problem. I'm able to understand everything that is going on when my program is setting it's refresh rate, making the viewpoint, and all that stuff I understand that my program is making it's shapes using vertexes which hold values of line segment length, height, depth.

But what I can't seem to understand is this. The first tutorial suggests that I make the line segments move. Coming from an object orientated programming background I am thinking in terms of something like:

  GL.Translate(MyObject.X, MyObject.Y,MyObject.Z);

I've been trying to think of a way to make it into something easy to move but I can't wrap my head around how to make a bunch of lines into 1 object I can manipulate the coordinates of. I'm sure there is a way of doing this that I have missed or maybe i'm not getting the point at all. I was hoping the community could shed some light on this as i'm a hobbyist programmer and not very experienced with game design besides using game engines or making simple 2D demos(not really full games but rather a demonstration of functionality).


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Tsproggy's picture


Alright guys cya :) I've found basic OpenGL to have way more documentation and detail. I've even gotten passed this little road block and have moved on. I don't think I will be using this toolkit anymore.

"Results? Why, man, I have gotten lots of results! If I find 10,000 ways something won't work, I haven't failed. I am not discouraged, because every wrong attempt discarded is often a step forward...." - Thomas Edison

kl_mallory's picture

... never mind