Introduction to OpenGL. OpenGL is a low-level graphics library specification. It makes available to the programmer  a small set of geometric primitives.

Slides:



Advertisements
Similar presentations
OpenGL Course Notes Chapter 2: State Management and Drawing Geometric Objects Jim Mims, Spring 2009.
Advertisements

© 2004, Tom Duff and George Ledin Jr1 Lectures OpenGL Introduction By Tom Duff Pixar Animation Studios Emeryville, California and George Ledin Jr Sonoma.
© red ©
OpenGL (Graphics Library) Software Interface to graphics software Allows to create interactive programs that produce color images of moving 3D objects.
OpenGL (I). What is OpenGL (OGL)? OGL is a 3D graphics & modeling library Can also use it to draw 2D objects.
1 Lecture 6 Attributes of graphical primitives Colors Colors in OpenGL Algorithms for scan-conversion.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
JOGL in MS Windows GDI – Graphics Device Interface (Windows-specific) OpenGL Lib JOGL Commands GDI Processor Graphics Hardware JOGL Lib.
COS 397 Computer Graphics Assoc. Prof. Svetla Boytcheva AUBG 2013 COS 397 Computer Graphics Practical Session №1 Introduction to OpenGL, GLFW and CG.
Basic OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, September 10, 2003.
Drawing Basic Graphics Primitives Lecture 4 Wed, Sep 3, 2003.
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
Triangulation Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
Computer Graphics CS 385 January 31, Fractals Some definitions Object which is self-similar at all scales. Regardless of scale the same level of.
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 Figures are extracted from Angel's book (ISBN x) The Human Visual System vs The Pinhole camera Human Visual System Visible Spectrum Pinhole.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Computer Graphics Bing-Yu Chen National Taiwan University.
Lecture 2: Some definitions of terms 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
1 Welcome Alireza Moghaddam Humber College Lecture 1 Game 540 Alireza Moghaddam
CA 302 Computer Graphics and Visual Programming Lecture 2: Introduction to OpenGL Aydın Öztürk
Programming With OpenGL
Chun-Yuan Lin Introduction to OpenGL 2015/12/19 1 CG.
IPC Notes Light & Color. The colors of light that we see are the colors of light that an object reflects towards our eyes. ex) blue jeans absorb all colors.
Colors of Pigment The primary colors of pigment are magenta, cyan, and yellow. [
NoufNaief.net TA: Nouf Al-harbi.
OpenGL: The Open Graphics Language Introduction By Ricardo Veguilla.
NoufNaief.net 1 TA: Nouf Al-Harbi.
Computer Graphics and the Game Industry Speaker: Ted Bisson.
Graphics: Conceptual Model
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
Color in Web Design. Overview: Color Topics Myths & Misconceptions Hexadecimal Notation Color Concepts and Issues.
Chapter 4 -- Color1 Color Open GL Chapter 4. Chapter 4 -- Color2 n The goal of almost all OpenGL applications is to draw color pictures in a window on.
OpenGL: Introduction #include main() { OpenWindow() ; glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0,
Introduction to Graphics Programming. Graphics API.
Introduction to OpenGL (INF 250) Veronika Solteszova et al., UiB Dept. of Informatics,
Introduction to Graphics Programming. Graphics: Conceptual Model Real Object Human Eye Display Device Graphics System Synthetic Model Synthetic Camera.
OpenGL CS418 Computer Graphics John C. Hart. OpenGL Based on GL (graphics library) by Silicon Graphics Inc. (SGI) Advantages: Runs on everything, including.
Computer Graphic. Raster graphics In computer graphics, a raster graphics image, digital image, or bitmap, is a data structure representing a generally.
OpenGL: The Open Graphics Language Technology and Historical Overview By Ricardo Veguilla.
INTRODUCTION TO OPENGL
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
CSC Graphics Programming
The Human Visual System vs The Pinhole camera
Images In Matlab.
Color.
Programming with OpenGL Part 2: Complete Programs
OpenGL (Open Graphics Library) Mr. B.A.Swamy Assistant Professor Dept of CSE.
Basic Graphics Drawing Shapes 1.
Lab 3 Geometric Drawing Lab 3 Geometric Drawing.
Starting to draw dealing with Windows which libraries? clipping
Colour Theories.
Programming Graphic LCD
CSE 113 A January 26 – 30, 2009.
Introduction to OpenGL
Programming Graphic LCD
Primitive Objects Lecture 6 Wed, Sep 5, 2007.
Two ways to discuss color 1) Addition 2) Subtraction
Programming Graphic LCD
Color and Shading Lecture 9 Mon, Sep 26, 2005.
Programming Graphic LCD
What Color is it?.
Programming Graphic LCD
Programming Graphic LCD
January 26 – 30, 2009 CSE 113 B.
Starting to draw dealing with Windows which libraries? clipping
CS297 Graphics with Java and OpenGL
Created for CVCA Physics by Dick Heckathorn 31 May 2K+4
Created for CVCA Physics by Dick Heckathorn 31 May 2K+4
Presentation transcript:

Introduction to OpenGL

OpenGL is a low-level graphics library specification. It makes available to the programmer  a small set of geometric primitives - points, lines, polygons, images, and bitmaps. OpenGL provides a set of commands : that allow the specification of geometric objects in two or three dimensions, using the provided primitives, together with commands that control how these objects are rendered (drawn).

OpenGL Command Syntax OpenGL commands use the prefix gl and initial capital letters for each word making up  the command name For example glClearColor()  Constant: Similarly, OpenGL defined constants begin with GL_, use all capital letters, and use underscores to separate words For example : GL_COLOR_BUFFER_BIT

Data Types Note the following commands glColor3f() and glVertex3f()  In these commands,  3  shows the number of arguments the command contains,  and the f part of the suffix  indicates that the arguments are floating-point numbers.

Command Suffixes and Argument Data Types

Thus, the two commands glVertex2i(1, 3); glVertex2f(1.0, 3.0); are equivalent, except that : –the first specifies the vertex's coordinates as 32-bit integers, –and the second specifies them as single-precision floating-point numbers. CONT.

Setting colors of Objects glColor3f(Red, Green, Blue) glColor3f(0.0, 0.0, 0.0); black glColor3f(1.0, 0.0, 0.0); red glColor3f(0.0, 1.0, 0.0); green glColor3f(1.0, 1.0, 0.0); yellow glColor3f(0.0, 0.0, 1.0); blue glColor3f(1.0, 0.0, 1.0); magenta glColor3f(0.0, 1.0, 1.0); cyan glColor3f(1.0, 1.0, 1.0); white ========================================== glColor3f(0.5, 0.0, 0.0); dark red glColor3f(0.0, 0.5, 0.0); dark green glColor3f(0.0, 0.0, 0.5); dark blue

My first Program Creating Empty window

End