Jump to content
  • Advertisement
Sign in to follow this  
Lutyo

Blending

This topic is 5455 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I have a terrain, and now I want to render a transparent sphere(this would be a checkpoint like in GTA: Vice City). It is rendered successfully, but the FPS decreases from 75 to 30. Here is what my code like: set_camera_poz(); render_sky_box(); render_the_terrain(); render_the_actor(); glDisable(GL_LIGHTING); glDisable(GL_TEXTURE_2D); glEnable(GL_BLEND); glDepthMask(0); glBlendFunc(GL_ONE,GL_ONE); glColor4ub(0,255,0,20); gluSphere(sphere,60.0f,8,8); glDisable(GL_BLEND); glDepthMask(1); The terrain and the actor are textured, and lighted. I have a Gforce FX5600, so I think that can not be a problem. What am I doing wrong? Or am I using wrong method for this task? I am quite a new to opengl, so I need detailed describtion. Thanks, Lutyo

Share this post


Link to post
Share on other sites
Advertisement
Try to get the rid of gluSphere. Maybe it computes the geoemtry every frame. Or maybe it is implemented using immediate mode.

Try to put the sphere in a display list and call it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!