[HOpenGL] GLU.Tessellator crashes

Jules Bean jules at jellybean.co.uk
Fri Mar 13 03:28:36 EDT 2009


Balazs Komuves wrote:
> I found the cause of the crashes. A patch which should solve the problem
> (but changes the API, see below) is attached.

[snip]

> ...but the GLU implementation sets some of those pointers to 0:

How stupid! Good catch.

> Since the vertex annotations are of arbitrary type, there is no default
> value we could supply when GLU gives us zero pointers; thus I changed
> the type WeightedProperties to
> 
>     data WeightedProperties v =
>       WeightedProperties
>         (GLclampf, v)                   
>         (GLclampf, v)                   
>         (Maybe (GLclampf, v))
>         (Maybe (GLclampf, v))
> 
> 
> Maybe some other solution, like WeightedProperties2 ... | 
> WeightedProperties4 ...
> would be better...

Maybe just [(GLclampf, v)] ? The docs could note that the list will in 
practice probably be of length 2 or 4, but most of the situations I can 
imagine you would treat it more uniformly as a list anyway.

Jules


More information about the HOpenGL mailing list