OpenGL Extensions - Unable to Load

  • Follow


Hi,

I am having this odd problem. I am designing an MFC based graphics
application using OpenGL. I first create rendering context using
wglCreateContext and then make it current by calling wglMakeCurrent
.... with other steps as required for MFC based non-glut application.
However when I try to retrieve addresses for glActiveTextureARB,
glTexImage3DEXT etc. using wglGetProcAddress, I get all addresses as
0x0. However when I try to get these addresses in any of the Nehe's
sample application (just for trial). I get non-null addresses.

Can someone please explain what might be going wrong? Is this got to
do with the way in which OpenGL is initialized, since in MFC example
there is no GLUT initialization and is GLUT actually some background
work to load the relevant dlls?

Any help will be greatly appreciated.

Thanks and regards,
Mandar
0
Reply mandards 5/24/2004 4:24:03 AM

Mandar D. Sahasrabuddhe schrieb:
> Hi,
> 
> I am having this odd problem. I am designing an MFC based graphics
> application using OpenGL. I first create rendering context using
> wglCreateContext and then make it current by calling wglMakeCurrent
> ... with other steps as required for MFC based non-glut application.
> However when I try to retrieve addresses for glActiveTextureARB,
> glTexImage3DEXT etc. using wglGetProcAddress, I get all addresses as
> 0x0. However when I try to get these addresses in any of the Nehe's
> sample application (just for trial). I get non-null addresses.
> 
> Can someone please explain what might be going wrong? Is this got to
> do with the way in which OpenGL is initialized, since in MFC example
> there is no GLUT initialization and is GLUT actually some background
> work to load the relevant dlls?
> 
> Any help will be greatly appreciated.
> 
> Thanks and regards,
> Mandar

On Win32 you may get different extensions for every OpenGL context.
Maybe you requested some context your hardware can't do, so
your context is software-rendered.
Check the extensions string.

Philipp Klaus Krause
0
Reply Philipp 5/24/2004 5:50:56 AM


Philipp Klaus Krause <pkk@spth.de> wrote in message news:<2hdgq0Fb22l2U1@uni-berlin.de>...
> > Can someone please explain what might be going wrong? Is this got to
> > do with the way in which OpenGL is initialized, since in MFC example
> > there is no GLUT initialization and is GLUT actually some background
> > work to load the relevant dlls?
> 
> On Win32 you may get different extensions for every OpenGL context.
> Maybe you requested some context your hardware can't do, so
> your context is software-rendered.
> Check the extensions string.
> 
Hi,

I checked the using glGetString (GL_EXTENSIONS). The output of this
call in MFC based project is just three extensions: GL_WIN_swap_hint
GL_EXT_bgra GL_EXT_paletted_texture. Whereas, when I make the same
call in a glut based project, I get a list of 39 extensions. Same 39
extensions are returned in the
RivaTuner utility for NVIDIA cards. Also "OpenGL Extensions Viewer"
utility by RealTech VR confirms the RivaTuner output. What could be
the possibility for failure to load extensions in MFC application.

Any help is highly appreciated.

Regards,
Mandar
0
Reply ds_mandar 5/24/2004 4:13:23 PM

> Hi,
>
> I checked the using glGetString (GL_EXTENSIONS). The output of this
> call in MFC based project is just three extensions: GL_WIN_swap_hint
> GL_EXT_bgra GL_EXT_paletted_texture. Whereas, when I make the same
> call in a glut based project, I get a list of 39 extensions. Same 39
> extensions are returned in the
> RivaTuner utility for NVIDIA cards. Also "OpenGL Extensions Viewer"
> utility by RealTech VR confirms the RivaTuner output. What could be
> the possibility for failure to load extensions in MFC application.
>
> Any help is highly appreciated.
>
> Regards,
> Mandar

This is MS soft OpenGL renderer.. Im using OpenGL in MFC very easy. I have
OpenGLView
control that derived from CView and override OnDraw (for painting) and
OnCreate fo init OpenGL.


0
Reply yooyo 5/24/2004 4:35:15 PM

> I checked the using glGetString (GL_EXTENSIONS). The output of this
> call in MFC based project is just three extensions: GL_WIN_swap_hint
> GL_EXT_bgra GL_EXT_paletted_texture. Whereas, when I make the same
> call in a glut based project, I get a list of 39 extensions. Same 39
> extensions are returned in the
> RivaTuner utility for NVIDIA cards. Also "OpenGL Extensions Viewer"
> utility by RealTech VR confirms the RivaTuner output. What could be
> the possibility for failure to load extensions in MFC application.

Seems your MFC app uses another pixel format than the Nehe's GLUT app.
0
Reply uwe 5/25/2004 7:31:40 AM

4 Replies
251 Views

(page loaded in 0.548 seconds)

Similiar Articles:













7/28/2012 1:09:22 PM


Reply: