View Full Version : VBO

09-13-2008, 01:06 PM
Hi, I have a program that uses a Cg program to perform some geometric operations on a vertex shader, and shading operations on a fragment shader. Before I rendered my triangle mesh glBegin()/glEnd(). Now I wanted to increase speed by using VBO's. I create buffers for vertex position, normal, and color. My issue is that for some reason, the first time I render the screen is black (that's the clear color), but when the program loops the second time it renders.

Has anyone had this problem before? does anyone have an idea why this might be happening?

When I render the same scene without using any shaders, the image renders the first time, it is only when I bind (use) shader programs when this is an issue.

I am using a GeForce 7950 GX2

09-13-2008, 03:51 PM
Could be lots of reasons why your first frame isn't what you'd expect, like various uninitialized state, for instance, state with inappropriate default values initialized after the first frame. Without a repro or more info it'd be difficult to say for sure. But if you're taking bets, that's mine.