advertisement

computer graphics at openGL (2)

50 %
50 %
advertisement
Information about computer graphics at openGL (2)
Education

Published on March 1, 2014

Author: YasirAhmedKhan

Source: slideshare.net

Description

computer graphics at openGL
advertisement

Gl_point Two points: #include<GL/glut.h> void display() { glClear(GL_COLOR_BUFFER_BIT); glClearColor(0.0f,0.0f,0.0f,0.0f); glPointSize(10.0f); glBegin(GL_POINTS); glColor3f(1.0,1.0,0.0); glVertex2f(0.0f,0.0f); glVertex2f(0.2f,0.5f); glEnd(); glFlush(); } void main(intargc,char**argv) { glutInit(&argc,argv); glutInitWindowSize(420,320); glutInitWindowPosition(50,50); glutCreateWindow("GL_POINTS Example"); glutDisplayFunc(display); glutMainLoop(); }

Four Points: #include<GL/glut.h> void display() { glClear(GL_COLOR_BUFFER_BIT); glClearColor(0.0f,0.0f,0.0f,0.0f); glPointSize(10.0f); glPointSize(30.0f); glBegin(GL_POINTS); glColor3f(1.0,0.0,0.0); glVertex2f(0.0f,0.2f); glColor3f(1.0,0.0,1.0); glVertex2f(0.0f,0.5f); glPointSize(60.0f); glBegin(GL_POINTS); glColor3f(0.0,1.0,0.0); glVertex2f(0.5f,0.2f); glColor3f(0.0,0.0,1.0); glVertex2f(0.5f,0.5f); glEnd(); glFlush(); } void main(intargc,char**argv) { glutInit(&argc,argv); glutInitWindowSize(420,320); glutInitWindowPosition(50,50); glutCreateWindow("GL_POINTS Example"); glutDisplayFunc(display); glutMainLoop(); }

GL_LINES #include<GL/glut.h> void display(){ glClear(GL_COLOR_BUFFER_BIT); glClearColor(0.0f,0.0f,0.0f,0.0f); glPointSize(100.0f); glBegin(GL_LINES); glColor3f(1.0,0.0,0.0); glVertex2f(0.0f,0.0f); glVertex2f(0.7f,0.5f); glPointSize(100.0f); glBegin(GL_LINES); glColor3f(0.0,1.0,0.0); glVertex2f(-0.2f,0.0f); glVertex2f(-0.7f,0.5f); glEnd(); glFlush(); } void main(intargc,char**argv){ glutInit(&argc,argv); glutInitWindowSize(420,320); glutInitWindowPosition(50,50); glutCreateWindow("GL_LINES Example"); glutDisplayFunc(display); glutMainLoop(); }

#include<GL/glut.h> void display(){ glClear(GL_COLOR_BUFFER_BIT); glClearColor(0.0f,0.0f,0.0f,0.0f); glPointSize(100.0f); glBegin(GL_LINES); glColor3f(1.0,0.0,0.0); glVertex2f(0.5f,0.5f); glVertex2f(-0.5f,0.5f); glPointSize(100.0f); glBegin(GL_LINES); glColor3f(0.0,0.0,1.0); glVertex2f(-0.5f,0.5f); glVertex2f(0.5f,-0.5f); glPointSize(100.0f); glBegin(GL_LINES); glColor3f(1.0,1.0,1.0); glVertex2f(0.5f,-0.5f); glVertex2f(-0.5f,-0.5f); glPointSize(100.0f);

glBegin(GL_LINES); glColor3f(1.0,0.0,1.0); glVertex2f(-0.5f,-0.5f); glVertex2f(0.5f,0.5f); glEnd(); glFlush(); } void main(intargc,char**argv){ glutInit(&argc,argv); glutInitWindowSize(420,320); glutInitWindowPosition(50,50); glutCreateWindow("GL_LINES Example"); glutDisplayFunc(display); glutMainLoop(); }

Add a comment

Comments

fifa coins | 19/10/16
Much thanks! This is definitely an great online site!. fifa coins http://dinahvalentina.webgarden.com/dinahvalentina-s-blog/cheap-fifa-17-coins

Related presentations

Related pages

Computer Graphics with Open GL: Pearson New International ...

Find any digital resource - Pearson eTexts, Lightbook, VitalSource, eBooks, MyLabs, Reader 2.0 & more. Use Fast Shop. Introducing the fast and easy way to ...
Read more

CS 543 - Computer Graphics: OpenGL, Continued

CS 543 - Computer Graphics: OpenGL, Continued by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-)
Read more

Computer Graphics Through OpenGL: From Theory to ...

Sumanta Guha - Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition jetzt kaufen. ISBN: 9781482258394, Fremdsprachige Bücher ...
Read more

Computer Graphics Using OpenGL: Amazon.de: Francis Hill ...

... Computer Graphics Using OpenGL jetzt kaufen. ISBN: 9780131362628, Fremdsprachige Bücher - Web Design Amazon.de Prime testen Bücher ...
Read more

OpenGL | Computer Graphics | Fandom powered by Wikia

... is a specification defining a cross-language cross-platform API for writing applications that produce 3D computer graphics ... OpenGL 2.0 was conceived ...
Read more

OpenGL - The Industry Standard for High Performance Graphics

The Industry's Foundation for High Performance Graphics ... Amazon EC2 Elastic GPUs support OpenGL. ... 2, 4, or 8 gigabytes of ...
Read more

Computer Graphics - OpenGL 3.2 and Later-

Related APIs and Languages • OpenGL ES (3.2) – Embedded subset (used on most mobile devices) – Being better aligned with OGL (subset) • glsl
Read more

Computer Graphics Through OpenGL: From Theory to ...

All the Tools for a Complete Course on Computer Graphics ... Computer Graphics Through OpenGL: ... Chapter 2: On to OpenGL and 3D Computer Graphics: ...
Read more

Computer Graphics Lab 1 OpenGL 1. What is OpenGL? 2.

Presentation on theme: "Computer Graphics Lab 1 OpenGL 1. What is OpenGL? 2."— Presentation transcript:
Read more

Computer Graphics - GBV

Computer Graphics Using OpenGL Third Edition ^r.i F. S. Hill, Jr. and Stephen M. Kelley, Jr. Department of Electrical and Computer Engineering
Read more