76 int imageWidth, imageHeight;
77 cairo_surface_t *surface =
NULL;
81 cairo_surface_destroy(surface);
99 glRasterPos2f(
ref.pos.x,
ref.pos.y);
108 glEnable(GL_TEXTURE_2D);
109 glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
110 glBindTexture(GL_TEXTURE_2D,p->
texture->
id);
112 glTexCoord2d(0.0f, 1.0f);glVertex3d(
ref.pos.x,
ref.pos.y,d);
113 glTexCoord2d(1.0f, 1.0f);glVertex3d(
ref.pos.x+w,
ref.pos.y,d);
114 glTexCoord2d(1.0f, 0.0f);glVertex3d(
ref.pos.x+w,
ref.pos.y+h,d);
115 glTexCoord2d(0.0f, 0.0f);glVertex3d(
ref.pos.x,
ref.pos.y+h,d);
119 glDisable(GL_TEXTURE_2D);
unsigned char * glCompLoadPng(cairo_surface_t **surface, const char *filename, int *imageWidth, int *imageHeight)
void glCompDeleteTexture(glCompTex *t)
glCompTex * glCompSetAddNewTexImage(glCompSet *s, int width, int height, const unsigned char *data, bool is2D)