/*text rendering functions, depends on a globject to retrieve stats*/
void glCompRenderText(glCompFont * f, glCompObj * parentObj)
{
- static glCompCommon ref;
GLfloat x, y;
if (!f->tex)
return;
x = 0;
y = 0;
- ref = parentObj->common;
+ glCompCommon ref = parentObj->common;
switch (f->justify.HJustify)
{
case glFontHJustifyNone:
GLfloat winZ[400];
GLdouble posX, posY, posZ;
int idx;
- static float comp;
glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
glGetDoublev(GL_PROJECTION_MATRIX, projection);
glReadPixels(x - WIDTH / 2, (int) winY - WIDTH / 2, WIDTH, WIDTH,
GL_DEPTH_COMPONENT, GL_FLOAT, &winZ);
- comp = -9999999;
+ float comp = -9999999;
for (idx = 0; idx < WIDTH * WIDTH; idx++) {
if (winZ[idx] > comp && winZ[idx] < 1)
comp = winZ[idx];
void glCompDrawRectPrism(glCompPoint * p, GLfloat w, GLfloat h, GLfloat b,
GLfloat d, glCompColor * c, int bumped)
{
- static GLfloat color_fac;
- static glCompPoint A, B, C, D, E, F, G, H;
+ GLfloat color_fac;
+ glCompPoint A, B, C, D, E, F, G, H;
GLfloat dim = 1.00;
if (!bumped) {
color_fac = (GLfloat) 1.3;