PDA

View Full Version : I wonder how, I wonder why...



CyBBe
03-09-2000, 04:19 AM
I wonder how I could do a program-box where I can choose graphics card and resolution, that opens before the game starts, I have a voodoo 2 and I can't use it, irritating...

If anyone knows where I could get these kind of examples...

Hude
03-09-2000, 05:02 AM
The resolution stuff... In widows you would make a dialog for that and then pass the params to your window setup routine.

The Voodoo stuff... First get the OpenGL stuff for Voodoo2 from 3dfx. Rename the dll to opengl32.dll and copy into the same dir with your executable. Works.

CyBBe
03-09-2000, 10:13 AM
Hude, I've heard that "change the name of the dll" before, but noone have ever told me WHICH file to rename...

Hude
03-09-2000, 09:35 PM
Heh, I guess it's 3dfxgl.dll or something like that.

CyBBe
03-10-2000, 09:34 AM
Sorry, don't work, but thanx anyway...

Hude
03-12-2000, 12:52 AM
Well, I had Voodoo2 some time ago and that's how it worked.

rgpc
04-30-2000, 04:15 AM
Apparently (I read a vague reference to it) you can get the standard OpenGL to open 3dfxvgl.dll (that's the file you rename).

HOWEVER... You can (if you feel patient) write a wrapper that uses "LoadLibrary()" and "GetProcAddress()" to load what ever library you choose. Heres a snippit of some code I wrote...

8<-------------------------------------
// A custom type defined for the wglCreateContext function.
typedef HGLRC (WINAPI *CREATECONTEXT)(HDC);

// A variable that becomes the prototype for the wglCreateContext function.
CREATECONTEXT wglCreateContext;

// Get the pointer to the address. The pointer in pGLLibrary is the return from LoadLibrary("3dfxvgl.dll")
wglCreateContext = (CREATECONTEXT)GetProcAddress(pGLLibrary, "wglCreateContext");
8<-------------------------------------

The in my code I call wglCreateContext(hDC); as I would normally.

Hope this helps...

PS. Yes this is time consuming - I suggest only doing it as you need each function. I can send you what I have if you want.