Sign in to follow this  
Straits

Lesson 47 : CG Wave

Recommended Posts

Hi, i have completed lesson 47 and now im trying to build on it further by adding multiple waves, using a phong fragment shader to make it look like water rather than a wire mesh, however im getting really low fps. I have implemented my version using opengl and cg in java with no loss to fps at all, why does it run so slow in C++ and is there any way i can improve it? Thanks :)

Share this post


Link to post
Share on other sites
There are always ways to improve it, like using VBOs instead of immediate mode or animate the normal in the fragment shader and not in the vertex shader.

The reason it's slower in the cpp version is because your doing something different that causes it to go into software mode for a bit or that you may have some glFinish that the java version ignores or something like that.
It could also be v-sync that is acting up a bit.

If you give me more information then you might get a better answer.

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