annoying gl buffer...

Programming, for all ages and all languages.
Post Reply
com1
Member
Member
Posts: 105
Joined: Sat Apr 28, 2007 11:57 am
Location: TN

annoying gl buffer...

Post by com1 »

i am new to opengl and decided to try creating some sort of triangle in a renderer. i succeeded with the renderer, but when i ran the program, i basically got a mixed up screenshot of my desktop. i assumed that this was an image buffer issue, so i added code to clear the color, stencil, etc. buffers. after i did this, i ran the program again and got the same thing. can anyone help me on this?
oh microsoft, microsoft, what souls you have dismayed
User avatar
crazygray1
Member
Member
Posts: 168
Joined: Thu Nov 22, 2007 7:18 pm
Location: USA,Hawaii,Honolulu(Seriously)

Post by crazygray1 »

I played With OpenGL for a while, made the same triangle. Can I see your code?
User avatar
Telgin
Member
Member
Posts: 72
Joined: Thu Dec 20, 2007 1:45 pm

Post by Telgin »

Yeah, seeing some of your start up / rendering code would help.

It sounds like either the window isn't being created properly, or the screen clearing code isn't working right, despite your efforts. I can't recall exactly what code was used to clear the screen to black, but I'm sure you've got that right at least.

Are you clearing the screen immediately before drawing the triangle? Is this on a Windows platform? It's possible that you aren't flipping the buffers or something after drawing to them (if this isn't how it works, forgive me, it's been over a year since I've seen any GL code).

Lots of stuff could be the cause.

Also, are you just drawing the triangle with a call to glBegin(GL_TRIANGLE), vertex drawing functions, and an ending glEnd()? I'm not following what you mean by saying that you got the renderer to work right...
Post Reply