|
From: CL <clc...@gm...> - 2008-12-16 03:14:06
|
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.
|