opengl.cpp
find this: Code:
__stdcall glVertex3fv_Hook
add following: Code:
int nAngles=0;
void __stdcall pHooked_glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
{
//---
float angles[3];
nAngles++;
if( nAngles == 4 )
angles[0] = angle;
if( nAngles == 5 )
angles[1] = angle;
if( nAngles == 3 )
{
angles[2] = angle;
angle = 0.0;
}
//---
__asm
{
push x
push y
push z
push angle
call glRotatef
}
next find this Code:
void CheckForOpenGlHook(FARPROC* pProc,LPCTSTR lpProcName)
Go to wglSwapBuffers, and type: Code:
nAngles=0;
example how it should look: Code:
else if (!strcmp(lpProcName, "wglSwapBuffers")){
nAngles = 0; }