Using Graphics Libraries Lecture 3 Mon, Sep 1, 2003 Graphics Libraries Theoretically, with only a function setPixel(x, y, red, green, blue), we could create any graphics image. However, it would be quite tedious.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Using Graphics Libraries
Mon, Sep 1, 2003
setPixel(x, y, red, green, blue),
we could create any graphics image.
int main(int argc, char* argv)
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow(“My Window Title");
where XXX stands for some form of windows interaction (mouse, keyboard, etc.).
glClearColor(0.8, 0.8, 0.8, 0.0); // light gray
glColor3f(0.0f, 0.0f, 0.0f); // black
gluOrtho2D(xmin, xmax, ymin, ymax);
glViewport(0, 0, screenWidth, screenHeight);
gluOrtho2D(xmin, xmax, ymin, ymax)