$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 61
=============================
/*
//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
*/
// Shading1.cpp : Defines the entry point for the console application.
//
#include
#include
int width=400, height=300;
void shading2()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1,0,0);
glBegin(GL_QUADS);
glColor3f(0.15,0.15, 0.15); glVertex2i(100,50);
glColor3f(0.4,0.4, 0.4); glVertex2i(200,50);
glColor3f(0.65,0.65, 0.65); glVertex2i(200,100);
glColor3f(0.9,0.9, 0.9); glVertex2i(100,100);
glEnd();
glFlush();
}
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1,0,0);
glColor3f(1,0,0);
glBegin(GL_QUADS);
glColor3f(1,0,0);
glVertex2i(100,50); glVertex2i(100,100);
glColor3f(0,1,0);
glVertex2i(200,100); glVertex2i(200,50);
glEnd();
glColor3f(1,0,0);
glutSolidCube(100);
glFlush();
}
void main(int argc, char**argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB);
glutInitWindowSize(width, height);
glutInitWindowPosition(300,300);
glutCreateWindow("Shading trials by irap123.com");
glClearColor(0,0,0,0);
gluOrtho2D(0, width, height,0);
glutDisplayFunc(display);
glutMainLoop();
}
No comments:
Post a Comment