annoying gl buffer...
annoying gl buffer...
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
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
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...
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...