Introduction to OpenGL Programming Jian-Liang Lin 2002.

Slides:



Advertisements
Similar presentations
Programming with OpenGL - Getting started - Hanyang University Han Jae-Hyek.
Advertisements

OpenGL Course Notes Chapter 1: Introduction Jim Mims.
COMPUTER GRAPHICS SOFTWARE.
Lecture 3 Graphics Pipeline and Graphics Software
Chapter 2: Graphics Programming
Computer Graphics CSCE 441
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
CP411 Computer Graphics, Wilfrid Laurier University Introduction # 1 Welcome to CP411 Computer Graphics 2012 Instructor: Dr. Hongbing Fan Introduction.
Chapter 2 Using OpenGL Chih-Kuo Yeh.  Addison Wesley OpenGL SuperBible 4 th Edition Jun 2007 Author: Richard S. Wright, Jr. Benjamin Lipchak Nicholas.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 1: Background Ed Angel Professor of Computer Science, Electrical.
3D Graphics - Current Technologies Open GLOpen GL (Open Graphics Language) –SGI Silicon Graphics Direct 3DDirect 3D –Microsoft Direct X Technology Java3DJava3D.
Further Programming for 3D applications CE Introduction to Further Programming for 3D application Bob Hobbs Faculty of Computing, Engineering and.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
CMPE 466 COMPUTER GRAPHICS
Programming with OpenGL Part 1: Background Mohan Sridharan Based on slides created by Edward Angel CS4395: Computer Graphics 1.
Introduction to OpenGL Keng Shih-Ling 2003 Spring.
CSE328:Computer Graphics OpenGL Tutorial Dongli Zhang Department of Computer Science, SBU Department of Computer Science, Stony.
Computer Graphics Bing-Yu Chen National Taiwan University.
Programming in OpenGL Ryan Holmes CSE 570 February 12 th, 2003.
CAP4730: Computational Structures in Computer Graphics Introduction to OpenGL.
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
Basic OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, September 10, 2003.
Using OpenGL. 2 What is OpenGL? A software interface to graphics hardware It is a Graphics Rendering API (Application Programmer’s Interface) that is.
UniS CS297 Graphics with Java and OpenGL Introduction.
Linear Interpolation, Brief Introduction to OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September.
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
Using OpenGL in Visual C++ Opengl32.dll and glu32.dll should be in the system folder Opengl32.dll and glu32.dll should be in the system folder Opengl32.lib.
CSC 461: Lecture 41 CSC461: Lecture 4 Introduction to OpenGL Objectives: Development of the OpenGL API OpenGL Architecture -- OpenGL as a state machine.
Graphics Architectures & OpenGL API Introduction Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
UniS CS293 Graphics with Java and OpenGL Introduction.
CS 480/680 Computer Graphics Programming with Open GL Part 1: Background Dr. Frederick C Harris, Jr. Fall 2011.
Graphics Programming using OpenGL. OpenGL is a software interface that allows the programmer to create 2D and 3D graphics images. This interface consists.
2001 by Jim X. Chen: Professor Jim X. Chen Department of Computer Science George Mason University Fairfax, VA
Computer Graphics Tz-Huan Huang National Taiwan University.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
2 COEN Computer Graphics I Introductions n Brad Grantham lecturer lab dude n Dave Shreiner lecturer slave driver.
Programming with OpenGL Part 1: Background
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 1: Background Ed Angel Professor of Computer Science, Electrical.
CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
Computer Graphics I, Fall 2008 Introduction to Computer Graphics.
1. OpenGL/GLU/GLUT  OpenGL v4.0 (latest) is the “core” library that is platform independent  GLUT v3.7 is an auxiliary library that handles window creation,
ROOT Team Meeting October 1 st 2010 GUI thinking and testing ideas OpenGL GUI Root Team meeting 01/10/2010.
CS 4363/6353 OPENGL BACKGROUND. WHY IS THIS CLASS SO HARD TO TEACH? (I’LL STOP WHINING SOON) Hardware (GPUs) double in processing power ever 6 months!
CPSC 453 Tutorial Xin Liu Sep 23, OpenGL An open standard of rendering pipeline A software interface to graphics hardware A useful set of APIs for.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
OpenGL nicole hart csis 4490 khoganson. What is OpenGL? -OpenGL is a hardware independent 2D and 3D rendering and 3D hardware acceleration standard. -OpenGL.
1 Welcome Alireza Moghaddam Humber College Lecture 1 Game 540 Alireza Moghaddam
3D Engine II December 17, computer graphics -dpi.
Programming With OpenGL
Chun-Yuan Lin Introduction to OpenGL 2015/12/19 1 CG.
CS 470 Computer Graphic Getting Started with OpenGL.
NoufNaief.net TA: Nouf Al-harbi.
CGGM Lab. Tan-Chi Ho Introduction to OpenGL.
Computer Graphics Lab 1 OpenGL.
1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.
Lecture 2: Introduction to OpenGL
Lecture 7 Midterm Review. OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Khang Lam Daniel Limas Kevin Castillo Juan Battini
Programming with OpenGL Part 1: Background
Computer Graphics Lecture 32
School of Computer Science
Programming with OpenGL Part 1: Background
Programming with OpenGL Part 1: Background
OpenGL Background CS 4722.
OpenGL-Rendering Pipeline
Presentation transcript:

Introduction to OpenGL Programming Jian-Liang Lin 2002

What is OpenGL? -1 OpenGL is a cross-platform standard for 3D rendering. and software interface to graphics hardware. The OpenGL Architecture Review Board( ARB ), and independent consortium formed in 1992, governs the OpenGL specification. OpenGL routines use the prefix gl.

What is OpenGL? -2 Designed as a hardware-independent interface and implemented on many different hardware platforms. No commands for performing windowing tasks or obtaining user input are included in OpenGL. You must work through whatever windowing system controls the particular hardware you're using.

What is OpenGL? -3 OpenGL doesn't provide high-level commands for describing models of three-dimensional objects. With OpenGL, you must build up your desired model from a small set of geometric primitives. –points, lines, triangles, and polygons …etc.

The Advantages of OpenGL Industry standard Fast Portable Easy to use Well-documented

OpenGL rendering pipeline

Color Models RGBA color –Red, Green, Blue, and Alpha channels –Up to 16M colors Color-indexed –Small numbers of colors accessed by indices from a color lookup table(palette) –8 bits = 256 colors

Basic Features Transformation Materials Lighting & Smooth Shading Texture mapping Depth buffer test (Z-Buffer) Alpha blending Double buffering for animation Pixel operations

OpenGL Buffering -1 OpenGL supports a variety of buffers for advanced rendering –Depended on driver implementation Color buffers –Front-left, front-right, back-left, back-right, and any number of auxiliary buffers Depth buffer –Also known as Z-Buffer for HSR

OpenGL Buffering -2 Alpha buffer –Blending Stencil buffer –To restrict drawing to certain portions of the screen. (basic application) Accumulation buffer –Full scene manipulation

API Hierarchy

OpenGL library -1 SGI’s OpenGL SDK –OpenGL.DLL & GLU.DLL –Open source implementation for hardware vendor reference. –Best software rendering library. –Can be downloaded from SGI’s website.

OpenGL library -2 Microsoft’s implementation –From Win95 OSR2, Microsoft Windows ship with OpenGL32.DLL. –For old Win95 users, you still can download OPENGL95.EXE via Microsoft website. –Header files and import library files are already included in Win32 Platform SDK.

OpenGL library -3 Microsoft’s OpenGL32.DLL applies a hardware accelerated driver registered in Registry. – HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers –You can search it by using REGEDIT.EXE

Mesa Graphics Library A OpenGL clone library. You can use it as using OpenGL. Portable on many OS. You can download it in the following website –

OpenGL Utility Library The OpenGL Utility Library(GLU) provides many of the modeling features, such as quadric surfaces and NURBS curves and surfaces. GLU is a standard part of every OpenGL implementation GLU routines use the prefix glu. – gluLookAt( … ); –…

Windows system related helper library For every window system, there is a library that extends the functionality of that window system to support OpenGL rendering. –X Window System -> GLX –Microsoft Windows -> WGL –IBM OS/2 -> PGL

OpenGL Utility Toolkit -1 The OpenGL Utility Toolkit (GLUT) is a window system-independent toolkit, written by Mark Kilgard, to hide the complexities of differing window system APIs. GLUT routines use the prefix glut. – glutPostRedisplay(); –…

OpenGL Utility Toolkit -2 You can download this toolkit in the following website – We focus on this toolkit.

Programming Environment -1 PC(X86) –OpenGL v1.1 software runtime is included as part of operating system for Win 2000, Windows 98, Windows 95 (OSR2) and Windows NT –Linux, FreeBSD, …other UNIX-like OS can use Mesa graphics library.

Programming Environment -2 SGI workstation –Personal IRIS, Indigo, Indy, Indigo2 O2, –Octane in CGGM Lab. –All with IRIS Operating System and X Window System

Compilers – Microsoft Visual C++ Start a new workspace of Win32 Console application. Add OpenGL32.lib glu32.lib glut32.lib in Projects/Setting/Link/Library modules column for linking

Compilers – Unix-like OS Library files needed –libGL.so, libGLU.so, libglut.a, libX11.a, libX11.so …etc Command line: –gcc [source files] –o [output file] –lglut – lGLU –lGL –lX11 –lm –The ordering of the linking flags is not changeable. –Suggest to write a Makefile.

Where is the reference? OpenGL official site – You refer to OpenGL API documentation in MSDN Library.

How can you start? Choose your platform Get your desire OpenGL related library. Start a GLUT simple program, build and test. Refine the code as you wish. Refer to some reference materials. Consult with TA Feel happy to see the result.

Any Question? ?