Re: GLUT.MouseButton

Glynn Clements <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Sven Panne wrote:

> While I'm at it: I really like to hear opinions and improvements of the
> API

Some of the data types should be a little less abstract. E.g. 
TextureName should implement Eq, types which consist solely of nullary
constructurs should implement Enum (and maybe Bounded, Ix);
implementing Show is useful for debugging.

Functions which operate upon arrays (e.g. texImage?D, build?DMipmaps,
scaleImage etc) shouldn't require the user to perform the
[un]marshalling.

> API, e.g. the vertex specification stuff like

I find the current interface to be, in general, an improvement over
C's myriad type-specific variants.

It might be useful to have classes to unify the different types of
"vector" (Vector*, Vertex*, Normal*; maybe TexCoord* and Color*) of a
given dimension; this would allow utility functions (e.g. dot-product)
to work on any of them.

-- 
Glynn Clements <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.