From: Jason M. <ko...@gm...> - 2008-08-24 18:21:32
|
Henri Häkkinen wrote: > Here are some general ideas for GLSDK utility libraries. > > What libraries do we need? > > - OpenGL Math Library (GLM, nicknamed 'mathlib') for 3d math, under > development by me... > > - OpenGL Shape Library (GLS, nicknamed 'shapelib') for basic 3d > geometry drawing and perhaps model loading, under development by branan... > > - OpenGL Extension Library (GLE, nicknamed 'extlib') for GL3 context > creation and API loading, under development by korval... > > - texture loading? I know two libraries for this; developer's image > library (devil) and freeimage. > > FreeImage is a C library, but does not have OpenGL look & feel > DevIL is a C library too and has somewhat OpenGL look & feel I tried to use DevIL once, but I was unable to make it work. Also, until litterally yesterday, DevIL hadn't had a release in 2 years. FreeImage seems much more in development. > > I am thinking that we might also want to develop imagelib of our own, > which would just contain entry points that just simple load an image > from a file and return it as GL texture: > > // load image and return it as texture > GLuint gltLoadTexture (const char *filename); > > // load image, convert it to the given format and return as texture > GLuint gltLoadTexture2 (const char *filename, GLenum format); > > // load from a buffer > GLuint gltLoadBuf (const GLvoid *buf, GLsizei size); These loading functions are convenience functions, after all. Whether we internally use FreeImage, DevIL, or libpng directly is not something that should be exposed to the user. That's an implementation detail, and so it should be hidden from the user. > > (the entry point names are debatable) DevIL has some nasties; it does > not return textures directly etc. > > - windowing system abstraction? Candidates; GLUT and GLFW. we could > also choose to implement our own windowlib that woudl integrate into > our GLE. This library would have features for opening windows, > creating simple menu bars, input processing etc. Creating a window with an OpenGL context is the limit of what we should provide. Now, that being said, there is something to be said for being able to handle input to some degree. This is mostly for examples and demos, so it can wait. |