CS320      Lab1 - OpenGL Introduction

Objectives:

  1. Download the lab1 files.  Unzip the jogl folder and use the contents of this folder as the basis for all your projects for this course.  This folder contains jogl.jar, the jogl library files, and some basic classes that will be used in our class examples.

    Copy the Gasket.java file into the jogl directory and open Eclispe. 

    Create a new Java Project in Eclispse and select "Create project from existing source".  Browse for the location of your jogl directory and select the Next button.
    Select the Libraries tab and the Add JARS button. For the JAR selection, select your new project from the menu and the jogl.jar file.  Then select Finish.

    Now that you have your project created we want to run the Gasket program.  It requires, however, the jogl  libraries added to the java library path.  To do this select the Gasket program in the default package and select Run... from the Run menu and select New to create a new launch configuration.  Now, select the Argument tab and under the VM arguments type
        -Djava.library.path=lib

    Click Run and you should see your Sierpinski gasket.
     

  2. Create a project with the file Lab1.java.  This program is incomplete and requires a command line argument which you need to supply.  You enter the command line argument in Eclipse under Program arguments in the run launch.
     
    Complete the Lab1 program so it produces the graphics described in the comments of the code.
    You will need to use the OpenGL primitive types described in section 2.4 of your text.

     

  3. Email your completed Lab1 program to me.