Archive for February, 2006

Assignment 1

Friday, February 10th, 2006

Assignment 1 is available. There are a few questions to answer and a program to write.

Three-dimensional computer graphics architecture

Monday, February 6th, 2006

This is a pretty good survey paper:

Mitra, T. and Chiueh, T., “Three-Dimensional Computer Graphics Architecture”, Current Science, vol. 78, no. 2, pp. 838-846, 2000, (local copy)

Read the first two sections for an overview of the graphics pipeline with several details that we omitted in class (but most of which we will cover in detail later). Continue on if you’re interested in graphics hardware.


Saturday, February 4th, 2006

For an example of OpenGL bindings in another language, check out This is a Python version of Example 1-2 from the OpenGL Programming Guide. Compare this to the C version you’re using for your homework — the language may be different, but OpenGL is the same.

OpenGL Bindings

Saturday, February 4th, 2006

Things have come a long way since the last time I went looking for OpenGL bindings. While scripting languages have always tended to have them (e.g., Perl, Python, Ruby, Lua, Io, even PHP — yikes!), bindings for “industrial-strength” languages have always seemed to lag behind.

Instead of the panoply of Java bindings that held sway in the early years, sanity finally seems to have taken hold in the form of semi-official JOGL project. Heck, they even have a JSR.

Over in the proprietary, closed-source, Windows-only, Microsoft-owned world of C# (can you tell I’m biased? And don’t tell me about CsGL (old and busted)

  • Tao (new hotness)
  • C# OpenGL Framework (commercial, but there is a “Basic” edition)
  • SharpGL
  • Roll your own
  • As with all things Lisp-y, OpenGL support is pretty fragmented. Whether there is an OpenGL binding, how well it works, and whether you get get any help if it doesn’t is largely dependent on which Lisp you’re using. You may be better off with Scheme, where the Sgl library for PLT Scheme appears to be officially supported.

    When it comes to getting all this set up, though, as I said earlier, you’re on your own.

    Win32 GLUT setup help

    Saturday, February 4th, 2006

    If we went too fast in lab Friday night, or if you’re finding that the instructions in the README file included with the Win32 GLUT distribution are insufficient, you may also want to check out these resources:

    If you’re not planning to do your programming in C or C++ or on Windows, that’s perfectly fine, but note two things:

    1. When you submit assignments, you need to document any build dependencies (i.e., libraries that you rely on)
    2. When it comes to getting your environment up and running, you’re on your own.

    Assignment 0

    Saturday, February 4th, 2006

    Assignment 0 is available.

    If you are using Visual Studio, you may run into a problem compiling Example 1-2 from the OpenGL Programming Guide. If you run into a large number of errors complaining about undefined constants like WINGDIAPI, then problem is the two header files in the listing:

    #include <GL/gl.h> #include <GL/glut.h>

    The problem is that the Win32 OpenGL implementation is done in terms of the Win32 API, and uses Win32 API constants to declare functions. You can fix this by #includeing windows.h first, by swapping glut.h and gl.h, or by just #includeing glut.h by itself, because the GLUT header #includes gl.h.

    Incidentally, take a look at the hoops you have to jump through in the first 100 lines or so of the Win32 version of glut.h just to get the headers straight to see why I stopped writing code for Windows in 1999 and haven’t looked back.