fdncred's picture

[Solved] Display Lists and VBOs

I have a scene where I use Display Lists to draw elementary geometry like a cube and a plane. In that same scene I have complex geometry driven by VBOs. Here's my problem. Everything renders to screen correctly except the color of the display lists is very muted but the color of the VBO is perfect. There is no lighting in my scene. I just initialize GL.Color3(Color.White) in my constructor. Any ideas why my display lists are so dark and how I can fix them?

One thing I just noticed is that when I hit ESC to exit, momentarily my display list cube is the perfect brightness. I'm just not sure why it's so dim when the program is running.

Thanks,
Darren


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fdncred's picture

After messing with this for a while I think the problem is with blending....perhaps. ;) Any tips on blending? I'd really like to see a sample that shows every blending mode possible but it's very confusing. I know I saw one on the net somewhere but I can't find it now.

Darren

fdncred's picture

ok, it's not blending. I'm going out of my mind trying to figure this out. Why is my display list draw cube dark and my VBOs colored correct? Please help.

c2woody's picture

Could be some bug in your program.

fdncred's picture

LOL! It probably is a bug in my program. I'm just not sure how to debug it.

fdncred's picture

I just noticed something. If I load a small bitmap (90 x 90) one the colors are fine with everything. If I load a larger bitmap (256x256) then the colors for the display lists are darker. If i load an even larger bitmap (1300x2100) the colors for the display lists are black.

I'm using a texture vbo and a vertex vbo for the images. everything else, a plane, and x y z markers are display lists.

Any clues or ideas why my display lists keep getting darker?

the Fiddler's picture

Display lists are affected by the texturing state just like VBOs. Try disabling texturing explicitly before drawing the lists.

c2woody's picture
Quote:

It probably is a bug in my program. I'm just not sure how to debug it.

Well you have the great advantage of access to the source code, you didn't show a single line. So the only thing I can tell you is to check various examples on the net how display lists are used and how VBOs are implemented, keeping an eye on what state is encapsulated in one or the other.

fdncred's picture

Thanks Fiddler, that fixed it. Thanks c2woody for trying to help. I appreciate it.