0

what comand is used for printing a text ??

OpenGL programing ..

with GL in front ..

IF ( something is set )
bla bla bla
bla bla bla
print text ( what is the comand )
else
same here ??
GL_printtext .. or something ??

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by bladethebric
0

opengl does not have anything for printing a text. If you are using glut. Then
you can use glutBitmapCharacter function. If not, then there are plenty of libs that
prints fancy texts for you. Go ahead and google it.

0

and can you help me with tihs

void HangMan::Crtki(){
            	int n,n2;
            	char neno[2];
            	GLfloat pom=155;
            	GLfloat pom1=155;
            	n = wordtobeguessed.length();
            	n2 = wordtobeguessed.length();
            	glColor3f(1.0f,0.0f,0.0f);
            	PrintText(100, 10, "ZBOR: ");
            	for(int i=0;i<n;i++){
            		glColor3f(0.0f,1.0f,0.0f);
            		pom+=25;
            		if(wordtobeguessed[i]==' '){PrintText(pom, 10, " ");}
            		else{
            			PrintText(pom, 10, "_");}
            		for(int j=0; j<n2; j++){
            			n=pom[j];
            			if(wordtobeguessed[i]==pom[j]){
            					n= toupper(neno[0]);

            					PrintText(pom, 13, neno);break;
            					}
            		}
            	}glClearColor(1.0,1.0,1.0,1.0);
            	//glEnd();
            };

error c2109 subscript requires array or pointer type

im geting that

on n=pom[j];

line 17 and 18

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.