GemFAQ
View entire FAQ in full Up to Table of Contentswriting new Gem objects
How do I write a new GEM object?
For the time being, you have to look at the code.
It is fairly well documented and straight forward (if you know C++ and OOP).
Start with an object which is similar to what you want and derive a new class.
The biggest issue right now is how to load in GEM as a DSO/DLL. For SGIs, you will need to setenv LD_LIBRARY_PATH. On NT, you will need to have your path include the directory with GEM.
What are the default OpenGL states?
GemMan (and by association, gemwin) disables alpha testing, alpha blending, culling, and lighting. Lighting defaults to two sided, with GL_COLOR_MATERIAL enabled. The viewport is set to:
float xDivy = (float)m_width / (float)m_height; glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-xDivy, xDivy, -1.0, 1.0, 1.0, 20.0); gluLookAt(0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); glMatrixMode(GL_MODELVIEW); glViewport(0, 0, m_width, m_height);
which gives a range of about -4 to 4 in X and Y at the origin. This is a small range, but changing it now would break a lot of patches.
The specific functions to look at are:
GemMan::windowInit()
GemMan::resetValues()
gemhead::renderGL()
How do i find out the dylib dependencies of a binary?
How do i find out, against which dynamic libraries a certain binary (e.g. the Gem-binary) is linked?
This is not Gem-specific, but i keep forgetting it. So here is the answer:
linux
ldd <binary>
osx
otool -L <binary>
w32
??