COMPU STRU GRAPHICS
COMPU STRU GRAPHICS CAP 4730
Popular in Course
Popular in System Engineering
This 4 page Class Notes was uploaded by Sierra Gorczany on Friday September 18, 2015. The Class Notes belongs to CAP 4730 at University of Florida taught by Staff in Fall. Since its upload, it has received 27 views. For similar materials see /class/206734/cap-4730-university-of-florida in System Engineering at University of Florida.
Reviews for COMPU STRU GRAPHICS
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/18/15
Jorg s Graphics Lecture Notes 7 2 Basic openGL Programming 1 2 Basic openGL Programming Global state OpenGL is not object oriented It has a global state organized as a treelike stack Via push7 and pop7 separators image GlobStateattributes objects 0 Primitives what shape node points line segments polygons pixels curves Attributes system state how property accum buffer color current depth buffer enable eval fog hint lighting line list pixel mode point polygon polygon stipple scissor stencil buffer texture transform View port 0 2 matrix stacks glMatrixModeGLPROJECTION Viewing projection clipping glMatrixModeGLMODELVIEW Transformation rotate scale trans late 0 events input error handling network connection etc Example g1C1ear g1Color3f ngegin GLPUINTS g1Vertex2va glEnd GLPUINTS glFlush UPENGL 1bufft st Clipping and Viewing volume 0 glOrth0 left right bottom top near far 0 camera always looks down negative zaxis 0 camera Views7 everything in the Viewing volume frustum 7 also objects behind7 the camera 0 glOrth02D left right bottom top glOrtho left right bottom top 1 1 Jorg s Graphics Lecture Notes 7 2 Basic openGL Programming 2 figme mum 50 GLUT organizes interaction With X Windows input devices Xlibth see gluth o glutlnitWindowSizeO How large is the Window Note image may be smaller than Window Chpplng wmdnw VIEW39parL Gxaphm wmdnw o glutlm39t WindowPositionO Where on the screen does the image appear 00 upper left 2D Physical device coordinates raster coordinates screen coordi nates vs 3D world coordinates distortion if Width height ratio of gluOrtho glutlnitWindowSize D avoid distortion glViewport ll lly Width height in pixels part of state 7 hence interactive change possib e 7 OpenGL scene Postscript origin lower left I right y up 7 X upper left I right y down 7 ascii upper left 1 down y right landscape Primitives ngeginGLSOMETHlNG glEnd GLPOINTS GLLlNES segments 12 34 vs GLLINESTRIP polyline Polygon simple convex flat triangles Will do Jorg s Graphics Lecture Notes 7 2 Basic openGL Programming simple polygon no holes7 no selfintersections Trouble With nonsimple polygons Scanlme Scanlme a b p1 93 p1 Pa Pp p3 9 Pa P0 0P4 P0 P4 P P4 P0 D P4 39p5 p7 p5 p7 as p7 p P7 5 pa pa 96 pa GL7POINTS GL7POLYGON GLiQUADS GLiTRlANGLES p1 Pa Ps D7 D1 Pa Ps D7 D1 Pa Ps p7 C po Pz P4 Pa po Pz P4 Pa po Pz P4 Pa GL7POINTS GLiTRIANGLEjTRIP GLiQUADjTRIP Stroke Text7 Raster Text 8 Computer Graphics O a Computer Graphics E S Computer Graphics E E Combnret Qstpqca g i CompuTerllraphics I E n ComputerGraphlcs l soiqdmf Jeqndmoo glPoz39ntSz39ze pixels has screen raster dependence glRasterPos determines the placement Attributes are bound to primitives The binding may change The present attribute values are part of the state of the graphics systeml Jorg s Graphics Lecture Notes 7 2 Basic openGL Programming 4 Color additive subtractive colors Green Yellow Blue Yellow 9quot WW Magema Green m Red Red 0 an 0 an P y y Black Bl Yello White Magenta a b B glCol0rrgb glClearColorrgba 224 colors 1280 X 1024 pixels With 24 bits KGB a gt 4 220 bytes 4MB Color gamut Hue Saturation lntensity model lookup table old Event Processing 0 Immediate mode primitive is rendered as soon as de ned Present system state determines appearance 0 disappears too fast77 0 glutMaz39nLoop eventprocessing loop displays current until interupted o glutDisplay func display callback called initially When moving Windows etcl
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'