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

Yann Morvan morvany at cs.tcd.ie
Fri Oct 8 16:25:53 EDT 2004


Yes I'm sorry for the lack of details, here is what I could gather.
I am using GHC 6.3 that I compiled from the fptools
distribution that I downloaded from the CVS server whithout specifying any
branch.
It was compiled under windows XP in a cygwin environment, with all the
mingw tools, targeting a mingw environment.
I copied the glut.h from usr/include/GL into usr/local/include/mingw/GL.

Unfortunately I only get a windows XP error window of the type "main.exe
has encountered a problem and needs to close". The error report says the
code of the exception is 0xc0000005 (access violation). I am sorry but I
don't know how to get a more accurate error description.
(I'm reading right now about the -xc RTS option so I might get back to you with a better error).

However the error seems to clearly come from the call to blendEquation,
since the program runs fine when I comment it out.
>From having a look at the binding, my guess is that the call to
hOpenGL_getProcAddress returns a NULL pointer, the reason for that would
be that a configuration problem with the opengl headers and libraries when
I built the package is causing hOpenGL_gpa in HsOpenGL.c to behave oddly.

The thing is I am very confused as to how GHC configures itself when it
comes to the OpenGL headers and libraries. Does it use the headers in
usr/local/include/mingw or usr/include/w32api, does it use the libraries
from lib/w32api, or usr/local/gcc-lib, or the windows dlls, or something
else ?
The opengl32.dll in windows/system32 says it's version 5.1.2600.1106
The registry key for OpenGLDrivers points to atioglxx.dll, I could find 4
on my machine, the one in windows\system32 says it's version 6.14.10.4332,
from Microsoft.

I guess a good start would be to
-know what implementation of OpenGL works best with HOpenGL under windows
-place the corresponding files where fptools will look when configuring
 the build, and prevent it from finding headers that don't match libraries
 and vis versa
-re-build HOpenGL

It would be great if you could help me with the first two steps,
in the meanwhile I'll be trying to figure things out.

	Yann


More information about the HOpenGL mailing list