-
关注Ta
-
- 注册时间 2007-07-11
- 最后登录 2020-04-06
-
- 发帖526
- 在线39小时
- 精华0
- DB636
- 威望110
- 保证金0
- 桃子0
- 鲜花0
- 鸡蛋0
-
访问TA的空间加好友用道具
|
|
bool zoom;
void APIENTRY my_glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar ) { if(zoom) // Zoom In Code { glFrustum(-1.000001,1.000001,-1.000001,1.000001,4.000000,4096.000000); } else { glFrustum(left,right,bottom,top,zNear,zFar); } } |
Happy zooming ^^ |
Thnx for the code, but this is the probb, im using pGL hackBase, and it doesnt have a glfrustum function so i Hooked it in " |
#define PTR_CREATE(glPtr) FARPROC pOrig_##glPtr; //--- PTR_CREATE(glFrustum) |
and |
void ApplyOpenGLHook (FARPROC* pProc,LPCSTR lpProcName) { HOOK_APPLY(glFrustum) |
and |
bool StoreOffsets( void ) { bool pResult = true; //--- PTR_STORE(glFrustum) |
and this is the code: |
void __stdcall APIENTRY pHooked_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { if(zoom && GetAsyncKeyState(VK_END)) // Zoom In Code { glFrustum(-1.000001,1.000001,-1.000001,1.000001,4.000000,4096.000000); } else { glFrustum(left,right,bottom,top,zNear,zFar); }
__asm { push zFar push zNear push top push bottom push right push left call dword ptr [pOrig_glFrustum] |
|
|