
Wireframe Mode
|
Copyright
info |
|
All
code in this tutorial is protected by the [GPL License]. |
|
Tutorial
by: S.E.B. |
||||||||||||||||
|
Mailto: seb@vjc-quake.be.tf Ok , this one
is easy, I’ve found it although I’ve got only a couple months experience with
C and OpenGL. (I’m programming for a couple of years but in Delphi) Ok , here we
go: Step 1 : open
the ref_gl.dll source. Go to gl_rmain.c find the place where all the cvar’s
are declared and add.
Step 2: find
the function R_Register still in gl_rmain.c and add somewhere in there
Step 3 : find
the function R_Renderview and seek for the lines
Replace them
with
or if you want
to display models wired to :
Step 4: If you
try to run quake with your dll now it will look very weird if you turn on the
wireframe mode. This is because the screen isn’t cleared , so to do this ,
add the next function above R_RenderFrame
Step 5 : look
at the function R_RenderFrame and replace :
With
Well this
should be it , in your console type gl_wire 1 to turn on the wired mode.You
could add some fancy stuff like a cvar for turning the model to wireframe
without the world , or the world alone , or to set the background color. It
shouldn’t be too difficult. I use it to test my own level , too see exactly
which polygons are drawn and which aren’t. It’s also a good wallhack but I
didn’t made this to spoil multiplayer games, so don’t use it if you go play
on-line. |
Tutorial Originally found at: