OpenGL: The Open Graphics Language Introduction By Ricardo Veguilla.

Slides:



Advertisements
Similar presentations
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
Advertisements

Graphics Pipeline.
David Luebke5/16/2015 Administrivia l Back on track: canceling OpenGL lecture 2 l Assignment 1 –Greg Yukl found an alternate XForms site:
CHAPTER 4 Geometric Transformations: The Pipeline Vivian by Richard S. Wright Jr.
1 Lecture 7 Geometrical Transformations: 2D transformations 3D transformations Matrix representation OpenGL functions.
CSC 461: Lecture 51 CSC461 Lecture 5: Simple OpenGL Program Objectives: Discuss a simple program Discuss a simple program Introduce the OpenGL program.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
OpenGL (II). How to Draw a 3-D object on Screen?
Noggin (BYU Students, SIGGRAPH 2006). Introduction to OpenGL Programming Rick Skarbez, Instructor COMP 575 September 11, 2007.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
OpenGL A Brief Overview. What is OpenGL?  It is NOT a programming language.  It is a Graphics Rendering API consisting of a set of function with a well.
3D coordinate systems X Y Z Right-Hand Coordinate System X Y Z Left-Hand Coordinate System OpenGL uses this! Direct3D uses this!
1 OpenGL Basics A Graphics Standard ©Mel Slater, Anthony Steed
Chapter 4 10 February Agenda Program 2 – Due 2/17 Chapter 4 – transformations GLUT solids.
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
TWO DIMENSIONAL GEOMETRIC TRANSFORMATIONS CA 302 Computer Graphics and Visual Programming Aydın Öztürk
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
Geometric transformations The Pipeline
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
Homogeneous Form, Introduction to 3-D Graphics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 20,
Introduction to OpenGL 1. 2 OpenGL A Graphics rendering API introduced in 1992 by Silicon Graphics Inc Provide the low-level functions to access graphics.
Ch 2 Graphics Programming page 1 CSC 367 Coordinate Systems (2.1.2) Device coordinates, or screen coordinates (pixels) put limitations on programmers and.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Modeling with OpenGL Practice with OpenGL transformations.
UniS CS297 Graphics with Java and OpenGL Basic Definitions.
OpenGL: Introduction Yanci Zhang Game Programming Practice.
Intro to OpenGL Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?
Viewing and Transformation. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture.
CGGM Lab. Tan-Chi Ho 2001 Viewing and Transformation.
David Luebke1/5/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
Chap 3 Viewing and Transformation
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
Lecture 7 Midterm Review. OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture.
OpenGL API 2D Graphic Primitives Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
1 Geometric Transformations-II Modelling Transforms By Dr.Ureerat Suksawatchon.
SPACE SHUTTLE LAUNCHING GUIDE Mis. V.R.PRATIMA Mr. ASWIN KUMAR PUNITH.K PAUL SUDEEP.G Submitted by.
Chapter 1 Graphics Systems and Models Models and Architectures.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSC Graphics Programming Budditha Hettige Department of Statistics and Computer Science.
Introduction to OpenGL (INF 250) Veronika Solteszova et al., UiB Dept. of Informatics,
Computer Graphics I, Fall Programming with OpenGL Part 2: Complete Programs.
CS380 LAB II OpenGL Donghyuk Kim Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
OpenGL: The Open Graphics Language Technology and Historical Overview By Ricardo Veguilla.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Computer Graphics Lecture 34. OpenGL Programming II Taqdees A. Siddiqi
Administrivia Back on track: canceling OpenGL lecture 2 Assignment 1
School of Computer Science
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
Reference1. [OpenGL course slides by Rasmus Stenholt]
OpenGL API 2D Graphic Primitives
Models and Architectures
OpenGL (Open Graphics Library) Mr. B.A.Swamy Assistant Professor Dept of CSE.
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Geometric Transformations
Introduction to OpenGL
Geometric Transformations
Models and Architectures
Models and Architectures
Geometric Transformations
Presentation transcript:

OpenGL: The Open Graphics Language Introduction By Ricardo Veguilla

OpenGL – The Open Graphics Language De facto Application Programming Interface (API) for cross-platform development of 3D graphics applications. Implementations available for all major Operating Systems and hardware platforms. Support for hardware accelerated 3D rendering. Scalable, high-level, easy to use, well documented.

OpenGL - Primitive types

Defining OpenGL primitives glBegin( GL_PRIMITIVE_TYPE) glVertex(…) … glEnd() Block.

Transformation Matrices OpenGL provide 3 transformation matrix stacks: Perspective Matrix – Used for viewing transformations – equivalent to positioning and aiming a camera. Modeling Matrix – Used for modeling transformations – equivalent to positioning and orienting the model to be drawn. Texture Matrix – Used for texture transformations – equivalent to positioning and orienting the texture to be drawn over a polygon.

Transformation functions glLoadIdentity() glTranslate(TYPE x, TYPE y, TYPE z) glRotate(TYPE angle, TYPE x, TYPE y, TYPE z) glScale(TYPE x, TYPE y, TYPE z) glPushMatrix() glPopMatrix()

glLoadIdentity glLoadIdentity() Loads the identity matrix into the current transformation matrix. Used to reset the current transformation matrix before performing a transformation.

Translatoin glTranslate(TYPE x, TYPE y, TYPE z) Multiplies the current transformation matrix by a matrix that moves an object (the local coordinate system) by the given x, y, and z values.

Rotation glRotate(TYPE angle, TYPE x, TYPE y, TYPE z) Multiplies the current transformation matrix by a matrix that rotates an object (or the local coordinate system) in a counter clockwise direction about the ray from the origin through the point (x, y, z). The angle parameter specifies the angle of rotation in degrees.

Scaling glScale(TYPE x, TYPE y, TYPE z) Multiplies the current transformation matrix by a matrix that stretches, shrinks, or reflects and object (or the local coordinate system) along the axes. Each x, y, and z coordinate of every point in the object is multiplied by the corresponding argument x, y, or z.

Controlling the tranformation matrix stacks glPushMatrix() Pushed the current transformation matrix into the stack. glPopMatrix() Loads the matrix at the top of the stack into the current transformation matrix.

OpenGL - Code Example // Set the viewport size glViewport(0, 0, width, height); // Clear the window glClear(GL_COLOR_BUFFER_BIT); // Set the drawing color glColor3f(1.0, 1.0, 1.0); // Start primitive type definition glBegin(GL_POLYGON); // Specify verticies glVertex2f(-0.5, -0.5); glVertex2f(-0.5, 0.5); glVertex2f(0.5, 0.5); glVertex2f(0.5, -0.5); // End primitive type definition glEnd(); // Flush the buffer to force drawing of all objects thus far glFlush();

References: OpenGL - The Industry Standard for High Performance Graphics Jogl – Java OpenGL Bindings Wikipidia – OpenGL