Jump to content
  • Advertisement
Sign in to follow this  
adnankhan

Hooking wglSwapBuffers ?

This topic is 5467 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Quote:
Original post by adnankhan
Do anyone have idea about hooking wglSwapBuffers...

Hooking wglSwapBuffers? That doesn't make sense. Post more information...

Share this post


Link to post
Share on other sites
Okay

I wrote an openGL Wrapper which can take screen shots and Display FPS on games but ever time I have to copy the opengl32.dll to the game directory so that the game shd load my wrapper dll and enable me to take SCs and display FPS.

Now I want to Hook opengl32.dll wglSwapBuffers Function to inject my own Function.

Share this post


Link to post
Share on other sites
Quote:
Original post by DrEvil
What games don't support screen shots and fps displays? Smells like a cheat to me.


Well I am a bit suprised with ur reply.

I never mentioned games not supporting screen shots or displaying FPS.

Let me explain again I wrote an openGL wrapper which works perfectly, Takes screen shots and displays FPS on almost all games of openGL.

I said that I have to copy my wrapper opengl32.dll evertime to the game directory before running a new game so that it shd be loaded instead of the orignal one.
I dont want to copy my wrapper opengl32.dll everytime I run the game.

Now I want to write my wglSwapBuffers Function and when the game runs and loads the openg32.dll I want to replace the orignal wglSwapBuffers with my wglSwapBuffers at runtime and that is Called Hooking.

Now can someone help me ?

Share this post


Link to post
Share on other sites
I don't believe it can be done without copying the DLL. wglSwapBuffers is in opengl32.dll.

Believe me, even the CS hack community has to copy their DLLs, and if those punks can't figure out a way around that, there very likely isn't one.

You can, however, hook wglSwapBuffers from inside the copied opengl32.dll. Do you want to do that instead?

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
I don't believe it can be done without copying the DLL. wglSwapBuffers is in opengl32.dll.

Believe me, even the CS hack community has to copy their DLLs, and if those punks can't figure out a way around that, there very likely isn't one.

You can, however, hook wglSwapBuffers from inside the copied opengl32.dll. Do you want to do that instead?


Well I think I can prove you wrong. I have done it but 2 3 bugs
around and I will soon write an article on it.

It works beautifully on some games like MOHAA and Heavy Metal - FAKK2 but it crashes with Hitman-I. I am working really hard on it when it is finished I will post the article.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!