Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Having trouble with Camera

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Paddeh   Members   

122
Like
Likes
Like

Posted 05 October 2001 - 05:03 AM

hey all, just started getting into Opengl and am having trouble understanding translatef.. at first i thought it controlled the actual view, but it actually controls where things are positioned (i think?!). Anyway, my question is this, I have a skeleton opengl window, and a spinning cube, the code i use is basic, and i have added this to my DrawCube(); function glTranslatef(0.0f,0.0f,z); glTranslatef(0.0f,0.0f, forward); I made it so that the keyboard ''a'' and ''z'' would decrease and increase the forward variable, to move the object back and forth. If i wanted to draw a large cube around the small one (a square room for example) would the translatef lines make both objects move backwards and forwards? or just the one that the function is in? I hope i''ve made this clear enough, if not i will try and make it easier to understand Also, I''ve tried to make a floor to my scene, but I cannot seem to get it to position right, it either positions as if stuck to the bottom of the cube, and it rotates with the cube, or it just doesnt seem to render atall. any ideas what im missing ?? Thanks for your time, hope someone can help

#2 Obelix   Members   

122
Like
Likes
Like

Posted 05 October 2001 - 11:24 PM

OpenGL is immediate updating the buffer with the current settings. Something like
- get data for one object and update
- get data for another object and update
So if you do change the translation between the objects would they share it.

OpenGL is a state machine with a lot of settings that is the same until you change them.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.