3D Graphics and API with OpenGL

Similar documents
Introduction to OpenGL Transformations, Viewing and Lighting. Ali Bigdelou

Introduction to OpenGL

Graphics Pipeline & APIs

Graphics Pipeline & APIs

API for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3

Outline. Other Graphics Technology. OpenGL Background and History. Platform Specifics. The Drawing Process

Graphics and Computation Introduction to OpenGL

Books, OpenGL, GLUT, GLUI, CUDA, OpenCL, OpenCV, PointClouds, and G3D

CS559: Computer Graphics. Lecture 12: OpenGL Li Zhang Spring 2008

Precept 2 Aleksey Boyko February 18, 2011

Computer graphics MN1

Lecture 4 of 41. Lab 1a: OpenGL Basics

Lecture 2 2D transformations Introduction to OpenGL

Books, OpenGL, GLUT, CUDA, OpenCL, OpenCV, PointClouds, G3D, and Qt

Getting Started. Overview (1): Getting Started (1): Getting Started (2): Getting Started (3): COSC 4431/5331 Computer Graphics.

Computer Graphics Course 2005

OpenGL. 1 OpenGL OpenGL 1.2 3D. (euske) 1. Client-Server Model OpenGL

OpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University

// double buffering and RGB glutinitdisplaymode(glut_double GLUT_RGBA); // your own initializations

GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW

Lectures OpenGL Introduction

Introduction to OpenGL. Prof. Dr.-Ing. Lars Linsen

Introduction to OpenGL

Image Rendering. Rendering can be divided into three sub-problems. Image Formation The hidden surface problem visibility determination steps

Spring 2013, CS 112 Programming Assignment 2 Submission Due: April 26, 2013

CS559: Computer Graphics. Lecture 12: OpenGL Transformation Li Zhang Spring 2008

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

TNCG14 Advanced Computer Graphics Programming 1. OpenGL

Lecture 4 Advanced Computer Graphics (CS & SE )

Computer Graphics. Chapter 10 Three-Dimensional Viewing

OpenGL Tutorial. Ceng 477 Introduction to Computer Graphics

Rendering. Part 1 An introduction to OpenGL

Computer Graphics. Transformations. CSC 470 Computer Graphics 1

OpenGL. Toolkits.

Visualizing Molecular Dynamics

An Interactive Introduction to OpenGL Programming

OpenGL Programming Guide Chapter 1, Introduction to OpenGL 1

cs123 Lab 3 OpenGL Part One 1 Introduction 2 OpenGL Basics 2.2 The Rendering Pipeline 2.1 The CPU and the GPU 2.3 Basic Syntax of OpenGL commands

Understand how real-world lighting conditions are approximated by OpenGL

Transformation, Input and Interaction. Hanyang University

CIS 636 Interactive Computer Graphics CIS 736 Computer Graphics Spring 2011

CS 4204 Computer Graphics

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

Computer Graphics (Basic OpenGL)

Computer graphics MN1

Rendering Pipeline/ OpenGL

Programming using OpenGL: A first Introduction

OpenGL refresher. Advanced Computer Graphics 2012

Introduction to OpenGL

1 (Practice 1) Introduction to OpenGL

VR-programming tools (procedural) More VRML later in this course! (declarative)

Fundamental Types of Viewing

Graphics Programming

Computer Graphics. Bing-Yu Chen National Taiwan University

Scientific Visualization Basics

Advanced Computer Graphics (CS & SE )

ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO EECS 104. Fundamentals of Computer Graphics. OpenGL

yahoo.com

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)

COMP 371/4 Computer Graphics Week 1

C OMPUTER G RAPHICS Thursday

Introduction to Computer Graphics with OpenGL/GLUT

UNIT 7 LIGHTING AND SHADING. 1. Explain phong lighting model. Indicate the advantages and disadvantages. (Jun2012) 10M

2. OpenGL -I. 2.1 What is OpenGL? Things OpenGL can do: -23-

CS4202: Test. 1. Write the letter corresponding to the library name next to the statement or statements that describe library.

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

Computer Graphics. Chapter 3 Computer Graphics Software

Lecture 5: Viewing. CSE Computer Graphics (Fall 2010)

An Interactive Introduction to OpenGL and OpenGL ES Programming. Ed Angel Dave Shreiner

CSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department

OpenGL/GLUT Intro. Week 1, Fri Jan 12

CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013

Lighting. Chapter 5. Chapter Objectives. After reading this chapter, you'll be able to do the following:

Modeling Transform. Chapter 4 Geometric Transformations. Overview. Instancing. Specify transformation for objects 李同益

Graphics Programming. August 31, Programming of the Sierpinski gasket. Programming with OpenGL and C/C++

Pearce Outline. OpenGL Background and History. Other Graphics Technology. Platform Specifics. The Drawing Process

5.2 Shading in OpenGL

Information Coding / Computer Graphics, ISY, LiTH. OpenGL! ! where it fits!! what it contains!! how you work with it 11(40)

to OpenGL Introduction Pipeline Graphics pipeline OpenGL pipeline OpenGL syntax Modeling Arrays Conclusion 1 Introduction Introduction to OpenGL

Lecture 2 CISC440/640 Spring Department of Computer and Information Science

Introduction to OpenGL

Computer Graphics. Making Pictures. Computer Graphics CSC470 1

Shading in OpenGL. Outline. Defining and Maintaining Normals. Normalization. Enabling Lighting and Lights. Outline

Basic Graphics Programming

Cameras (and eye) Ideal Pinhole. Real Pinhole. Real + lens. Depth of field

12. Selection. - The objects selected are specified by hit records in the selection buffer. E.R. Bachmann & P.L. McDowell MV 4202 Page 1 of 13

C++ is Fun Part 13 at Turbine/Warner Bros.! Russell Hanson

Computer graphics MN1

COMS 4160: Problems on Transformations and OpenGL

Exercise 1 Introduction to OpenGL

Computer Graphics. OpenGL

Computer graphic -- Programming with OpenGL 2

Shading and Illumination


Teacher Assistant : Tamir Grossinger Reception hours: by - Building 37 / office -102 Assignments: 4 programing using

Computer Graphics. Chapter 7 2D Geometric Transformations

OpenGL Transformations

Basic Graphics Programming

OpenGL. White Square Code 11/4/09. OpenGL. OpenGL. OpenGL

Computer Graphics, Chapt 08

Transcription:

3D Graphics and API with OpenGL Human-Centered CAD Lab. 29-3-3

Contents 3D Graphics API & OpenGL Interactive Computer Graphics Example of OpenGL Programming Preparatory Simple code GLUT Functions Transformation Matrix Matrix Manipulation Other Settings 2

3D Graphics API & OpenGL () 3D Graphics = modeling + rendering + animation A model is a computer representation of an object Rendering is the process of creating an image from a model Animation is the process of generating repeated renderings of a scene Graphics API(Application Programming Interface) We need interfaces to the graphics acceleration hardware. The most popular 3D modeling technique is polygon or triangular mesh The set of vertices/polygons enters the rendering pipeline Two best-known interfaces are OpenGL and DirectX. 3

3D Graphics API & OpenGL (2) What is OpenGL? OpenGL is an acronym for Open Graphics Library OpenGL Architecture Review Board (ARB) Version 2. released on August 2, 26 Most Widely Adopted Graphics Standard Easy-to-use / Well-documented High Visual Quality and Performance Portable/Reliable/Stable/Scalable Low-level graphics commands Platform-independent graphics API. UNIX, Linux, Windows9X/NT/2/XP, OS/2, MacOS, BeOS, etc. 4

3D Graphics API & OpenGL (3). What can we do with OpenGL? Modeling Primitives Drawing Curve/Surfaces Colors and Shading Lights and Shadows Texture mapping Fog / Anti-aliasing Blending / Transparency And So many things. 5

Interactive Computer Graphics () Problem Specification 3D Objects 2D Shaded image World Space Light Sources Y 3D Objects Z x y View Point or Camera Screen X World Coordinate Space 6

Interactive Computer Graphics (2) 3D Objects to 2D image Clipping 2 3 Projection 4 Model Transformation Viewport mapping 7

Interactive Computer Graphics (3) Transformation Matrix 3D coordinate transformation 3D coordinate 4D homogeneous coordinate rotate/translate/scale/project is represented by 4x4 matrix All transformation is implemented by multiplying matrices 8 y x cos sin sin cos y x y x cos sin sin cos y x y x b a y x b a y x y x Some Studies in 2D

Interactive Computer Graphics (4) 9 h zh yh xh z y x Homogeneous Coordinates 33 32 3 3 23 22 2 2 3 2 3 2 a a a a a a a a a a a a a a a a 4x4 Transformation Matrix Scaling / Reflection / Shearing / Rotation Translation Perspective transformation Global Scaling z y x s s s z y x t t t cos sin sin cos x sh Translation Rotation (about z-axis) Scaling Mirroring (about yz-plane) Shearing

Interactive Computer Graphics (5) Vertex transformation for each step in OpenGL Transformation Viewport Division Perspective Matrix Projection Matrix ModelView c c c c c c c c c c e e e e O O O O w / z w / y w / x w z y x w z y x w z y x Original Vertex Transformed Eye coordinates Clip coordinates Normalized Device coordinates Window coordinates Most geometric transformation Most geometric transformation 4x4 Matrix Multiplication 4x4 Matrix Multiplication

Interactive Computer Graphics (6) Lighting Color of point calculated with material property, normal vector, position of light Ambient Light Diffuse Light Specula Light Diffuse Light Specular Light

Interactive Computer Graphics (7) Rasterization Scan Conversion of a line and a triangle Lighting Scan Converting Hidden Surface Removal Texture Mapping Benefits of the texture-mapping Hidden Surface Removal with Z-buffer method 2

Interactive Computer Graphics (8). Standard 3D Graphics Pipeline Model Coord. World Coord. View Coord. Lighting Projection Frustum Culling Normalized Device Coord. ViewPort Rasterization OpenGL is.. Parallel process of geometric primitives and image data State Machine / Z-buffer & Gouraud Shading Modeling Transformation Trivial Accept/Reject Lighting Viewing Transformation Position of Object Position of Sight DB Traversal Clipping Divide by w, map to 3D viewport Rasterization Display 3

Preparatory () Needs for OpenGL programming Device driver for Hardware acceleration of OpenGL nvidia / ATI graphic card drivers Development Toolkit (IDE) Microsoft Visual Studio6,.NET 23,.NET25 OpenGL Programming Environment header(.h) / library(.lib) Header files : gl.h, glu.h, glaux.h, glut.h Library files : opengl32.lib, glu32.lib, glut32.lib (by Microsoft) opengl.lib, glu.lib, glut.lib (by SGI) Microsoft natively supports OpenGL From Windows 98/NT4., but NOT include GLUT 4

Preparatory (2) OpenGL Command Syntax About 3 functions. All of functions has a prefix gl Ex) gltranslate3f() All of variables has a prefix GL_ Ex) GL_LIGHTING Suffix C++ type OpenGL Type Definition glcolor3f prefix type Command # of parameter <Example> glcolor3b glcolor3i glcolor3f glcolor3d glcolor4f glcolor4fv b signed char GLbyte s short GLshort i long GLint, GLsizei f float GLfloat, GLclampf d double GLdouble, GLclampd ub unsigned char GLubyte, GLboolean us unsigned short GLushort ui unsigned long GLuint, GLenum, GLbitfield 5

Preparatory (3). OpenGL related Libraries OpenGL Utility library (GLU) Prefix glu OpenGL Programming Guide Auxiliary library (AUX) Prefix aux OpenGL Utility Toolkits (GLUT) Prefix glut glulookat(); auxsolidbox() glutsolidcube() by Mark J. Kilgard, Silicon Graphics, Inc. High-level Graphics Library Open Inventor OpenGL Performer, OpenGL Optimizer.etc 6

Simple code () Chunk of OpenGL code #include <whateveryouneed.h> main() { InitializeAWindowPlease(); glclearcolor (.,.,.,.); glclear (GL_COLOR_BUFFER_BIT); glcolor3f (.,.,.); glortho(.,.,.,., -.,.); } glbegin(gl_polygon); glvertex3f (.25,.25,.); glvertex3f (.75,.25,.); glvertex3f (.75,.75,.); glvertex3f (.25,.75,.); glend(); glflush(); UpdateTheWindowAndCheckForEvents(); 7

Simple code (2) Sample code using GLAUX library #include "windows.h" #include <GL/gl.h> #include <GL/glu.h> #include <GL/glaux.h> void myinit (void) { glclearcolor (.,.,.,.); } void CALLBACK display(void) { glclear (GL_COLOR_BUFFER_BIT); glcolor3f (.,.,.); glbegin(gl_polygon); glvertex3f (.25,.25,.); glvertex3f (.75,.25,.); glvertex3f (.75,.75,.); glvertex3f (.25,.75,.); glend (); void CALLBACK myreshape(glsizei w, GLsizei h) { glmatrixmode(gl_projection); glloadidentity(); glortho(.,.,.,., -.,.); glmatrixmode(gl_modelview); } int main(int argc, char** argv) { auxinitdisplaymode (AUX_SINGLE AUX_RGB); auxinitposition (,, 5, 5); auxinitwindow ("Smooth Shading"); myinit(); auxreshapefunc (myreshape); auxmainloop(display); return ; } } glflush (); 8

Simple code (3). Drawing Objects Create vertices glvertex2s(2, 3); glvertex3d(.,., 3.459265); glvertex4f(2.3f,.f, -2.2f, 2.f); Create primitives Point, Line, Triangle, Polygon glbegin(gl_polygon); glvertex2f(.,.); glvertex2f(., 3.); glvertex2f(4., 3.); glvertex2f(6.,.5); glvertex2f(4.,.); glend(); 9

GLUT Functions () Initializing and Exiting a Window -void glutinit(int *argcp, char **argv); -void glutinitdisplaymode(unsigned int mode); -void glutinitwindowsize(int width, int height); -void glutinitwindowposition(int x, int y); -void glutdestroywindow(int win); Loading the Color Map -void glutsetcolor(int cell, GLfloat red, GLfloat green, GLfloat blue); -GLfloat glutgetcolor(int cell, int component); -void glutswapbuffers(void); -void glutstrokecharacter(void *font, int character); Managing Background Process -void glutidlefunc(void (*func)(void)); Running the Program -void glutmainloop(void); 2

GLUT Functions (2). Initializing and Drawing Three-Dimensional Objects -void glutsolidsphere(gldouble radius, GLint slices, GLint stacks); -void glutwiresphere(gldouble radius, GLint slices, GLint stacks); -void glutsolidcone(gldouble base, GLdouble height, GLint slices, GLint stacks); -void glutwirecone(gldouble base, GLdouble height, GLint slices, GLint stacks); -void glutsolidtorus(gldouble innerradius, GLdouble outerradius, GLint nsides, GLint rings); -void glutwiretorus(gldouble innerradius, GLdouble outerradius, GLint nsides, GLint rings); -void glutsolidcube(gldouble size); -void glutwirecube(gldouble size); -void glutsoliddodecahedron(void); -void glutwiredodecahedron(void); -void glutsolidoctahedron(void); -void glutwireoctahedron(void); -void glutsolidtetrahedron(void); -void glutwiretetrahedron(void); -void glutsolidicosahedron(void); -void glutwireicosahedron(void); -void glutsolidteapot(gldouble size); -void glutwireteapot(gldouble size); Handling Window and Input Events -void glutreshapefunc(void (*func)(int width, int height)); -void glutkeyboardfunc(void (*func)(unsigned char key, int x, int y)); -void glutmousefunc(void (*func)(int button, int state, int x, int y)); 2

Transformation Matrix () General Transform Command glmultimatrix*() function - 4x4 matrix multiplication The order of transformation is important glmatrixmode(gl_modelview); glloadidentity(); glmultmatrixf(n); glmultmatrixf(m); glmultmatrixf(l); glbegin(gl_points); glvertex3f(v); glend(); Transformation result = N ( M ( L v) = N M L v Rotate and translate 22 Translate and rotate

Transformation Matrix (2) Matrix Mode ModelView matrix mode [GL_MODELVIEW] Transform object position (change local coordinate) glmatrixmode(gl_modelview); glloadidentity(); Projection matrix mode [GL_PROJECTION] Matrix for 2D projection Define the viewing volume glmatrixmode(gl_projection); glloadidentity(); 23

Transformation Matrix (3) Modeling Transform [GL_MODELVIEW] 3 routine for modeling transform in OpenGL gltranslate*(), glrotate*(), glscale*() gltranslate*() glrotate*() glscale*() 24

Transformation Matrix (4) Viewing Transform [GL_MODELVIEW] 2 routine for viewing transform in OpenGL gltranslate*(), glrotate*() Initial state of viewing vs. modeling coord. 25 gltranslatef(.,., -5.);

Transformation Matrix (5) Viewing Transform [GL_MODELVIEW] glufunction to define the viewing transform easily void glulookat( GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz ) 26

Transformation Matrix (6) Projection Transform [GL_PROJECTION] Viewing volume is determined by view coordinate So must be called in Projection Matrix mode void glortho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar ) void glfrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble znear, GLdouble zfar) orthogonal projection using glortho() perspective projection using glfrustum() 27

Transformation Matrix (7) Projection Transform [GL_PROJECTION] glufunction to define viewing volume easily void gluperspective( GLdouble fovy, GLdouble aspect, GLdouble znear, GLdouble zfar) Perspective viewing volume using gluperspective() 28

Transformation Matrix (8). Viewport Transform Mapping the projected image to the 2D window May expect distortion from different aspect ratio Can use multiple viewport Distortion from difference between the aspect ratios of viewing volume and window ** MUST change the aspect ratio of viewing volume to fit with that of window 29

Matrix Manipulation () Push/Pop Matrix To draw several objects with hierarchy, we must save transformation matrix of previous step assembly #n: sub-assembly #ni: assembly #n+: A N M A N M L A N M glpushmatrix(); glmultimatrix(l); DrawSubAssy(n i ); glpopmatrix(); Matrix Stack of ModelView / Projection Matrix Current Matrix Pushed Matrix #n : : Pushed Matrix #2 Current Matrix Pushed Matrix # Pushed Matrix # 3 Modelview Matrix Stack (32, 4*4 Matrix) Projection Matrix Stack (2, 4*4 Matrix)

Matrix Manipulation (2). Example code of Push/Pop Matrix 3 void draw_wheel_and_bolts( ) { long I; draw_wheel( ); for( i = ; i < 5; i++ ) { glpushmatrix( ); glrotatef( 72.*i.,.,. ); gltranslatef( 3.,.,. ); draw_bolt( ); glpopmatrix( ); } } void draw_body_and_wheel_and_bolts ( ) { draw_car_body( ); glpushmatrix( ); gltranslatef( 4,, 3 ); // move to first wheel s draw_wheel_and_bolts( ); glpopmatrix( ); glpushmatrix( ); gltranslatef( 4,, -3 ); // move to second wheel s draw_wheel_and_bolts( ); glpopmatrix( );... // move to last wheels }

Other Settings () Color RGBA mode Set red, green, blue, alpha values as float (. ~.) Ex).,.,. red,.5,.5,.5 gray Using glcolor*() function Ex) glcolor4f(.f,.f,.f,.f); Color Indexed mode Set index of color as color-lookup-table Using glindex*() function Can specify your own color-table Ex) auxsetonecolor(), glutsetoncolor() RGBA mode is widely used. 32

Other Settings (2) Lighting Determine the color of the object at final 2D raster graphic Using gllight*() function GL_AMBIENT / GL_DIFFUSE / GL_SPECULAR 33 w= Directional light w= Positional light GLfloat light_ambient[] = {.,.,.,. }; GLfloat light_diffuse[] = {.,.,.,. }; GLfloat light_specular[] = {.,.,.,. }; GLfloat light_position[] = {.,.,.,. }; gllightfv(gl_light, GL_AMBIENT, light_ambient); gllightfv(gl_light, GL_DIFFUSE, light_diffuse); gllightfv(gl_light, GL_SPECULAR, light_specular); gllightfv(gl_light, GL_POSITION, light_position); glenable(gl_lighting); glenable(gl_light); GLfloat light_ambient[] = {.2,.2,.2,. }; GLfloat light_diffuse[] = {.,.,.,. }; GLfloat light_specular[] = {.,.,.,. }; GLfloat light_position[] = { -2., 2.,.,. }; GLfloat spot_direction[] = { -., -.,. }; gllightfv(gl_light, GL_AMBIENT, light_ambient); gllightfv(gl_light, GL_DIFFUSE, light_diffuse); gllightfv(gl_light, GL_SPECULAR, light_specular); gllightfv(gl_light, GL_POSITION, light_position); gllightf(gl_light, GL_CONSTANT_ATTENUATION,.5); gllightf(gl_light, GL_LINEAR_ATTENUATION,.5); gllightf(gl_light, GL_QUADRATIC_ATTENUATION,.2); gllightf(gl_light, GL_SPOT_CUTOFF, 45.); gllightfv(gl_light, GL_SPOT_DIRECTION, spot_direction); gllightf(gl_light, GL_SPOT_EXPONENT, 2.); glenable(gl_light);

Other Settings (3) Double buffering to avoid flickering void glclearcolor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) // define default color buffer in RGBA mode void glclearindex( GLfloat index ) // define default color buffer in color-index mode void glcleardepth( GLclampd depth ) // depth. ~. void glclearstencil( GLint s ) void glclearaccum(glfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) void glclear( GLbitfield mask ) // initialize frame buffer as default // mask GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT, GL_ACCUM_BUFFER_BIT void gldrawbuffer( GLenum mode ) // define color buffer to draw // default single buffer mode : GL_FRONT double buffer mode : GL_BACK void glutswapbuffers(); //MUST SwapBuffer after draw an object in double-buffering mode Graphics Pipe-line Graphics Pipe-line (Front) Color Buffer# Color Buffer#2 (Back) glutswapbuffers(); (Back) Color Buffer# Color Buffer#2 (Front) 34

Other Settings (4). Sample code using double-buffering #include "windows.h" #include <GL/gl.h> #include <GL/glu.h> #include <GL/glaux.h> void myinit (void) { glclearcolor (.,.,.,.); } void CALLBACK display(void) { glclear (GL_COLOR_BUFFER_BIT); } glcolor3f (.,.,.); glbegin(gl_polygon); glvertex3f (.25,.25,.); glvertex3f (.75,.25,.); glvertex3f (.75,.75,.); glvertex3f (.25,.75,.); glend (); glflush (); auxswapbuffers(); void CALLBACK myreshape(glsizei w, GLsizei h) { glmatrixmode(gl_projection); glloadidentity(); glortho(.,.,.,., -.,.); glmatrixmode(gl_modelview); } int main(int argc, char** argv) { auxinitdisplaymode (AUX_DOUBLE AUX_RGB); auxinitposition (,, 5, 5); auxinitwindow ("Smooth Shading"); myinit(); auxreshapefunc (myreshape); auxmainloop(display); return ; } ** Compare with 8 Page 35

Useful Site for OpenGL OpenGL Manual Page http://www.opengl.org/documentation/specs/man_pages/h ardcopy/gl/html/ OpenGL Utility Toolkit (GLUT) API http://www.opengl.org/documentation/specs/glut/spec3/sp ec3.html OpenGL FAQ and Troubleshooting Guide http://www.opengl.org/resources/faq/technical/ Forum (Tutorial & Sourcecode) http://nehe.gamedev.net/ http://www.codeguru.com/ 36