This is Google's cache of http://www.gamedeception.net/archive/index.php?t-366.html. It is a snapshot of the page as it appeared on Aug 17, 2013 04:18:06 GMT. The current page could have changed in the meantime. Learn more
Tip: To quickly find your search term on this page, press Ctrl+F or ⌘-F (Mac) and use the find bar.

Text-only version
 
Making your own OpenGL "driver hack / wrapper" [Archive] - GameDeception - A Development Site for Reverse Engineering

View Full Version : Making your own OpenGL "driver hack / wrapper"



DllMain
03-22-2003, 12:16 PM
This was NOT Written by me. I got it from http://kab.g3host.net/~o187/c/wallhack.html but figured it would make a good addition to this forum.

Basically it gives you a start to making your own OpenGL hack with 1 hack mode : D and it is VERY easy to understand.

Well here it is:

Tools Needed: Visual C++ (5.0, 6.0 and 7.0/.Net Recomended)
Description: You will learn to make a simple OpenGL Wallhack via a wrapper.

Setup Environment:
1. Start Visual C++
2. Start a new project/solution and make it an empty DLL name it opengl32
3. Add a new c++ source (.cpp source) and call it main.cpp
4. Add a new DEF File (.def) and call it opengl32.def.
5. Open the project properties and link the following libraries: opengl32.lib glaux.lib glu32.lib

opengl32.def:
This fill will contain all the exports you will need from OpenGL, theres realy nothing to explain just make it look like this:

LIBRARY opengl32
EXPORTS
glAccum
glAlphaFunc
glAreTexturesResident
glArrayElement
glBegin
glBindTexture
glBitmap
glBlendFunc
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClipPlane
glColor3b
glColor3bv
glColor3d
glColor3dv
glColor3f
glColor3fv
glColor3i
glColor3iv
glColor3s
glColor3sv
glColor3ub
glColor3ubv
glColor3ui
glColor3uiv
glColor3us
glColor3usv
glColor4b
glColor4bv
glColor4d
glColor4dv
glColor4f
glColor4fv
glColor4i
glColor4iv
glColor4s
glColor4sv
glColor4ub
glColor4ubv
glColor4ui
glColor4uiv
glColor4us
glColor4usv
glColorMask
glColorMaterial
glColorPointer
glCopyPixels
glCopyTexImage1D
glCopyTexImage2D
glCopyTexSubImage1D
glCopyTexSubImage2D
glCullFace
glDeleteLists
glDeleteTextures
glDepthFunc
glDepthMask
glDepthRange
glDisable
glDisableClientState
glDrawArrays
glDrawBuffer
glDrawElements
glDrawPixels
glEdgeFlag
glEdgeFlagPointer
glEdgeFlagv
glEnable
glEnableClientState
glEnd
glEndList
glEvalCoord1d
glEvalCoord1dv
glEvalCoord1f
glEvalCoord1fv
glEvalCoord2d
glEvalCoord2dv
glEvalCoord2f
glEvalCoord2fv
glEvalMesh1
glEvalMesh2
glEvalPoint1
glEvalPoint2
glFeedbackBuffer
glFinish
glFlush
glFogf
glFogfv
glFogi
glFogiv
glFrontFace
glFrustum
glGenLists
glGenTextures
glGetBooleanv
glGetClipPlane
glGetDoublev
glGetError
glGetFloatv
glGetIntegerv
glGetLightfv
glGetLightiv
glGetMapdv
glGetMapfv
glGetMapiv
glGetMaterialfv
glGetMaterialiv
glGetPixelMapfv
glGetPixelMapuiv
glGetPixelMapusv
glGetPointerv
glGetPolygonStipple
glGetString
glGetTexEnvfv
glGetTexEnviv
glGetTexGendv
glGetTexGenfv
glGetTexGeniv
glGetTexImage
glGetTexLevelParameterfv
glGetTexLevelParameteriv
glGetTexParameterfv
glGetTexParameteriv
glHint
glIndexMask
glIndexPointer
glIndexd
glIndexdv
glIndexf
glIndexfv
glIndexi
glIndexiv
glIndexs
glIndexsv
glIndexub
glIndexubv
glInitNames
glInterleavedArrays
glIsEnabled
glIsList
glIsTexture
glLightModelf
glLightModelfv
glLightModeli
glLightModeliv
glLightf
glLightfv
glLighti
glLightiv
glLineStipple
glLineWidth
glListBase
glLoadIdentity
glLoadMatrixd
glLoadMatrixf
glLoadName
glLogicOp
glMap1d
glMap1f
glMap2d
glMap2f
glMapGrid1d
glMapGrid1f
glMapGrid2d
glMapGrid2f
glMaterialf
glMaterialfv
glMateriali
glMaterialiv
glMatrixMode
glMultMatrixd
glMultMatrixf
glNewList
glNormal3b
glNormal3bv
glNormal3d
glNormal3dv
glNormal3f
glNormal3fv
glNormal3i
glNormal3iv
glNormal3s
glNormal3sv
glNormalPointer
glOrtho
glPassThrough
glPixelMapfv
glPixelMapuiv
glPixelMapusv
glPixelStoref
glPixelStorei
glPixelTransferf
glPixelTransferi
glPixelZoom
glPointSize
glPolygonMode
glPolygonOffset
glPolygonStipple
glPopAttrib
glPopClientAttrib
glPopMatrix
glPopName
glPrioritizeTextures
glPushAttrib
glPushClientAttrib
glPushMatrix
glPushName
glRasterPos2d
glRasterPos2dv
glRasterPos2f
glRasterPos2fv
glRasterPos2i
glRasterPos2iv
glRasterPos2s
glRasterPos2sv
glRasterPos3d
glRasterPos3dv
glRasterPos3f
glRasterPos3fv
glRasterPos3i
glRasterPos3iv
glRasterPos3s
glRasterPos3sv
glRasterPos4d
glRasterPos4dv
glRasterPos4f
glRasterPos4fv
glRasterPos4i
glRasterPos4iv
glRasterPos4s
glRasterPos4sv
glReadBuffer
glReadPixels
glRectd
glRectdv
glRectf
glRectfv
glRecti
glRectiv
glRects
glRectsv
glRenderMode
glRotated
glRotatef
glScaled
glScalef
glScissor
glSelectBuffer
glShadeModel
glStencilFunc
glStencilMask
glStencilOp
glTexCoord1d
glTexCoord1dv
glTexCoord1f
glTexCoord1fv
glTexCoord1i
glTexCoord1iv
glTexCoord1s
glTexCoord1sv
glTexCoord2d
glTexCoord2dv
glTexCoord2f
glTexCoord2fv
glTexCoord2i
glTexCoord2iv
glTexCoord2s
glTexCoord2sv
glTexCoord3d
glTexCoord3dv
glTexCoord3f
glTexCoord3fv
glTexCoord3i
glTexCoord3iv
glTexCoord3s
glTexCoord3sv
glTexCoord4d
glTexCoord4dv
glTexCoord4f
glTexCoord4fv
glTexCoord4i
glTexCoord4iv
glTexCoord4s
glTexCoord4sv
glTexCoordPointer
glTexEnvf
glTexEnvfv
glTexEnvi
glTexEnviv
glTexGend
glTexGendv
glTexGenf
glTexGenfv
glTexGeni
glTexGeniv
glTexImage1D
glTexImage2D
glTexParameterf
glTexParameterfv
glTexParameteri
glTexParameteriv
glTexSubImage1D
glTexSubImage2D
glTranslated
glTranslatef
glVertex2d
glVertex2dv
glVertex2f
glVertex2fv
glVertex2i
glVertex2iv
glVertex2s
glVertex2sv
glVertex3d
glVertex3dv
glVertex3f
glVertex3fv
glVertex3i
glVertex3iv
glVertex3s
glVertex3sv
glVertex4d
glVertex4dv
glVertex4f
glVertex4fv
glVertex4i
glVertex4iv
glVertex4s
glVertex4sv
glVertexPointer
glViewport
wglChoosePixelFormat
wglCopyContext
wglCreateContext
wglCreateLayerContext
wglDeleteContext
wglDescribeLayerPlane
wglDescribePixelFormat
wglGetCurrentContext
wglGetCurrentDC
wglGetDefaultProcAddress
wglGetLayerPaletteEntries
wglGetPixelFormat
wglGetProcAddress
wglMakeCurrent
wglRealizeLayerPalette
wglSetLayerPaletteEntries
wglSetPixelFormat
wglShareLists
wglSwapBuffers
wglSwapLayerBuffers
wglUseFontBitmapsA
wglUseFontBitmapsW
wglUseFontOutlinesA
wglUseFontOutlinesW

main.cpp:
First we will need to include some basic opengl and win32 libraries:

#include <windows.h>

#include <gl/gl.h>

#include <gl/glu.h>

#include <gl/glaux.h>

Now we will need to set the dll entry point, this is done through DllMain:

BOOL __stdcall DllMain(HANDLE hInst, DWORD dwReason, LPVOID lpReserved)

{

if (dwReason == DLL_PROCESS_ATTACH)

{

//

}

return TRUE;

}

At this point u should be able to compile with 0 errors and 0 warnings, if not go back and redo everything. You can test the dll by moving it to Half-Life\gldrv\ and then adding your dll to drvmap.txt by adding a line to the text file that says "gldrv/opengl32.dll My Hack", now if you are in windows 98 you can just select the dll from the drop down list under video options in opengl mode and play, but if you are in a NT based OS (nt, 2k, xp) you need to first go to console under default mode then close console and go to video options and select you dll and play, you must do this every time (to fix this you can use Vasily's Wrapgen). The hack so far does nothing, but it loads!

To add our main feature (the wallhack) you first need to hook glBegin this is done through the following code:

void __stdcall NEWglBegin( GLenum mode )

{

glBegin(mode);

}

Now you need to open your opengl32.def and in the long list find glBegin and make it say glBegin=NEWglBegin instead. You should be able to compile and it should work fine, but it does not do anything yet! To make the xqz2 style wallhack you need to add the following code before glBegin(mode);:

if(mode == GL_TRIANGLE_STRIP)

{

glDisable(GL_DEPTH_TEST);

}

Compile the hack and you should have your working wallhack! You cant toggle it but it's there, you can now work on your hack and make it into something better!

Banana
03-26-2003, 08:49 AM
But you'll be running into trouble when you want to call functions that you have hooked so you'd better use wrapgen...

DllMain
03-26-2003, 04:14 PM
I used this and have no troubles whatsoever with it.. and wrapgen seemed a little complex at first, this is kind of a basis for someones first opengl hack, and is a good starting point to get the basics down.

boaVirus
03-30-2003, 07:01 PM
well, think so too.

it doesn't make any problems. but how te f*** do u get an
aimbot in there. i had an idea and it works great, but i wont tell how i did it. and it's damn eating fps.

wrapgen is really complex at the beginning, but on the other hand, how should thy understand an client-hook in a few weeks,
when a wrapper is too complex?

i started with scripting and one of the first client hooks (ogc-bevel)
:cool:

DllMain
03-30-2003, 07:14 PM
Aimbots easy.. get coords in glvertex3f, do your aiming in popmatrix... works fine. I started with this, and converted to wrapgen which works fine for me. Next step is a client hook. And why do you refuse to give out methods? Thats just not cool. Oh well, I like my aimbot, it doesnt eat any fps and it works fine for me : D

boaVirus
03-30-2003, 07:37 PM
damn... i wanted to force some n00bs thinkin' about it.

Xero
04-10-2003, 08:02 PM
Originally posted by DllMain
Aimbots easy.. get coords in glvertex3f, do your aiming in popmatrix... works fine. I started with this, and converted to wrapgen which works fine for me. Next step is a client hook. And why do you refuse to give out methods? Thats just not cool. Oh well, I like my aimbot, it doesnt eat any fps and it works fine for me : D

I have a great hack going, just no aimbot and esp becaues I cant seem to get the 3D float coords into 2D (x,y) coords I can use with windows and 2 dimentional drawing, im using 2 ways of converting one with glProject, but they all fail, Know exactly how I am suppose to do it? i need help bad.
-Xer0

DllMain
04-10-2003, 08:30 PM
Bananas opengl aimbot tutorial has a function that you could use for this, scroll down to see it in tuts forum.

Xero
04-10-2003, 09:36 PM
Originally posted by DllMain
Bananas opengl aimbot tutorial has a function that you could use for this, scroll down to see it in tuts forum.

Doesn't work worth a damn, i get incorrect values.

DllMain
04-10-2003, 09:41 PM
i dunno then sry : (

actually: your Z value in half life is like your Y screen coord. since if you are looking down on a map it looks like this:

top - X value

left right - Y value

bottom

and if you arelooking at a map straight on its like this:

top - Z value

left right - X value

bottom - Z value

or something like that. Look at map coords on worldcraft might help you out. At least this is what my experience has taught me : )

Azorbix
04-10-2003, 10:08 PM
3d planes, X + Y are YAW, Z is Verticle
2d planes, X is YAW, Y is Verticle

DllMain
04-10-2003, 10:23 PM
Yes, that makes more sense than my half assed explanation.^^

Xero
04-10-2003, 11:13 PM
Originally posted by Azorbix
3d planes, X + Y are YAW, Z is Verticle
2d planes, X is YAW, Y is Verticle

Is this after its converted with glProject or something? or b4? because b4 these values are like over 1000, I dont see how they're gunan work with windows 2d coords for like SetCursorPos.

Xero
04-12-2003, 10:56 PM
Ok, now that I know that how does that help? I need 2D coordinates for 2d Drawing or for an aimbot setting the cursor pos. Im using gluProject, not realy getting correct values, is there a specific time and place I should do the converting? Does it not work in glPopMatrix? or what?
-Xer0

DllMain
04-13-2003, 11:20 AM
All I can say is try that glRasterPos function, otherwise I dont know whats wrong.

Xero
04-13-2003, 03:37 PM
Oh god u guys really dont know anything? LoL, its simple as this, gluProject can only be used b4 well actualy in glPopMatrix in a hack, to my knollege it doesn't seem to work anywhere else, really all u have to do is get the matrix in glPopMatrix, and use that for all your model gluProjects and it works fine. Also the y is mirrored from what you get from gluProject.
Maybe this will help someone :-) am I the only one that tries to understand what im coding rather then just cut and pasting like most of the hack coders in Counter-Strike, I should write some tutorials when I get the Xer0's hack website back up.
-x3r0

DllMain
04-13-2003, 04:00 PM
You cant get a simple aimbot working, and when everyone tries to help you and you cant figure it out you resort to flaming? Why dont you go to the OGC forums, I think you would be more at home there.

Xero
04-13-2003, 04:26 PM
Not really flaming, just saying u guys didn't know my answer and I found it and then gave my solution in case someone else is having the same trouble :-) I regret making it look flame-like, thought bout it after I sent it sorry, thanks guys for any help you tried for.
-x3r0

Element
05-09-2003, 09:00 PM
Hey i just used this tutorial and it worked so i wanted to say thanks dllmain. Now i have one question, Is there a tutorial on this website or forum that will teach me how to add these things: Flash Bang Removal, Smoke Removal, and lambert. That work with this tutorial! i know there is tuts on those things i just said above but im not sure if they will work with this tutorial. Thanks alot.

DllMain
05-10-2003, 11:26 AM
Check tutorials section on www.ogc-cheats.de

Element
05-10-2003, 08:44 PM
Ok i did a tutorial in the tutorials section of this forum that [Z3r0h4x] G0dz made on how to add white walls. Well i think i did it right but i get a error when compiling. And i did exactly what you said in this tutorial and it compiled fine before. Well here is what my source looks like with the white walls added.


void __stdcall NEWglBegin( GLenum mode )

{
if(mode == GL_TRIANGLE_STRIP)

{

glDisable(GL_DEPTH_TEST);

}
if(mode != GL_TRIANGLES && mode != GL_TRIANGLE_STRIP && mode != GL_TRIANGLE_FAN && mode != GL_QUADS)
{

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL)

}

glBegin(mode);

}


And this is how it looks like without it, The way your tut said to have it dllmain.:


void __stdcall NEWglBegin( GLenum mode )

{
if(mode == GL_TRIANGLE_STRIP)

{

glDisable(GL_DEPTH_TEST);

}

glBegin(mode);

}




And this is the error i get:


c:\documents and settings\cooper\desktop\cheats\myhooks\c-a cheats\c-a-ogl-beta1\c-a-ogl-source\opengl32.cpp(65) : error C2143: syntax error : missing ';' before '}'


And this is what the error looks like on the page:


}


Now did i add whitewalls wrong is the source wrong or something... But i dont know why im getting errors :-/. Can one of you guys help me fix it? Thanks so much.

DllMain
05-11-2003, 12:07 PM
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL)

needs to be

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

You need to learn C++...

Element
05-11-2003, 02:07 PM
You mean just over all c++..? If so should i just search google for like C++ Books or something.. Thanks ya sorry i just got C++ not that long ago. :-/

DllMain
05-11-2003, 02:08 PM
www.cprogramming.com

ge0
05-22-2003, 07:57 AM
i followed the instructions fully and it dies on the 'loadling' screen in cs, just sits there and does nothing. :(

-ge0-

DllMain
05-25-2003, 10:54 AM
Then you are loading it wrong. Try again. Although this is mainly just for learning, and not really to use as an opengl hack... you would be better off to use the wrapgen since you can just stick it in /half-life for it to work.

MRS
09-11-2003, 03:03 PM
why cant you just add a workspace...
I am trying to do exactly as you say but its getting wrong all the time.
plz cant you make a complete workspace and zip it ?

xen
09-11-2003, 03:11 PM
This is really easy to accomplish, you cannot simply rely on copy and paste code.

On alternative you could head over to ZOX and grab a copy of Tatnium4 Base...

Xnient
09-11-2003, 07:47 PM
ZOX is at http://zox.game-deception.com

OneEightSeven
09-30-2003, 07:34 AM
Wow, at least someone found my tutorial :-). Hope it helped some ppl here.

The new address for the site is http://www.wrapper.tk or http://www.sonic-shellz.net/187/

Site is currently going a bit slow, it got some good traffic after google and other search engines added it to their databases, but the dns www.3nd3r.com died so the traffic is like dead now untill they re-add it. :-(

DonKeY-X
10-11-2003, 11:03 AM
I follow this and it crashes counter-strike (1.6)

rtfm
10-12-2003, 11:22 AM
Im on MS V C++ 6.0 standard I went into Project>Add to project>new but I don't get how you make a .def file.. Newb question I know please don't flame everything else is clear tho ;p

b0x
10-12-2003, 12:51 PM
make a new text file and save it as blah.def

rtfm
10-12-2003, 03:35 PM
N1 Tutorial thanks

BishopDonJuan
04-19-2004, 03:19 AM
grrr ok, cant post compile errors i guess. so ill just translate it in spanish

Yo quiero taco bell.

SuperDudeHack
06-06-2004, 02:25 PM
when i compile i get errors it dont work :X

EDIT: nerver mind it works i didn't make a empty dll stupid me ^_^

o0oO
08-01-2004, 04:19 PM
How can you make this work with steam? I tried using someones leet injector but it didnt load it. :(

Gh3tt0playa21
08-01-2004, 06:36 PM
This isn't a hook, it's a wrapper, it's not meant to be used with loaders. You're suppose to put it in your CS directory.

Fairlight
08-01-2004, 09:40 PM
Just place it in your cstrike directory, if you cant compile it, go grab wrapgenv2

o0oO
08-01-2004, 11:29 PM
i can compile and it works in regular half-life, but when i put it in cstrike 1.6 dir and run it just hangs.

o0oO
08-02-2004, 02:27 PM
come on can someone help me plz

havoc!
08-02-2004, 02:30 PM
just use a wrapper I got the same error too

o0oO
08-02-2004, 06:19 PM
isnt this a wrapper?

havoc!
08-02-2004, 08:46 PM
yeah but for some people it wont load use wrapgenv2

sebadi 04
08-30-2004, 08:00 PM
btw you can make it togglable...

1st of all i am using reference to wrapgen v2, if your not using this source then it may be different!

this is for the whole wh so re-unzip it so its fresh and not tampered with!

open the .dsw, on the bottom left of the workspace go on the "Fileview" tab go to sources>opengl32.cpp. then find the lines


void sys_glShadeModel (GLenum mode)
{
(*orig_glShadeModel) (mode);
}
then replace it with

void sys_glShadeModel (GLenum mode)
{
if (syncwh2004)
{
glDepthFunc(GL_ALWAYS);
}
(*orig_glShadeModel) (mode);
}
you then need to find

void sys_glVertex3fv (const GLfloat *v)
{
(*orig_glVertex3fv) (v);
}
and replace it with

void sys_glVertex3fv (const GLfloat *v)
{
if(GetAsyncKeyState(VK_F12)&1==1)
syncwh2004=!syncwh2004;
(*orig_glVertex3fv) (v);
}
then go to the very top and underneath the line
#include "opengl32.h" put
bool syncwh2004 = false;

now f12 toggles your wh on and off!

forgot to say go to build at the top of the screen and then build opengl32.dll!

Credits to Sync for teachin that to me :laugh:

sync
09-05-2004, 04:47 AM
cheers for nicking the tutorial i made for you. :speechles

Forgot credits to Pat0 for Wallhack Code <-

agrasurfer
10-01-2004, 08:56 AM
thanks n1 tut

tuna
10-30-2004, 02:43 AM
Here's my code



#include <windows.h>

#include <gl/gl.h>

#include <gl/glu.h>

#include <gl/glaux.h>

//Now we will need to set the dll entry point, this is done through DllMain:

BOOL __stdcall DllMain(HANDLE hInst, DWORD dwReason, LPVOID lpReserved)

{

if (dwReason == DLL_PROCESS_ATTACH)

{

//

}

return TRUE;

}

/*
void __stdcall NEWglBegin( GLenum mode )

{

glBegin(mode);

if(mode == GL_TRIANGLE_STRIP)

{

glDisable(GL_DEPTH_TEST);

}

}
*/


My .def file looks the same as the one in this tutorial. When I compile it, I get a 216 kb .dll Once I paste this file into cs's folder, the background for cs loads, but then everything becomes non-responsive....what's at fault here? (No errors/warnings with compilation)

Thanks!

edit: Actually, my .def file has glBegin, and not glBegin=NEWglBegin since I have it commented out(for debugging) in my main.cpp

wav
11-01-2004, 05:49 AM
Go here

http://www.mirc-scripts.de/pn/html/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=1

Pepper
12-18-2004, 08:10 AM
Hi, this is my first post here.

Ive followed this tutorial and it dosent seem to work:

First i put the dll in C:\Programfiler\Valve\Steam\SteamApps\xero_pepp@hotmail.com\counter-strike\gldrv

and wrote into drvmap.txt

Nothing happend (I also did all the stuff the tutorial said)

Then i tried putting dll into

C:\Programfiler\Valve\Steam\SteamApps\xero_pepp@hotmail.com\counter-strike\

Just makes CS Freeze.

Anyone got any solutions?

mtower00769
12-18-2004, 08:12 PM
can sum 1 tell me how to add tha libraries in visuial studio 2 003 :ninja:

panzer
12-19-2004, 04:29 AM
pragma comment (lib "pewp.lib") or project settings > linker > input > additional dependencies

TuPLaD
12-25-2004, 06:08 PM
doesnt work at me, get a big ass error


--------------------Configuration: main - Win32 Debug--------------------
Linking...
opengl32.def : error LNK2001: unresolved external symbol glAccum
opengl32.def : error LNK2001: unresolved external symbol glAlphaFunc
opengl32.def : error LNK2001: unresolved external symbol glAreTexturesResident
opengl32.def : error LNK2001: unresolved external symbol glArrayElement
opengl32.def : error LNK2001: unresolved external symbol glBegin
opengl32.def : error LNK2001: unresolved external symbol glBindTexture
opengl32.def : error LNK2001: unresolved external symbol glBitmap
opengl32.def : error LNK2001: unresolved external symbol glBlendFunc
// & it goes like that for all def's =)
Debug/main.lib : fatal error LNK1120: 360 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
Error executing link.exe.

main.exe - 362 error(s), 0 warning(s)

r00tg04t
12-26-2004, 03:43 AM
It seems that u have missed opengl.lib :square-ey

#pragma comment(lib,"OpenGL32.lib")

CouchPotato
12-26-2004, 11:16 AM
It seems that u have missed opengl.lib :square-ey

#pragma comment(lib,"OpenGL32.lib")
Who the hell forgets to pragma comment the opengl lib?

r00tg04t
12-26-2004, 02:15 PM
Who the hell forgets to pragma comment the opengl lib?
TuPlaD

s0beit
05-22-2005, 12:17 PM
sorry if this is OLD.

and i mean old, BUT....

i placed this in my "Half-Life\gldrv" directory....and it doesnt seem do do anything.

not crash, or hang, or hack :S

my drvmap look slike this:


Default Default
gldrv/3dfxgl.dll 3Dfx Mini Driver
gldrv/opengl32.dll WHERE is leet

my code looks like this:


#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>

BOOL __stdcall DllMain(HANDLE hInst, DWORD dwReason, LPVOID lpReserved)

{

if (dwReason == DLL_PROCESS_ATTACH)

{

}

return TRUE;

}

void __stdcall NEWglBegin( GLenum mode )

{
if(mode == GL_TRIANGLE_STRIP)

{

glDisable(GL_DEPTH_TEST);

}

glBegin(mode);

}

(no compile errors)

Bad HAL 9000
05-22-2005, 12:22 PM
put it in your half-life folder (Or Counter-Strike if you are using it for CS on steam) not the gldrv folder

s0beit
05-22-2005, 12:32 PM
put it in your half-life folder (Or Counter-Strike if you are using it for CS on steam) not the gldrv folder
so you dont use steam? ;)

anyways...

this would be the half-life/cstrike folder?
(ill have tested before you reply :P )

EDIT: i tried the hl.exe folder before, it says "Error initialzing GL driver"

Bad HAL 9000
05-24-2005, 04:02 AM
wtf, no, i said Half-Life folder, or Counter-Strike

not half-life/cstrike read my fucking posts

Pollux
06-12-2005, 03:01 AM
When I compile the dll i get 0 errors , 0 warnings but when i put it into my HL directory and start the game it crashes :( . I did everything like shown in the tutorial and it always crashes hl :scared: . Can somebody tell me why this happens ??

Edit :
Don't bother to answer I fixed it :cool(2):

M@stahh
11-16-2005, 01:13 PM
OK .. i finished now this OpenGL hack .. and testet it, but is this hack now VAC2 undetected ??

overdose
01-11-2006, 12:28 PM
nope..

EliTe.HG
01-28-2006, 06:24 PM
Learn to fucking code before you go around copying and pasting shit into things you have no idea to do... :ermm:

invision
03-08-2006, 10:08 AM
so at risk of being called a necro, this tut rocks, especially when used together with xan's tut over at vd. that said, it doesnt work for me, and im about to open up wrapgen v2 w/engfuncs and see if i can mess around with it, but i did learn alot from this tutorial. i used xan's tutorial to figure out how to use structures, and then added cvars into this. hell, ill go ahead and post what i did for anyone


create a new file called cvars.h
add the cvar struct inside it like so
(this is c+p'able, considering the target audience):

typedef struct
{
int wallhack;//make this cvar for the wallhack if you want //add more if you have more stuff :)
}
cvars_s; //name the struct

now go to main.cpp, and add this with the includes


#include "cvars.h"//tells main to include the cvars header file.

down in your globals:

cvars_s cvar; //now you can address cvars as cvar.whatever

k now go down to your wallhack where it says

if(mode == GL_TRIANGLE_STRIP)
up above that initialize your cvar:

cvar.wallhack = 1;

so now it should look like

cvar.wallhack = 1;
if(mode == GL_TRIANGLE_STRIP)
{ glDisable GL_DEPTH_TEST;
}
almost done :)

alright, change

if(mode == GL_TRIANGLE_STRIP)

to


if(cvar.wallhack && mode == GL_TRIANGLE_STRIP)

edited because i felt dumb after panzer pointed out me being wrong.


hope this helped someone...

panzer
03-08-2006, 10:50 AM
if(cvar.wallhack && mode == GL_TRIANGLE_STRIP)

you should know that cvar.wallhack in that if statement is the same as if(cvar.wallhack == 1)
no it's not! also this is barely a tutorial more like basic programming.

invision
03-08-2006, 10:58 AM
edit::right right, my bad... sorry.


Conditions
A program expresses decisions as tests of conditions.
A bool expressions has either true or false.
Numerical expressions are true when their values are not equal to zero,
otherwise they are false.


gotcha :cool(2):

wav
03-08-2006, 12:00 PM
just use mr. panzers nice gl base with engfuncs.

cyclone02
10-13-2006, 12:16 PM
just wondering guys is there any OpenGL starter kit like that the DirectX starter kit?

Bad HAL 9000
10-13-2006, 01:22 PM
Did you even read the thread you just posted in?

cyclone02
10-14-2006, 08:17 AM
ah yes i did read the post but what i meant was that is there any kit like that of Azorbix's directx kit which has everything predefined so that u dont need to add all the hooks manually you just need to add the hack-code(i have found one now). I have one question though and that is: Is it possible to make a base by combinig both the directx kit and the opengl wrapgen? so that i can use both DirectX and OGL in my hack.

ridder
10-15-2006, 12:18 PM
when i compiling this code i'm having error check this out



1>------ Build started: Project: lesson1, Configuration: Debug Win32 ------
1>Compiling...
1>Lesson1.cpp
1>c:\documents and settings\constantine\desktop\lesson01\lesson01\les son1.cpp(9) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\Constantine\Desktop\lesson01\Lesson01\Deb ug\BuildLog.htm"
1>lesson1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

phoe
10-15-2006, 03:56 PM
The error is in plain english... you obviously dont have your IDE/enviroment setup properly, so it cant find the header file 'windows.h'.

Also i'm pretty sure you arent allowed to post compile errors, you might want to edit your post before a mod hits you with a ban.

Puma
10-15-2006, 04:44 PM
lol wow....just wow

btw, why the hell are people bumping 7month old threads :s