PDA

View Full Version : Problem With WireFrame


alex877007
3rd September 2002, 08:45
I got a Problem With WireFrame.. in my opengl hack... heres a pic of it.. i dont know whats wrong with it.. :confused: Should i post the code?


http://www.angelfire.com/games4/munkaribunkar/Wallhack.jpg
Write it in the browser! Angelfire doesnt suport urls..

/me
4th September 2002, 23:59
Hi!

This 'issue' can by easily fixed. Since in wireframe mode the OpenGL
system only draws lines instead of filled polygons, you can see
all previous drawn frames in the current frame.

To fix it, you have to clear the color-buffer before rendering a
frame. Some tutorials describe the following way:
- hook glClear
- check if GL_DEPTH_BUFFER_BIT is set in Mask
- if so, set GL_COLOR_BUFFER_BIT too and choose a color to fill the color-buffer with (use glClearColor)

I tried it this way, but I didn't succeed yet. It seems that HL does
not call glClear, not even to clear the depth-buffer. You can force
HL to do so by setting the cvar gl_clear to '1' ingame.

After doing so, your color-buffer will be filled with red each time
before a frame is rendered (since HL uses read as default color).
You can change the fill-color with glClearColor as decribed above.
However, on my system the fill-color is always black, doesn't matter
which color I set with glClearColor.

Greetings. /me.

alex877007
5th September 2002, 08:38
yeah i forgot glClearColor lol.. :)
Thanks for the help.. :)