Sign in to follow this  
vardhireddy

simple 3D game program

Recommended Posts

vardhireddy    111

Hi,

Recently I started learning OpenGL in C++. Now I am familiar with OpenGL, but I am confused with updating values of object. 

 

I started working on a free fall ball and collision with ground.

 

My question is where do I have to update my object values?

 

Simple program must be very helpful.

 

Thanks in advance.

 

Share this post


Link to post
Share on other sites
vardhireddy    111

What have you got working so far?

I am fallowing openGL superbible 5th edition, based on the examples in that book, I can able to move object with keyboard but I am applying dynamics to objects. Here I am missing where to update values of object.

 

Hope this makes clear of query..

Edited by KalyanReddy

Share this post


Link to post
Share on other sites
ifthen    820

Well, could you paste code which you have so far? We are not wizards and we have not seen your code, so we do not know what is wrong with it.

Share this post


Link to post
Share on other sites
powly k    657

The same thing that moves the ball when you press a button should move it based on gravity and collisions. Probably a glUniform with the object location. Make your shader active, update the values, render.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this