Skip to main content
gamedev.net
🔒 Locked

Blending

Started by Lutyo Oct 12, 2004 at 6:28 AM 1 replies 950+ views
Original Post
Lutyo
Lutyo
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
Krohm
Krohm
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.
Previously "Krohm"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.