Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Having trouble with Camera


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   -  Reputation: 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

Sponsor:

#2 Obelix   Members   -  Reputation: 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.



PARTNERS