View Full Version : orig_glBinTextures ?

03-30-2005, 11:52 AM
I was looking at a source and i saw this line

(*orig_glBindTexture) (target, texture);

Can someone tell me what that line does? I dont know what *orig_glBindTexture does.

03-30-2005, 11:55 AM
:p it's just someone's OpenGL wrapper class :p

03-30-2005, 12:08 PM
yeah, that right. How could you tell...?
It also says in the top thats its a modified opengl wrapper. Is there a place where i can download an orignal wrapper?

03-30-2005, 12:18 PM
because orig_glBindTexture is not defined by the OpenGL API.

OpenSG (OpenSceneGraph) is the closest thing i know of to a unified OpenGL wrapper.

it's not hard to write your own though, and you'll probably learn a thing or two in the process :)

03-30-2005, 12:25 PM
I would really like to write my own!
That would be so much better. And even if i cant write one now atleast i gave it a try. All i need is a link to a tutorial or the name of an e-book that explains me how. Do you happen to know one?

03-30-2005, 12:46 PM
Writing your own is not that hard. At its simplest, it simply means, writing one function for each opengl function. ie glVertex3fv -> myglVertex3fv.

Obviosly, you could retain information about opengl states, lighting, texture modes. Build a whole class hierarchy, if your looking to design your own libraries to manage objects and data.

But why not use a prebuilt package. A scene managment lib will do the heavy work, letting you focus on whats unique about your project:


03-30-2005, 12:46 PM
btw, i looked at opensg, dont know what it is but its an installer??
I need an opengl wrapper (source code) so i can add that to my project in msvc++ and add my own functions in it. Like, i want to try to manipulate the game like remove trees in a game or cars. Not for malicious reasons, not at all. Alot of people told me thats its a really good practise.
So im actually wondering, if i load my dll into a game. Would i really need an opengl wrapgen wrapper to do stuff like making trees disapear and stuff?? Or can i just #include <OpenGLSB.h> and try a code to make it disappear or wont that work at all?

03-30-2005, 12:52 PM
Thanks for the link ill check that out when im back home.
I tried to post this but appently the message wasnt added to this topic so here goes again.
What i really want to do is try to manipulate a game. Not for malicious reasons at all but alot of people told me that its a really good practise to learn the works of OpenGl. What i want to try (as i was adviced) to make a tree ir a car disappear in a game. No matter what game aslong as its opengl based offcourse.
So my question is, do i really need a wrapper for this or could this also be done without one?
Im plannig to create my own dll file (nofx.dll) and load that with the game. So the real OpenGl32.dll gets loaded and nofx.dll gets loaded. Would i be able to do that sort of stuff from my own dll or do i really need to add a wrapper first to nofx.dll?

03-30-2005, 12:57 PM
:) you can't just make a car or tree dissapear in a game (unless you have access to the source code or understand the architecture so you can reverse engineer).

That has nothing to do with OpenGL though.

Why don't you try creating instead of destroying?
Try rendering a tree or a car, that's what OpenGL is all about.

start here: http://nehe.gamedev.net/
and check out the tutorials.

03-30-2005, 01:16 PM
I dont really mean disappear, but you can do some stuff to games if you call some opengl functions like glDisable(GL_DEPTH_TEST) stuff like that.
So do you think i need a wrapper in my project when im gonna create my own dll? Or dont i need one, cause the original OpenGl32.dll also gets loaded.

03-30-2005, 01:29 PM
Originally posted by nofx:
I dont really mean disappear, but you can do some stuff to games if you call some opengl functions like glDisable(GL_DEPTH_TEST) stuff like that.
Unless you wrote the game, you can't.
how will you get the game to load and use your .dll?

03-30-2005, 01:30 PM
I can load my dll into its process with a loader.

03-30-2005, 01:37 PM
are you talking about something like this?

1) that has absolutely nothing to do with OpenGL.

2) you still have to have a knowledge of the
architecture...you can't expect that the game
will link to your .dll and just start executing
those commands at any given moment. How will you know what to interface to in your .dll? what are the routine names? how is the rendering being done? you have no knowledge of this.

I think you're focusing your energy in the wrong way to learn OpenGL, but that's all up to you.

03-30-2005, 10:20 PM
Yes i inject the dll into the games memory. I know i can manipulate the game. Here is an extreme example for games. Wallhacks are made for it. That means that you can see through walls like in Counter strike. Wich isnt open source.
You just have to know what functions to call t o make walls etc disappear.