Advertisement

Blending

Started by October 12, 2004 06:28 AM
1 comment, last by Krohm 20 years, 4 months ago
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
try disable gl depth.

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.

Previously "Krohm"

This topic is closed to new replies.

Advertisement