1 / 20

OpenGL

OpenGL. Jorge Cuevas. The Open Graphics Library is a cross-language, multi-platform application-programming interface for rendering 2D and 3D vector graphics developed by Silicon Graphics Inc. (SGI) in 1991. .

yannis
Download Presentation

OpenGL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OpenGL Jorge Cuevas

  2. The Open Graphics Library is a cross-language, multi-platform application-programming interface for rendering 2D and 3D vector graphics developed by Silicon Graphics Inc. (SGI) in 1991.

  3. It is widely used in CAD, virtual reality, scientific visualization, information visualization, flight simulation, and video games. OpenGL is managed by the non-profit technology consortium Khronos Group.

  4. Popularity • Quality of its official documentation. • Openspecification: anyone can download the spec for free as opposed to ISO standards and specifications, which cost money to access.

  5. Typically used to interact with a Graphics processing unit to perform some functions faster than is possible in software running on the general-purpose CPU. • Current release: 4.4 (July 2013)

  6. Designed to be implemented in hardware.

  7. Large glue code repository: • JavaScript binding • WebGL • C bindings, WGL, GLX, and CGL (the C binding provided by iOS, and the Java and C bindings provided by Android)

  8. Platform-independent • Underlying windowing system takes care of obtaining and managing an OpenGL context. • Providing no APIs related to input, audio, or windowing.

  9. Mesa 3D • Open source implementation of OpenGL. • Can do pure software rendering • Can use hardware acceleration on Linux by taking advantage of the Direct Rendering Infrastructure.

  10. 1980s: • Developing software that could function with a wide range of graphics hardware was a real challenge. • Software developers wrote custom interfaces and drivers for each piece of hardware.

  11. 1990s: • SGI was a leader in 3D graphics for workstations with IRIS GL API. • Eventually turned into OpenGl • Transferedcontrol of the OpenGL API standard to the KhronosGroup

  12. Evolution

  13. Writing an OpenGL Application • Pick your language • Initialize OpenGL

  14. Writing an OpenGL Application • 3. Get functions

  15. Using OpenGL

  16. OpenGL Code Sample • import org.lwjgl.opengl.*; • import org.lwjgl.util.glu.*; • import glapp.*; • public class GLApp_Demo_HelloWorld extends GLApp{ • public static void main(String args[]) { • GLApp_Demo_HelloWorld demo = new GLApp_Demo_HelloWorld(); • demo.window_title = "Hello World"; • demo.displayWidth = 640; • demo.displayHeight = 480; • demo.run(); • } • public void setup() • { • } • public void draw() { • GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); • GL11.glMatrixMode(GL11.GL_MODELVIEW); • GL11.glLoadIdentity(); • GLU.gluLookAt( • 0f, 0f, 10f, • 0f, 0f, 0f, • 0f, 1f, 0f); • GL11.glBegin(GL11.GL_TRIANGLES); • GL11.glVertex3f( 0.0f, 1.0f, 0.0f); • GL11.glVertex3f(-1.0f,-1.0f, 0.0f); • GL11.glVertex3f( 1.0f,-1.0f, 0.0f); • GL11.glEnd(); • } • }

  17. Alternativesto OpenGL: • directx • Direct3d • OpenGl • openCl • mantle

  18. OpenGL vs DirectX

  19. THE FUTURE

  20. ?

More Related