[HOpenGL] Runtime error when using blending (on windows XP)

Yann Morvan morvany at cs.tcd.ie
Sun Oct 10 14:23:44 EDT 2004


I indeed went in the wrong direction.
It seems that the problem is in the HOpenGL code that handles extensions.
So far I think I have identified two problems:

-calling wglGetProcAddress was raising an access violation,
 after it returned the proper address for the opengl extension function
 (as compared with the result of similar C code)
 When I use newCString instead of withCString in getProcAddress (in
 Extensions.hs), the problem goes away. But then, when to free it ?
 And what was the exact cause of the problem ?

- In the macro that defines the extension Invoker (in HsOpenGLExt.h),
  it seems that the "dyn_" prefix in the dynamic foreign import call is
  not consistent with opengl dlls symbols. Removing it gets rid of the
  last access violation.

I'll try to incorporate the hacks in HOpenGL and compile it, so far
I've only been copying the problematic bits in a test program to tweak
them.

	Yann




More information about the HOpenGL mailing list