Structural deformable models
Macros | Functions
glutils.h File Reference
#include <GL/glut.h>
Include dependency graph for glutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GLUT_DISABLE_ATEXIT_HACK
 

Functions

int sglBitmapString (const char *msg, int x, int y, void *font=(void *) GLUT_BITMAP_8_BY_13)
 
int sglBitmapStringOutlined (const char *msg, int x, int y, void *font=(void *) GLUT_BITMAP_8_BY_13)
 

Macro Definition Documentation

#define GLUT_DISABLE_ATEXIT_HACK

Definition at line 4 of file glutils.h.

Function Documentation

int sglBitmapString ( const char *  msg,
int  x,
int  y,
void *  font = (void*)GLUT_BITMAP_8_BY_13 
)
inline

Definition at line 7 of file glutils.h.

Referenced by Brain::drawAllModels(), and sglBitmapStringOutlined().

9 {
10  int width = 0;
11  const char *c = msg;
12  while(*c != 0) {
13  glRasterPos2i(x+width,y);
14  glutBitmapCharacter(font, (int)*c);
15  int w = glutBitmapWidth(font, (int)*c);
16  width += w;
17  c++;
18  }
19  return width;
20 }
int sglBitmapStringOutlined ( const char *  msg,
int  x,
int  y,
void *  font = (void*)GLUT_BITMAP_8_BY_13 
)
inline

Definition at line 22 of file glutils.h.

References sglBitmapString().

Referenced by Node::draw(), and Brain::drawAllModels().

24 {
25  glColor3f(0,0,0);
26  sglBitmapString(msg,x-1,y-1);
27  sglBitmapString(msg,x-1,y+1);
28  sglBitmapString(msg,x+1,y-1);
29  sglBitmapString(msg,x+1,y+1);
30  glColor3f(1,1,1);
31  return sglBitmapString(msg, x, y, font);
32 }
int sglBitmapString(const char *msg, int x, int y, void *font=(void *) GLUT_BITMAP_8_BY_13)
Definition: glutils.h:7