







































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of using new opengl functionality, including the need for wglgetprocaddress() and libraries like glew and glee. It also covers the history of opengl, from its origins in the late 1980s to the present, and discusses various topics such as particle systems, point sprites, vertex buffer objects, and more. Students and researchers in computer graphics, computer science, and related fields will find this information useful for understanding the evolution and capabilities of opengl.
Typology: Study notes
1 / 47
This page cannot be seen from the preview
Don't miss anything!








































โ Get latest drivers for your videocard โ (^) (www.nvidia.com or ati.amd.com) โ Get the latest glext.h โ (^) (http://www.opengl.org/registry/api/glext.h) โ At run time use wglGetProcAddress() void* wglLoadExtension(char* name) { void* result = wglGetProcAddress(name); if(!result) { printf("Extension %s could not be loaded.\n", name); } return result; }
โ You need wglGetProcAddress for all new functions declared after OpenGL 1. โ Other libraries can handle this for you โ (^) GLEW (OpenGL Extension Wrangler) โ GLEE (OpenGL Easy Extension Library)
โ (^) Late 1980s : Silicon Graphics IrisGL - SGI hardware dependent โ (^) 1992 : OpenGL 1.0 - Open standard โ (^) Standard is governed by the OpenGL ARB (architecture review board) : โ (^) Microsoft, SUN, SGI, nVidia, ATI, etc. โ (^) 1997 : OpenGL 1.1 - texture objects and vertex arrays. โ (^) 1998 : OpenGL 1.2 - 3d textures, new blending equations โ (^) 2001 : OpenGL 1.3 - cube maps, multitexturing โ (^) 2002 : OpenGL 1.4 - Automatic mipmap generation, depth textures โ (^) 2003 : OpenGL ES - embedded systems โ (^) 2003 : OpenGL 1.5 - vertex and fragment programs, occlusion query โ (^) 2004 : OpenGL 2.0 - GL shading language, non-power-of-2 textures, point sprites โ (^) August 2006 : OpenGL 2.1 - GLSL changes. โ (^) Fall 2006 โ the Khronos group becomes the governing body for OpenGL โ (^) 2006 Plans for OpenGL 3.0 (codename โLong Peaksโ) and OpenGL 4.0 (codename โMt. Evansโ) announced โ (^) 2008 : OpenGL 3.0 specification finalized
โ OpenGL 1.3 : Cube Map Textures,Multisample Antialiasing โ OpenGL 1.4 : Automatic Mipmap generation, Depth Textures โ OpenGL 1.5 : Vertex Buffer Objects, Occlusion Query โ OpenGL 2.0 : Programmable Shading (GLSL), Multiple Render Targets, NPOT textures, Point Sprites โ OpenGL 2.1 : Pixel Buffer Objects โ EXT : Frame Buffer Objects, Anisotropic texture filtering, Floating point textures
โ Particle Systems โ (^) Point Sprites โ Vertex Buffer Object โ Environment Mapping (reflections) โ (^) Cube mapping โ Frame buffer object โ Mesh Rendering โ Occlusion Query โ MSAA
โ Lens flares, blooms โ Imposters โ Particle Systems
โ If r, u are the camera right and up vector โ p is particle position (center) โ h is half height of particle p+ h (r+u) r u p- h (r+u) p+ h (u-r) p+ h (r-u)
โ Constrained to rotate about an axis โ (^) Fixed Up vector โ Determine right vector using cross product โ (^) Right = Up x look
โ (^) Star Trek 2 โ (^1983) William Reeves Particle Systems
Given vector field v(x,y,z) update particle positions by Or a higher order integration scheme (RK4) See page 560-562 in book. p i ๎ 1 = p i ๎ v i ๎ญ t
โ Rank 2 tensor can be represented as a matrix โ Use this matrix to generate a texture matrix Particles rendered with various texture matrices and wrap modes
โ Alpha Blending glEnable(GL_BLEND) โ (^) Semitransparent (Smoke, Water, Fog) โ (^) glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); โ Additive (Fire, Sparks) โ (^) glBlendFunc(GL_SRC_ALPHA, GL_ONE); โ Depth โ (^) Sort back-to-front โ (^) Expensive for systems with many particles โ Disable Z buffer writes โ (^) glDepthMask(GL_FALSE)
โ Render fully opaque objects first โ Render semitransparent objects (alpha < 1) glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); Back-to-front rendering Front-to-back rendering โ Disabling Z-buffer writes will help, but results won't always be correct