print double array on openGL window???
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
i have an double array u[100]. this code print "Hello 123" to openGL window, can i print u like this?
static char sbuff[20];
wsprintf(sbuff,"Hello %d",123);
OutText(0,yMax - 10,sbuff,GLUT_BITMAP_8_BY_13);void OutText(float x,float y,char *text,void *font)
{
glRasterPos2f(x,y);
for(int i=0;text[i]!=0;i++)
{
glutBitmapCharacter(font,text[i]);
}
glutPostRedisplay();
} -
i have an double array u[100]. this code print "Hello 123" to openGL window, can i print u like this?
static char sbuff[20];
wsprintf(sbuff,"Hello %d",123);
OutText(0,yMax - 10,sbuff,GLUT_BITMAP_8_BY_13);void OutText(float x,float y,char *text,void *font)
{
glRasterPos2f(x,y);
for(int i=0;text[i]!=0;i++)
{
glutBitmapCharacter(font,text[i]);
}
glutPostRedisplay();
}