Using Inventor with OpenGL 2001.08.21. Chapter objectives Create Inventor callback nodes that include calls to the OpenGL Library Explain how Inventor.

Slides:



Advertisements
Similar presentations
Presented by: Stacy C. Lovell. How do we perceive color? Our eyes contain only 3 types of photosentitive cells tuned to three frequencies Red, Green,
Advertisements

OpenGL Course Notes Chapter 2: State Management and Drawing Geometric Objects Jim Mims, Spring 2009.
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
OpenGL Open a Win32 Console Application in Microsoft Visual C++.
OpenGL CMSC340 3D Character Design & Animation. What is OpenGL? A low-level graphics library specification designed for use with the C and C++ provides…
1Introduction A display list is a group of OpenGL commands that have been stored for later execution. Most OpenGL commands can be either stored in a display.
Chapter 2: Graphics Programming
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Building Models modified by Ray Wisman Ed Angel Professor of Computer Science,
1 Building Models. 2 Objectives Introduce simple data structures for building polygonal models ­Vertex lists ­Edge lists OpenGL vertex arrays.
University of Sulaimani - School of Science - Computer Dept.
© 2004, Tom Duff and George Ledin Jr1 Lectures OpenGL Introduction By Tom Duff Pixar Animation Studios Emeryville, California and George Ledin Jr Sonoma.
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
Lab 1: OpenGL Tutorial CS 282. What’s the plan for today? Go over our framework code. Learn some basic OpenGL! Reveal Lab 1 Answer questions.
What is OpenGL? Low level 2D and 3D Graphics Library Competitor to Direct3D (the rendering part of DirectX) Used in: CAD, virtual reality, scientific.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
B3d ¤ fall 2004 Alexander K. Bowman. load tri.abc automatically view object when opened help window easily accessible for inexperienced users reorganized.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
CAP4730: Computational Structures in Computer Graphics Introduction to OpenGL.
System Calls 1.
JOGL in MS Windows GDI – Graphics Device Interface (Windows-specific) OpenGL Lib JOGL Commands GDI Processor Graphics Hardware JOGL Lib.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
UniS CS293 Graphics with Java and OpenGL Textures.
J2ME: M3G/11 Intro to J2ME. Prog. v Objectives: –to introduce M3G; –to start talking about "M3G Chapter 2. An Animated Model" u leave the floor,
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Drawing Basic Graphics Primitives Lecture 4 Wed, Sep 3, 2003.
CS 101: Introduction to Computing Programming picture manipulations Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by.
Introduction to OpenGL and GLUT GLUT. What is OpenGL? An application programming interface (API) A (low-level) Graphics rendering API Generate high-quality.
Week 2 - Wednesday CS361.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Graphics and Procedures Programming Right from the Start with Visual Basic.NET 1/e 5.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
CSE 470: Computer Graphics. 10/15/ Defining a Vertex A 2D vertex: glVertex2f(GLfloat x, GLfloat y); 2D vertexfloating pointopenGL parameter type.
Lecture 3 OpenGL.
CS 450: COMPUTER GRAPHICS PORTRAIT OF AN OPENGL PROGRAM SPRING 2015 DR. MICHAEL J. REALE.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 1: Background Ed Angel Professor of Computer Science, Electrical.
Introduction to Processing CS 4390/5390 Fall 2014 Shirley Moore, Instructor September 3,
 “OpenGL (Open Graphics Library) is a standard specification defining a cross- language cross-platform API for writing applications that produce 2D and.
Ch 2 Graphics Programming page 1 CSC 367 Coordinate Systems (2.1.2) Device coordinates, or screen coordinates (pixels) put limitations on programmers and.
OpenGL-ES 3.0 And Beyond Boston What is EGL? EGL handles: –provides available surface specifications –context management –surface binding –render.
Introduction to OpenGL Programming Jian-Liang Lin 2002.
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Introduction to OpenGL. OpenGL is a low-level graphics library specification. It makes available to the programmer  a small set of geometric primitives.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
More on GLUT Programming Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September 15, 2003.
Chun-Yuan Lin Introduction to OpenGL 2015/12/19 1 CG.
NoufNaief.net TA: Nouf Al-harbi.
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
Chapter 4 -- Color1 Color Open GL Chapter 4. Chapter 4 -- Color2 n The goal of almost all OpenGL applications is to draw color pictures in a window on.
C Programming Chapters 11, . . .
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 17 Animations, Loops.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
Computer Graphics Lecture 5. Graphics Library Graphics Library : There are many graphics library use with program language to draw shape. Example : Graphics.h.
PHP Condtions and Loops Prepared by Dr. Maher Abuhamdeh.
Draw a Simple Object.
Computer Graphics Lecture 33
User Defined Functions
For Loops October 12, 2017.
Starting to draw dealing with Windows which libraries? clipping
Chapter 1: Introduction
The RGB LED.
Introduction to OpenGL
Threads Chapter 5 2/17/2019 B.Ramamurthy.
Threads Chapter 5 2/23/2019 B.Ramamurthy.
Computer Graphics Practical Lesson 7
Still Chapter 2 (Based on Silberchatz’s text and Nachos Roadmap.)
Starting to draw dealing with Windows which libraries? clipping
CSC1401 Manipulating Pictures 2
Presentation transcript:

Using Inventor with OpenGL

Chapter objectives Create Inventor callback nodes that include calls to the OpenGL Library Explain how Inventor uses and affects OpenGL state variables Write a program that combines use of Inventor and OpenGL and uses the SoGLRenderAction Use color index mode

Introduction This chapter –Describes how to combine calls to the inventor and OpenGL libraries in the same window Combine Inventor with OpenGL in several ways –Using SoCallback –Applying a Render Action Inside a GLX Window

OpenGL state variables and Inventor Combine inventor and OpenGL –If Inventor uses the current value of an OpenGL state value and never change it To save and restore OpenGL state –Use the OpenGL pushAttribute() and popAttributes() commands

OpenGL state variables and Inventor

Color-Index Mode Open an X window –Supports OpenGL rendering in either RGB mode or color-index mode –use color-index mode Be sure to load the color map Example –If you are using BASE_COLOR lighting.use the SoColorIndex node to specify the index into the color map

Using an SoCallback Node A typical use of an SoCallback node is to make calls to OpenGL If(action->isOfType(SoGLRenderAction::getClassTypeId()){ … execute rendering code …

Caching Caching saves the result of an operation so that it doesn ’ t need to be repeated Void maycallback(void *myData, SoAction *action) { If(action->isOfType(SoGLRenderAction:getClassTypeId())){ SoCacheElement::invalidate(action->getState()); // make sure this isn ’ t cached // … make OpenGL calls that depend on a global variable … // } // SoCacheElement::invalidate()  to prevent Inventor from automatically creating a cache

Using a Callback Node Inventor : red cube and a blue sphere GL calls to draw a checked “ floor ” //draw the lines that make up // callback routine to render floor the floor,using OpenGL using OpenGL void drawFloor() void myCallbackRoutine(..) { {... … drawFloor(); }...} main( … ) {... SoCallback *mycallback = new SoCallback; myCallback->setCallback(myCallbackRoutine);

Applying a Render Action Inside a GLX Window Example –Creates a GLX window,makes Inventor and OpenGL calls, and then applies a GL render action // draw the lines that make up the floor,using OpenGL void drawFloor() main( … ) { { … … drawFloor(); } … }