PDA

View Full Version : Getting RC for GL 3.0 fails.



Amikam
01-10-2009, 08:30 AM
Hi all,
I have Geforce 9500 GT in a computer with Windows Vista 32 Home basic.

I installed Forge 181.20. When trying to get a pointer to wglCreateContextAttribsARB using the line:

PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)wglGetProcAddre ss("wglCreateContextAttribsARB");

I get only 0x0000000000 (after getting the RC of OpenGL 2.1).

What I can do? why is this failure? thanks.

martinsm
01-10-2009, 10:14 AM
181.20 does not support OpenGL 3.0 without NVemulate. Only 181.00 driver does.

See here: http://www.geeks3d.com/?p=3033

Amikam
01-10-2009, 10:42 AM
Doesn't help. Thanks.

glPetr
01-10-2009, 02:04 PM
Hi,

I have also GeForce 9500GT, and bought it because I wanted to try OpenGL 3.0.

On my PC wglCreateContextAttribsARB also failed, but then I found out what to do:
Create OpenGL "Legacy" context using wglCreateContext Then create OpenGL 3 context using wglCreateContextAttribsARB
The problem was in fact without created context, wglGetProcAddress("wglCreateContextAttribsARB") always returned 0, which meant it was impossible to obtain context.

Hope it helps, here it worked with ForceWare 181.2 and enabled GL3 support via NVEmulate.


Petr

Amikam
01-10-2009, 10:32 PM
Hi,
This is what I tried too, and wglGetProcAddress failed.
Maybe it is becasue of Window Vista?
Is it enough in NVEmulate to choose only "Enable OpenGL 3.0/GLSL 1.3 APIs"?

I think that I will have to put here a full example.
The class style CS_OWNDC is good or a problem?

Thanks

glPetr
01-11-2009, 11:08 AM
Hi,

I have Windows XP, SP2 so cannot judge Vista support.
You can check code skeleton here: http://www.jose.it-berater.org/smfforum/index.php?topic=2976.0

It is written in PowerBASIC, window creation is done via Win32 API commands with minimum of PB specific tweaks, so you should not get confused.

If you want, you can PM me with your email address, and I can send you compiled example.

If it will fail, then I am afraid I have no more advice, as this was my first attempt to work with OpenGL 3.0.

If it will run, then you know which source to study :)


Petr

P.S. Yes, enabling that single checkbox is enough
P.P.S. I should have read better your original post to see you did basically the same :)

Amikam
01-11-2009, 02:05 PM
Thanks glPetr! it works!

Amikam
01-11-2009, 02:11 PM
My mistake was that I didn't use wglMakeCurrent for the legacy RC.

glPetr
01-12-2009, 08:05 AM
I am happy it worked for you, now let the OGL3 fun begins :)