Programming with Webgl Part 1: Background Objectives Retained Vs

Total Page:16

File Type:pdf, Size:1020Kb

Programming with Webgl Part 1: Background Objectives Retained Vs Objectives Programming with WebGL •Development of the OpenGL API Part 1: Background •OpenGL Architecture - OpenGL as a state machine CS 432 Interactive Computer Graphics - WebGL as a data flow machine Prof. David E. Breen •Functions Department of Computer Science - Types - Formats •Simple program E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 2 1 2 Retained vs. Immediate Mode Early History oF APIs Graphics • Immediate •IFIPS (1973) formed two committees to - Geometry is drawn when CPU sends it to GPU come up with a standard graphics API - All data needs to be resent even if little changes - Graphical Kernel System (GKS) - Once drawn, geometry on GPU is discarded • 2D but contained good workstation model - Requires major bandwidth between CPU and GPU - Core - Minimizes memory requirements on GPU • Both 2D and 3D • Retained - GKS adopted as IS0 and later ANSI standard - Geometry is sent to GPU and stored (1980s) - It is displayed when directed by CPU •GKS not easily extended to 3D (GKS-3D) - CPU may send transformations to move geometry - Far behind hardware development - Minimizes data transfers, but GPU now needs enough memory to store geometry 3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 4 3 4 PHIGS and X SGI and GL •Programmers Hierarchical Graphics •Silicon Graphics (SGI) revolutionized the System (PHIGS) graphics workstation by implementing the - Arose from CAD community graphics pipeline in hardware (1982) - Database model with retained graphics (structures) •To access the system, application •X Window System programmers used a library called GL - DEC/MIT effort •With GL, it was relatively simple to - Client-server architecture with graphics program three dimensional interactive •PEX combined the two applications - Not easy to use (all the defects of each) E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 5 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 6 5 6 1 OpenGL OpenGL Evolution The success of GL lead to OpenGL (1992), • Originally controlled by an Architectural Review a platform-independent API that was Board (ARB) - Easy to use - Members included SGI, Microsoft, Nvidia, HP, 3DLabs, IBM,……. - Close enough to the hardware to get excellent performance - Now Khronos Group - Focused on rendering - Was relatively stable (through version 2.5) • Backward compatible - Omitted windowing and input to avoid window • Evolution reflected new hardware capabilities system dependencies – 3D texture mapping and texture objects - An immediate mode system, that later added – Vertex and fragment programs retained mode functionality - Allows platform specific features through extensions E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 7 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 8 7 8 Modern OpenGL OpenGL 3.1 (2009) •Performance is achieved by using GPU •Totally shader-based rather than CPU - No default shaders •Control GPU through programs called - Each application must provide both a vertex shaders and a fragment shader •Application’s job is to send data to GPU •No immediate mode •GPU does all rendering •Few state variables •Most 2.5 functions deprecated - deprecate in CS - To mark (a component of a software standard) as obsolete to warn against its use in the future, so that it may be phased out. •Backward compatibility not required E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 9 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 10 9 10 What About Other Low-Level Other Versions Graphics Libraries? • OpenGL ES •Direct3D - Embedded systems - Part of DirectX, Windows-only - Version 1.0 simplified OpenGL 2.1 - Version 2.0 simplified OpenGL 3.1 •Mantle • Shader based - Developed by AMD - Version 3.0 simplified OpenGL 4.3 •Metal • WebGL 1.0 - Developed by Apple - Javascript implementation of ES 2.0 •Vulkan - Supported on newer browsers - “next-gen” OpenGL • OpenGL 4.1 è 4.5 - Added geometry & compute shaders and tessellator - Derived from Mantle E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 11 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 12 11 12 2 OpenGL Architecture A Simple Program (?) Generate a square on a solid background E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 13 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 15 13 15 It used to be easy What happened #include <GL/glut.h> void mydisplay(){ •Most OpenGL functions deprecated glClear(GL_COLOR_BUFFER_BIT); •Made heavy use of state variable default glBegin(GL_QUAD; glVertex2f(-0.5, -0.5); values that no longer exist glVertex2f(-0,5, 0,5); - Viewing glVertex2f(0.5, 0.5); glVertex2f(0.5, -0.5); - Colors glEnd() - Window parameters } int main(int argc, char** argv){ •Current version makes the defaults more glutCreateWindow("simple"); glutDisplayFunc(mydisplay); explicit glutMainLoop(); } •However, processing loop is the same E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 16 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 17 16 17 Execution in Browser Event Loop URL Browser Web Server •Remember that the sample program Web Page HTML specifies a render function which is a JS files JS Engine event listener or callback function - Every program should have a render callback - For a static application we need only execute Application CPU/GPUprogram the render function once - In a dynamic application, the render function can call itself recursively but each redrawing of Framebuffer Canvas the display must be triggered by an event Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 18 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 19 18 19 3 Lack of Object Orientation WebGL Function Format •All versions of OpenGL are not object function name oriented so that there are multiple functions dimension for a given logical function gl.uniform3f(x,y,z) •Example: sending values to shaders -glUniform3f belongs to WebGL canvas x,y,z are float variables -glUniform2i -glUniform3dv •Underlying storage mode is the same gl.uniform3fv(p) p is an array E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 21 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 22 21 22 WebGL constants WebGL and GLSL •Most constants are defined in the canvas •WebGL requires shaders and is based object less on a state machine model than a - In desktop OpenGL, they were in #include files data flow model such as gl.h •Most state variables, attributes and •Examples related pre-3.1 OpenGL functions have -desktop OpenGL been deprecated • glEnable(GL_DEPTH_TEST); •Action happens in shaders -WebGL • gl.enable(gl.DEPTH_TEST) •Job of application is to get data to GPU -gl.clear(gl.COLOR_BUFFER_BIT) Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 23 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 24 23 24 GLSL •OpenGL Shading Language Programming with OpenGL •C-like with Part 2: Complete Programs - Matrix and vector types (2, 3, 4 dimensional) - Overloaded operators - C++ like constructors •Similar to Nvidia’s Cg and Microsoft HLSL •Code sent to shaders as source code •WebGL functions compile, link and get information to shaders E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 25 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 26 25 26 4 Objectives Coding in WebGL •Build a complete first program •Example: Draw a square - Introduce shaders - Each application consists of (at least) two files - Introduce a standard program structure - HTML file and a JavaScript file •Simple viewing •HTML - Two-dimensional viewing as a special case of - describes page three-dimensional viewing - includes utilities •Initialization steps and program structure - includes shaders •JavaScript - contains the graphics code E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 27 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 28 27 28 Coding in WebGL Square Program •Can run WebGL on any recent browser - Chrome - Firefox - Safari - Edge •Code written in JavaScript •JS runs within browser - Use local resources Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 29 Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 29 30 WebGL square.html <!DOCTYPE html> •Five steps <html> <script id="vertex-shader" type="x-shader/x-vertex"> - Describe page (HTML file) #version 300 es in vec2 aPosition; • request WebGL Canvas void main() • read in necessary files { gl_Position = vec4(aPosition, 0.0, 1.0); - Define shaders (HTML file) } • could be done with a separate file (browser dependent) </script> <script id="fragment-shader" type="x-shader/x-fragment"> - Compute or specify data (JS file) #version 300 es precision mediump float; - Send data to GPU (JS file) out vec4 fColor; - Render data (JS file) void main() Application { fColor = vec4( 1.0, 1.0, 1.0, 1.0 ); } </script> Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 31 32 5 Old square.html Shaders <!DOCTYPE html> <html> • We assign
Recommended publications
  • (POSIX®)— Part 1: System Application Program Interface (API) [C Language]
    International Standard ISO/IEC 9945-1: 1996 (E) IEEE Std 1003.1, 1996 Edition (Incorporating ANSI/IEEE Stds 1003.1-1990, 1003.1b-1993, 1003.1c-1995, and 1003.1i-1995) Information technology—Portable Operating System Interface (POSIX®)— Part 1: System Application Program Interface (API) [C Language] Sponsor Portable Applications Standards Committee of the IEEE Computer Society Adopted as an International Standard by the International Organization for Standardization and by the International Electrotechnical Commission Published by The Institute of Electrical and Electronics Engineers, Inc. Abstract: This standard is part of the POSIX series of standards for applications and user interfaces to open systems. It defines the applications interface to basic system services for input/output, file system access, and process management. It also defines a format for data interchange. When options specified in the Realtime Extension are included, the standard also defines interfaces appropriate for realtime applications. When options specified in the Threads Extension are included, the standard also defines interfaces appropriate for multithreaded applications. This standard is stated in terms of its C language binding. Keywords: API, application portability, C (programming language), data processing, information interchange, open systems, operating system, portable application, POSIX, programming language, realtime, system configuration computer interface, threads POSIX is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc. Quote in 8.1.2.3 on Returns is taken from ANSI X3.159-1989, developed under the auspices of the American National Standards Accredited Committee X3 Technical Committee X3J11. The Institute of Electrical and Electronics Engineers, Inc. 345 East 47th Street, New York, NY 10017-2394, USA Copyright © 1996 by the Institute of Electrical and Electronics Engineers, Inc.
    [Show full text]
  • Depth Buffer Test
    Computer Graphics – OpenGL – Philipp Slusallek History: Graphics Hardware • Graphics in the ‘80ies – Framebuffer was a designated memory in RAM – „HW“: Set individual pixels directly via memory access • Peek & poke, getpixel & putpixel, … • MDA ('81: text only but 720x350 resolution, monochrome, 4 kB of RAM!) – Character code was index into bit pattern in ROM for each character • CGA ('81: 160x200: 16 colors w/ tricks; 320x200: 4 col; 640x200: 2 col) • EGA ('85: 640x350: 16 from 64 col, CGA mode) • VGA ('90: 640x480: 16 col @ table with 2^18 col, 320x200: 256 col), with BIOS extension – Everything done on CPU • Except for driving the display output History: Graphics Hardware (II) • Today (Nvidia Ampere Flagship GA 102, RTX 3090) – Discrete graphics card via high-speed link • e.g. PCIe-4.0 x16: up to 64 GB/s transfer rate – Autonomous, high performance GPU (more powerful than CPU) • 10,496 SIMD processors • Up to 24GB of local GDDR6X RAM (A6000: 48 GB, x2 via NVLink) • 936 GB/s memory bandwidth • 35.6 TFLOPS 16bit floats • 35.6 TFLOPS single precision (SP) + ? TFLOPS doubles (DP) • 35.6/142/284/568 TFLOPS in FP32/16/Int8/4 via 328 Tensor Cores (RTX) • 20? GigaRays/s, 84 RT Cores • Dedicated ray tracing HW unit (BVH traversal & tri. interpol & intersect) • Total of 28.3 Billion transistors at 350 Watt – Performs all low-level tasks & a lot of high-level tasks • Clipping, rasterization, hidden surface removal, … + Ray Tracing • Procedural geometry, shading, texturing, animation, simulation, … • Video rendering, de- and encoding, deinterlacing, … • Full programmability at several pipeline stages • Deep Learning & Matrix-Multiply (sparse x2): Training and Inference Nvidia GA102 GPU History: Graphics APIs • Brief history of graphics APIs – Initially every company had its own 3D-graphics API – Many early standardization efforts • CORE, GKS/GKS-3D, PHIGS/PHIGS-PLUS, ..
    [Show full text]
  • SVG Tutorial
    SVG Tutorial David Duce *, Ivan Herman +, Bob Hopgood * * Oxford Brookes University, + World Wide Web Consortium Contents ¡ 1. Introduction n 1.1 Images on the Web n 1.2 Supported Image Formats n 1.3 Images are not Computer Graphics n 1.4 Multimedia is not Computer Graphics ¡ 2. Early Vector Graphics on the Web n 2.1 CGM n 2.2 CGM on the Web n 2.3 WebCGM Profile n 2.4 WebCGM Viewers ¡ 3. SVG: An Introduction n 3.1 Scalable Vector Graphics n 3.2 An XML Application n 3.3 Submissions to W3C n 3.4 SVG: an XML Application n 3.5 Getting Started with SVG ¡ 4. Coordinates and Rendering n 4.1 Rectangles and Text n 4.2 Coordinates n 4.3 Rendering Model n 4.4 Rendering Attributes and Styling Properties n 4.5 Following Examples ¡ 5. SVG Drawing Elements n 5.1 Path and Text n 5.2 Path n 5.3 Text n 5.4 Basic Shapes ¡ 6. Grouping n 6.1 Introduction n 6.2 Coordinate Transformations n 6.3 Clipping ¡ 7. Filling n 7.1 Fill Properties n 7.2 Colour n 7.3 Fill Rule n 7.4 Opacity n 7.5 Colour Gradients ¡ 8. Stroking n 8.1 Stroke Properties n 8.2 Width and Style n 8.3 Line Termination and Joining ¡ 9. Text n 9.1 Rendering Text n 9.2 Font Properties n 9.3 Text Properties -- ii -- ¡ 10. Animation n 10.1 Simple Animation n 10.2 How the Animation takes Place n 10.3 Animation along a Path n 10.4 When the Animation takes Place ¡ 11.
    [Show full text]
  • Introduction to Computer Graphics with Webgl
    Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science Laboratory University of New Mexico Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 1 Models and Architectures Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 2 Objectives • Learn the basic design of a graphics system • Introduce pipeline architecture • Examine software components for an interactive graphics system Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 3 Image Formation Revisited • Can we mimic the synthetic camera model to design graphics hardware software? • Application Programmer Interface (API) - Need only specify • Objects • Materials • Viewer • Lights • But how is the API implemented? Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 4 Physical Approaches • Ray tracing: follow rays of light from center of projection until they either are absorbed by objects or go off to infinity - Can handle global effects • Multiple reflections • Translucent objects - Slow - Must have whole data base available at all times • Radiosity: Energy based approach - Very slow Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015 5 Practical Approach • Process objects one at a time in the order they are generated by the application - Can consider only local lighting • Pipeline architecture application display program • All steps can be implemented in hardware on the graphics
    [Show full text]
  • Design and Implementation of a 2D Graphics Package In
    - DESIGN AND IMPLEMENTATION OF A 2D GRAPHICS PACKAGE IN ADA 95 By LAN LI Bachelor of Science ZheJiang University HangZhou, China 1987 Submitted to the Faculty of the Graduate College of the Oklahoma State University in partial fulfillment of the requirements for the Degree of MASTER OF SCIENCE December, 1996 - DESIGN AND IMPLEMENTATION OF A 2D GRAPHICS PACKAGE IN ADA 95 Thesis approved: H. ~< 11 - ACKNOWLEDGMENT I express my sincere gratitude to my advisor Dr. George for his constructive guidance, supervision, inspiration and financial support. Without his understanding and support, I could not have accomplished this project. Appreciation also extends to my committee members Dr. Chandler and Dr. Lu, their great help are invaluable when I was in difficult situation. I would also like to thank my husband who always gives me encouragement and support in the background. Thanks my son Eric, who was just born, for sharing my happiness and pain, tolerating my occasional inattention during this project. My special thanks also go to my parents who help me take care of my baby with their tremendous love that give me much time to finish this work. This project is supported by DISA Grant DCA 100-96-1-0007 iii L - TABLE OF CONTENTS Chapter Page 1. Introduction 1 2. Literature Review ..............................................................................•.............3 2.1. A Review of Standard Graphics Packages 3 2.1.1. GKS (Graphical Kernel System) 3 a) Logic3.1 Workstations ., 5 b) Graphics Primitives 6 c) logical Input Devices................................................................•...........•.............. 7 d) Mode of Interaction 7 e) Segmentation .....................................................................................•................. 7 f) Metafile '•...........•................................ 8 2.1.2. PHIGS (Programmer's Hierarchical Interactive Graphics System) 8 a) Graphics Output 9 b) Graphics Inpu.t 10 c) Interaction handling .............................................................................•.•........
    [Show full text]
  • GKS-94 to SVG: Some Reflections on the Evolution of Standards for 2D
    EG UK Computer Graphics & Visual Computing (2015) Rita Borgo, Cagatay Turkay (Editors) GKS-94 to SVG: Some Reflections on the Evolution of Standards for 2D Graphics D. A. Duce1 and F.R.A. Hopgood2 1Department of Computing and Communication Technologies, Oxford Brookes University, UK 2Retired, UK Abstract Activities to define international standards for computer graphics, in particular through ISO/IEC, started in the 1970s. The advent of the World Wide Web has brought new requirements and opportunities for standardization and now a variety of bodies including ISO/IEC and the World Wide Web Consortium (W3C) promulgate standards in this space. This paper takes a historical look at one of the early ISO/IEC standards for 2D graphics, the Graph- ical Kernel System (GKS) and compares key concepts and approaches in this standard (as revised in 1994) with concepts and approaches in the W3C Recommendation for Scalable Vector Graphics (SVG). The paper reflects on successes as well as lost opportunities. Categories and Subject Descriptors (according to ACM CCS): I.3.6 [Computer Graphics]: Methodology and Techniques—Standards 1. Introduction a W3C Recommendation early in 1999. The current (at the time of writing) revision was published in 2010 [web10]. The Graphical Kernel System (GKS) was the first ISO/IEC international standard for computer graphics and was pub- It was clear from the early days that a vector graphics for- lished in 1985 [GKS85]. This was followed by other stan- mat specifically for the web would be a useful addition to the dards including the Computer Graphics Metafile (CGM), then-available set of markup languages.
    [Show full text]
  • Programming with Opengl Part 1: Background
    Programming with OpenGL Part 1: Background CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 Objectives • Development of the OpenGL API • OpenGL Architecture - OpenGL as a state machine - OpenGL as a data flow machine • Functions - Types - Formats • Simple program E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 2 Retained vs. Immediate Mode Graphics • Immediate - Geometry is drawn when CPU sends it to GPU - All data needs to be resent even if nothing changes - Once drawn, geometry on GPU is discarded - Requires major bandwidth between CPU and GPU - Minimizes memory requirements on GPU • Retained - Geometry is sent to GPU and stored - It is displayed when directed by CPU - CPU may send transformations to move geometry - Minimizes data transfers, but GPU now needs enough memory to store geometry 3 Early History of APIs • IFIPS (1973) formed two committees to come up with a standard graphics API - Graphical Kernel System (GKS) • 2D but contained good workstation model - Core • Both 2D and 3D - GKS adopted as IS0 and later ANSI standard (1980s) • GKS not easily extended to 3D (GKS-3D) - Far behind hardware development E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 4 PHIGS and X • Programmers Hierarchical Graphics System (PHIGS) - Arose from CAD community - Database model with retained graphics (structures) • X Window System - DEC/MIT effort - Client-server architecture with graphics • PEX combined the two - Not easy to use (all the defects of each) E. Angel and D.
    [Show full text]
  • Opengl Pipeline Architecture • Understand Immediate Mode Graphics Vs Retained Mode Graphics Opengl Primitives
    Lecture 3: Pipeline Architecture CITS 3003 Graphics & Animation Slides: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Breakdown of Lectures 1. Introduction & Image Formation 15. Computer Viewing 2. Programming with OpenGL 16. Shading 3. OpenGL: Pipeline Architecture 17. Shading Models 4. OpenGL: An Example Program 18. Shading in OpenGL 5. Vertex and Fragment Shaders 1 19. Texture Mapping 6. Vertex and Fragment Shaders 2 20. Texture Mapping in OpenGL 7. Representation and Coordinate 21. Hierarchical Modelling Systems 22. 3D Modelling: Subdivision Surfaces 8. Coordinate Frame Transformations 23. Animation Fundamentals and 9. Transformations and Homogeneous Quaternions Coordinates 24. Skinning 10. Input, Interaction and Callbacks 11. More on Callbacks 12. Mid-semester Test Study break 13. 3D Hidden Surface Removal 14. Mid term-test solution and project discussion 2 Content • Expanding on primitives • Vertex attributes • OpenGL pipeline architecture • Understand immediate mode graphics vs retained mode graphics OpenGL Primitives Recall from a previous lecture… GL_POINTS GL_LINES GL_LINE_STRIP GL_LINE_LOOP GL_TRIANGLES important GL_TRIANGLE_STRIP GL_TRIANGLE_FAN Polygon Issues • Graphics systems like triangles because triangles are: o Simple: edges cannot cross o Convex: All points on a line segment between two points in a polygon are also in that polygon o Flat: all vertices are in the same plane nonsimple polygon nonconvex polygon Polygon Issues (cont.) • If other polygons are used, they are tessellated
    [Show full text]
  • Rapidmind.Pdf
    Rapidmind Background on GPGPU GPU Tutorial • Goal: 3-D image -> 2-D image • 2 main stages: – Convert 3-D coordinates to 2-D windows • Vertex processing – Fill in 2-D windows • Fragment processing Video Video Memory Memory (Textures) (Textures) Final Pixels (Color, Depth) Render-to-texture Shade Shade Fragment Processor Fragment Processor Fragments (pre-pixels) Pipeline GPU Rasterize Rasterize Screenspace triangles Graphics State (2D) Primitives Assemble Primitives Assemble Xformed, Lit Vertices Hardware (2D) Light Light Vertex & Vertex & Transform Transform Processor Processor GPU Vertices (3D) CPU Application Application GPU Parallelism • Parallelism @ vertex and fragment calculations Vertex vp vp vp vp vp vp processors Rasterizer Fragment fp fp fp fp fp fp fp fp fp fp fp fp fp fp fp fp processors Frame buffer GPU Programmability • Vertex and fragment processors can be programmed • Shader = programs written for vertex and fragment calculations • Vertex shaders = transformation, lighting • Fragment shaders = texture, color, fog GPU SIMD • Vertex processors all run SAME shader program • Fragment processor all run SAME shader program Vertex vp vp vp vp vp vp processors Rasterizer Fragment fp fp fp fp fp fp fp fp fp fp fp fp fp fp fp fp processors Frame buffer GPU Drawbacks • No integer data operands • No integer operations – e.g. bit shift, AND, OR, XOR, NOT • No double precision arithmetic • Unusual programming model GPU Improvement • NVIDIA GeForce G80 – unified pipeline and shader • CUDA – Computer Unified Device Architecture • Unified
    [Show full text]
  • Info Iec81714-2{Ed1.0}B.Pdf
    This is a preview - click here to buy the full publication NORME CEI INTERNATIONALE IEC INTERNATIONAL 81714-2 Première édition STANDARD First edition 1998-11 Création de symboles graphiques utilisables dans la documentation technique de produits – Partie 2: Spécification pour symboles graphiques sous forme adaptée à l’ordinateur, y compris symboles pour bibliothèque de références, et prescriptions relatives à leur échange Design of graphical symbols for use in the technical documentation of products – Part 2: Specification for graphical symbols in a computer sensible form, including graphical symbols for a reference library, and requirements for their interchange IEC 1998 Droits de reproduction réservés Copyright - all rights reserved Aucune partie de cette publication ne peut être reproduite ni No part of this publication may be reproduced or utilized in utilisée sous quelque forme que ce soit et par aucun any form or by any means, electronic or mechanical, procédé, électronique ou mécanique, y compris la photo- including photocopying and microfilm, without permission in copie et les microfilms, sans l'accord écrit de l'éditeur. writing from the publisher. International Electrotechnical Commission 3, rue de Varembé Geneva, Switzerland Telefax: +41 22 919 0300 e-mail: [email protected] IEC web site http: //www.iec.ch CODE PRIX PRICE CODE XB Pour prix, voir catalogue en vigueur For price, see current catalogue This is a preview - click here to buy the full publication – 2 – 81714-2 E CEI: 1998 SOMMAIRE Page AVANT-PROPOS . 6 Articles 1 Domaine d’application . 12 2 Références normatives. 12 3 Définitions . 16 4 Marqueurs . 22 4.1 Marqueurs pour points de référence et noeuds de connexions.
    [Show full text]
  • Master Thesis
    Charles University in Prague Faculty of Mathematics and Physics MASTER THESIS Petr Koupý Graphics Stack for HelenOS Department of Distributed and Dependable Systems Supervisor of the master thesis: Mgr. Martin Děcký Study programme: Informatics Specialization: Software Systems Prague 2013 I would like to thank my supervisor, Martin Děcký, not only for giving me an idea on how to approach this thesis but also for his suggestions, numerous pieces of advice and significant help with code integration. Next, I would like to express my gratitude to all members of Hele- nOS developer community for their swift feedback and for making HelenOS such a good plat- form for works like this. Finally, I am very grateful to my parents and close family members for supporting me during my studies. I declare that I carried out this master thesis independently, and only with the cited sources, literature and other professional sources. I understand that my work relates to the rights and obligations under the Act No. 121/2000 Coll., the Copyright Act, as amended, in particular the fact that the Charles University in Pra- gue has the right to conclude a license agreement on the use of this work as a school work pursuant to Section 60 paragraph 1 of the Copyright Act. In Prague, March 27, 2013 Petr Koupý Název práce: Graphics Stack for HelenOS Autor: Petr Koupý Katedra / Ústav: Katedra distribuovaných a spolehlivých systémů Vedoucí diplomové práce: Mgr. Martin Děcký Abstrakt: HelenOS je experimentální operační systém založený na mikro-jádrové a multi- serverové architektuře. Před započetím této práce již HelenOS obsahoval početnou množinu moderně navržených subsystémů zajišťujících různé úkoly v rámci systému.
    [Show full text]
  • Opengl Programming
    Computer Graphics - OpenGL- Hendrik Lensch Computer Graphics WS07/08 – Rendering with Rasterization Overview • Last lecture: – Rasterization – Clipping • Today: – OpenGL Computer Graphics WS07/08 – Rendering with Rasterization Ray Tracing vs. Rasterization • Ray tracing – For every pixel • Locate first object visible in a certain direction – Requires spatial index structure to be fast • Rasterization – For every object • Locate all covered pixels – Uses 2D image coherence but not necessarily an index structure Computer Graphics WS07/08 – Rendering with Rasterization History • Graphics in the ‘80ies – Designated memory in RAM – Set individual pixels directly via memory access • peek & poke, getpixel & putpixel, … – Everything done on CPU, except for driving the display – Dump „frame buffer“ • Today – Separate graphics card connected via high-speed link (e.g. PCIe) • Autonomous, high performance GPU (much more powerful than CPU • Up to 128 SIMD processors, >>80 GB/s memory access • Up to 1GB of local RAM plus virtual memory – Performs all low-level tasks & a lot of high-level tasks • Clipping, rasterization, hidden surface removal, … • Procedural shading, texturing, animation, simulation, … • Video rendering, de- and encoding, deinterlacing, ... • Full programmability at several pipeline stages Computer Graphics WS07/08 – Rendering with Rasterization Introduction to OpenGL • Brief history of graphics APIs – Initially every company had its own 3D-graphics API – Many early standardization efforts • CORE, GKS/GKS-3D, PHIGS/PHIGS-PLUS, ..
    [Show full text]