Lecture01-IntroToOpenGL

Lecture01-IntroToOpenGL - CS 455 Computer Graphics...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 455 – Computer Graphics Introduction to OpenGL
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OpenGL A Cross-Platform Graphics Language A library of routines for creating 2-D and 3-D graphics and animation You create a program that makes calls to the OpenGL library to perform the graphics you need. OpenGL uses the machine’s window system for generating output on the screen State oriented - you change state of the system, then that state remains until the next change. You need to link in the appropriate OpenGL libraries to perform the graphics work.
Background image of page 2
Using OpenGL Regardless of platform, it goes something like this: Link to the correct libraries Include the right header files Make the right initialization calls Set up a display function Set the OpenGL machine state.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OpenGL Libraries (in Linux) Several libraries must be linked in -lglut OpenGL Utility libraries -lGLU more OpenGL Utilitiy libraries -lGL OpenGL libraries -lXi X Windows library -lXmu more X Windows libraries Also include the following: -I/usr/X11R6/include -L/usr/X11R6/lib -L/usr/lib Make sure to include #include <GL/glut.h>
Background image of page 4
OpenGL Libraries (in VisualStudio) See http://csf11.acs.uwosh.edu/cs371/visualstudio/ Create a Win32 C++ console application in an empty project. Several libraries must be linked in Add “opengl32.lib glu32.lib glut32.lib” under - Property Pages | all configurations | Linker | Input | Additional dependencies Don’t disable the console window if you plan to write to the console (printf etc): Make sure to include #include <GL/glut.h> Put it before stdlib.h
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OpenGL GLUT functions Utility functions for handling windowing operations glutInit(int *argc, char ** argv) - initializes the system, processes any command line arguments -
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

Lecture01-IntroToOpenGL - CS 455 Computer Graphics...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online