| View previous topic :: View next topic |
| Author |
Message |
blackmorpheus Expert Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 159
|
Posted: Fri Oct 24, 2008 11:52 am Post subject: Wrapper. |
|
|
How can i load an OpenGL Wrapper into a game that doesnt have opengl32.dll in it's directory?
How do i load the wrapper into the game?
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Sat Oct 25, 2008 4:03 am Post subject: |
|
|
Just try loading it and Windows will look for it in the path variable also. I suggest you to advice your clients that your program will need OpenGL. You might want to include the redistributable package when distributing the program.
If you want a custom error message eg. on Win32, try LoadLibrary, check the return value and if it fails, throw an error. People usually don't do this, but let the program crash telling the user the default error, which says something like "library opengl32.dll not found." I'd just do 2 different kind of packages:
1) one with everything, your program and the dlls etc.
2) second one with only your program telling the users if they're sure that OpenGL is installed, get this.
|
|
| Back to top |
|
 |
blackmorpheus Expert Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 159
|
Posted: Sun Oct 26, 2008 5:24 am Post subject: |
|
|
Thanks it works
Just have to place my wrapper.dll into the folder of the game and rename it to opengl32.dll
//edit
When i put this opengl32.dll in my folder. The game process starts running, but nothing shows on my screen!
| Code: |
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
void APIENTRY NEWglBegin (GLenum mode)
{
glBegin(mode);
}
|
It should do nothing to the screen, but the screen doesn't show up
|
|
| Back to top |
|
 |
|