Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: C and Cpp Graphics Getting started with OpenGL Tutorial

Getting started with OpenGL; The first OpenGL program.

Tutorial Details:

Getting started with OpenGL

In this lesson I shall introduce several functions and show you actual OpenGL rendering in a program. Prior to showing you the code, however, I want to go over a few things with you. This will give you a better understanding of what is going on when you do see the code, so you don't stare at the screen wondering what you're looking at. So, on with the show.

Transformations in OpenGL rely on the matrix for all mathematical computations. No, not the movie. Concentrate grasshopper. OpenGL has what is known as a matrix stack, which comes in handy for constructing models composed of many simple objects.

The modelview matrix defines the coordinate system that is being used to place and orient objects. It is a 4x4 matrix that is multiplied by vertices and transformations to create a new matrix that reflects the result of any transformations that have been applied to the vertices. When we want to modify the modelview matrix we use the command glMatrixMode(). We define this as

void glMatrixMode(GLenum mode);
Before you call any transformation commands you MUST specify whether you want to modify the modelview matrix or the projection matrix. The argument for modifying the modelview matrix is GL_MODELVIEW. So the complete line would appear as:


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
C and Cpp Graphics Getting started with OpenGL Tutorial

View Tutorial:
C and Cpp Graphics Getting started with OpenGL Tutorial

Related Tutorials:

Getting started with Java 2D - JavaWorld - July 1998
Getting started with Java 2D - JavaWorld - July 1998
 
3D graphics programming in Java, Part 3: OpenGL
3D graphics programming in Java, Part 3: OpenGL
 
JavaWorld article about JavaCC
JavaWorld article about JavaCC
 
Embed Java code into your native apps - JavaWorld May 2001
Embed Java code into your native apps - JavaWorld May 2001
 
An AI tool for the real world
An AI tool for the real world
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
Navigate through virtual worlds using Java 3D
Navigate through virtual worlds using Java 3D
 
Juggling JOGL
This article introduces the concepts in JOGL, the Java bindings to OpenGL, that are applicable to 2D gaming. We start with the handling of coordinate spaces and how they\'re scaled from the OpenGL world to the screen. Then we integrated JOGL\'s built-in A
 
Excerpt from Apache Axis Live
Excerpt from Apache Axis Live This chapter, "Getting Started with the Apache Axis Project," you will take "a brief look at what Axis is and how it implements some of the SOAP services.
 
Java look and feel icons
These pages contain a collection of toolbar button graphics. The graphics have been designed specifically for use with the Java look and feel. They conform to the Java look and feel Design Guidelines (see the "Designing Button Graphics" section of the "Ap
 
Core Java Data Objects Excerpt
This book excerpt is from Core Java Data Objects,
 
yawiki (Yet Another Wiki)
yawiki (Yet Another Wiki) A wiki system is a perfect place for working together and sharing informations. The syntax for the wiki system is really simple to learn. Getting started with a wiki system is easy.
 
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack
 
JSP Tutorial
This Tutorial is for beginners in the Java Server Pages Technology
 
Getting Started With the Mobile 3D Graphics API for J2ME
This tutorial introduces the Mobile 3D Graphics API for J2ME, JSR 184. The article presents an overview, potential application areas, the differences between JSR 184 and two related APIs, the classes in the new optional package, the programming model, the
 
We are providing Knoppix 3.4 Live Linux CD's
We are providing Knoppix 3.4 Live Linux CD's Knoppix Linux CD's Now Available Linux Knoppix 3.4 CD's What is KNOPPIX? KNOPPIX is a bootable Linux CD with a collection of various GNU/Linux software. It auto-detects hardware and supports many
 
We are providing Knoppix 3.6 Live Linux CD's
We are providing Knoppix 3.6 Live Linux CD's Knoppix Linux CD's Now Available Linux Knoppix 3.6 CD's What is KNOPPIX? KNOPPIX is a bootable Linux CD with a collection of various GNU/Linux software. It auto-detects hardware and supports many
 
Writing your First WAP Application.
Writing your First WAP Application. Tutorial Writing your First Application. N ow it's time to mould your Internet Data for the entire Unwired World! Our "Welcome to Unwired World" application will familiarize you with the WML code. As
 
VolatileBufferedToolkitImage Strategies
Ever wondered what kind of image to use in your application? Or what method to use in creating it? This article attempts to address this challenging topic.
 
Getting Started With the PIM APIs
This article provides a code-intensive introductory tutorial to Personal information management (PIM) APIs, JSR 75.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.