$40 off Craftsman 5 Drawer Homeowner Tool Center with Riser and Parts Bins $99.99 on sale 10/2-10/8
Sears Deal of the Day: Thule Car Top Carrier, Quest

Figure 48
==================
/*
//Author: Cheikh Drame
//To support, please do one of the following
//- Visit irap123.com many times a day
//- Join irap123.com
//- Buy my app irap123 (rhyming dictionary) available for android, and iphone. On windows phone, it is called iLyrics. If not, you can get the desktop version at www.irap123.com/apps/webstore/
//- Include irap123.com in your blogs, forums, facebook walls, email footers, comments
//- send a donation at my paypal address at cbdsigned.vevo@gmail.com
//- Buy a story at http://shop.pparzygnat.com
*/
// PrintText.cpp : Defines the entry point for the console application.
//
#include
#include
#include
const int WIDTH=400, HEIGHT=400;
void printText(std::string s)
{
for(int i=0; s[i]!='\0'; ++i)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, s[i]);
}
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0,0,0);
std::string text[]={"My name is Cheikh Drame",
"I am going to school at Queens College"
};
for(int i=0; i<2; ++i){
glRasterPos2i(20,i*20+20);
printText(text[i]);
}
glFlush();
}
void main(int argc, char**argv)
{
glutInit(&argc, argv);
// glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(WIDTH, HEIGHT);
glutInitWindowPosition(200,100);
glutCreateWindow("sample Prog: Points by irap123.com");
glClearColor(1.0,1.0,1.0,0.0);
gluOrtho2D(0.0, WIDTH, HEIGHT, 0.0);
glutDisplayFunc(display);
glutMainLoop();
}
No comments:
Post a Comment