Submitted by , posted on 30 November 2000



Image Description, by


This is my entry for the OpenGL Challenge, Gears Challenge. I tried to come up with something original and eye catching, with TnL friendly ("clean") OpenGL.

The oglchallenge website seems to be down (?), so "oh well maybe next time".

Some of the code is messy, with plenty of magic numbers.
Some of the code is (IMO) nice & clean.
Comments are for quiche-eaters (Mmmm... quiche).

Download:
http://www.users.bigpond.com/a_j_harvey/gears/gears.zip (193Kb)
http://www.users.bigpond.com/a_j_harvey/gears/gears_src.zip (75Kb)

Features:
  • Display lists (see Note).
  • Fast, fake env-mapping using texture matrix. Fast, fake Phong shading with env-mapping.
  • Interesting blend mode glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA). It doesn't saturate as quickly as GL_ONE/GL_ONE. To be honest, its not much different to GL_ONE/GL_ONE at all :)
  • Skydome stars.
  • Billboard particles. They really chew fillrate.
  • 100% procedurally generated meshes & textures. Exe is only 61Kb without C Runtime.
  • * Note: I'm using glGetFloatv(GL_MODELVIEW_MATRIX) several times per frame. This won't be TnL friendly unless the driver keeps a matrix stack in software. If the driver didn't maintain a software stack, it would be very easy for the app to do this.

    Andrew Harvey
    http://www.users.bigpond.com/a_j_harvey
    a_j_harvey@hotmail.com



    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]


     


    Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
    Please read our Terms, Conditions, and Privacy information.