|
From: CL <clc...@gm...> - 2008-12-17 02:26:37
|
Hi,
I have no knowledge in OpenGL implementation. I google it and someone said:
"glActiveTextureARB and glActiveTexture are the same function, except
that you have to explicitly obtain a pointer for glActiveTextureARB,
and glActiveTexture is supposed to be exposed by the GL implementation
if the implementation exposes OpenGL 1.2 (I believe). So, on
Microsoft's impl, you probably want to use LoadExtension() and
glActiveTextureARB. "
I am using VIA/S3G UniChrome Pro IGP/MMX/SSE.
I believe most new hardware shall have botth glActiveTexture and
glActiveTextureARB implemented ?
Anyway, if getPFN log an error instead of flow an exception, it can
let vpython to run on more old PCs.
On 12/17/08, Bruce Sherwood <Bru...@nc...> wrote:
> David Scherer responds as follows:
>
> >
> > if ( ARB_multitexture = d.hasExtension( "GL_ARB_multitexture" ) ) {
> getPFN( glActiveTexture, d, "glActiveTextureARB" );
}
> >
> This fix can't be right. Either glActiveTextureARB is part of that
> extension, in which case it MUST be present if that name string is present,
> or it isn't, in which case the wrong name string is being tested or the
> wrong function loaded. Or there is a very serious bug in his drivers.
>
> Bruce Sherwood
>
> P.S. What exactly is your graphics hardware/software?
>
> CL wrote:
> Hi Bruce
I have built vpython and found that the following code can fix
> the
problem on my PC:
The first crash is at ShowWindow in display::create()
> in windisplay.cpp
I've modifed it to:
if (!wglMakeCurrent( dev_context,
> gl_context))
WIN32_CRITICAL_ERROR( "wglMakeCurrent failed");
ShowWindow(
> widget_handle, SW_SHOW);
wglMakeCurrent( NULL, NULL );
Look like my video
> driver insist to have wglMakeCurrent called before ShowWindow
The second
> crash is at gl_extensions.cpp
template <class PFN>
void getPFN( PFN& func,
> display_kernel& d, const char* name ) {
func = reinterpret_cast<PFN>(
> d.getProcAddress( name ) );
if (!func)
throw std::runtime_error(
("Unable
> to get extension function: " +
(std::string)name + " even though the
> extension is advertised.").c_str() );
}
When it is loading
> GL_ARB_multitexture
if ( ARB_multitexture = d.hasExtension(
> "GL_ARB_multitexture" ) ) {
F( glActiveTexture );
}
The entry point
> glActiveTexture is not defined in my driver. I believe
it is also not
> defined in most old drivers. Since it is not defined,
an exception is flew.
> The exception is not handled.
I've changed it to:
if ( ARB_multitexture =
> d.hasExtension( "GL_ARB_multitexture" ) ) {
getPFN( glActiveTexture, d,
> "glActiveTextureARB" );
}
After that, it is working fine. Textures are
> not supported, as vpython
seems requires shader extensions in order to
> support
> texture.
------------------------------------------------------------------------------
SF.Net
> email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The
> future of the web can't happen without you. Join us at MIX09 to help
pave
> the way to the Next Web now. Learn more and register
> at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Visualpython-users
> mailing
> list
Vis...@li...
https://lists.sourceforge.net/lists/listinfo/visualpython-users
>
|