[CSC 315] Running Late
Andrew J. Pounds
pounds_aj at mercer.edu
Thu Dec 1 07:36:55 EST 2022
Student -- I'm having some issues with my transportation this morning
and will be late to class. I am still working on the slides for
lighting and will hopefully get those posted by tomorrow night.
Also, some of you have asked for assistance in getting 2D text on the
screen. The information is in the class notes, but basically you need
some code like this in your display function.
char *charString = malloc(40 * sizeof(char));
glColor3f(1.0, 0.0, 0.0);
sprintf(charString, "ORTHOGRAPHIC");
drawString(15,10,GLUT_BITMAP_HELVETICA_12,charString);
free(charString);
where I also have a function called drawString in my code...
void drawString(GLuint x, GLuint y, void *font, const char* string)
{
const char *c;
glRasterPos2i(x, y);
for(c=string; *c!='\0'; c++)
glutBitmapCharacter(font, *c);
}
--
*/Andrew J. Pounds, Ph.D./*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA 31207 (478) 301-5627/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20221201/3b62f7d5/attachment.html>
More information about the csc315
mailing list