![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||
![]() |
![]() |
|||||||||||
![]() |
![]() |
![]() |
||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
Example CodeLibTargaThe following is an example program that allows you to read/write targa images. It also allows you to paint green lines over the image. It may be used as a satisfactory completion for assignment 2. LibTarga information is available here.
FlTkLook for Richard's tutorial on how to build FlTk programs in the CS environment. He provided a sample program (with all files) as well as a project that compiles on of the standard FlTk demos. OpenGLMy Tutorial on OpenGL basics for this class has a few examples.
I have also added an example of how to do animation with GL and FlTk that provides some support code that might be useful in your projects.
I have made a simple demonstration of drawing stuff in 3D with GL. Right now, the demo shows hack shadows (as we will discuss in class) and provides a basic interface for moving the camera around. It does not do lighting. Be warned: while it gives basic methods for doing things, it doesn't necessarily do them well. For example, the camera interface uses fixed axes and therefore suffers from severe gimbal lock. Also, it doesn't do any fancy GL tricks to make things look nice. If some GL wizard were to send me a nicer set of hacks to make things look better, I would encorporate them (especially for nicer looking shadows)
Mark has also provided a sample solution to Program 4. It provides a similar, but different interface than mine:
ComposeThis is a sample skeleton Driver for Project 1. It should give you some ideas as to how to build your main loop.
Texture ManagerThis is a tool designed to make things a little easier to use textures in opengl. You can use it in place of glBindTexture. Instead of taking a number that is a "texture name," you pass it a string that is the name of a TGA file (without the .tga extension). If the image hasn't been loaded for you, it will get loaded in.
Note: this uses libtarga. Project 3Example code for project 3.
|
Last modified: 15:04 Nov 25, 2000 |
(c)
2000 Michael Gleicher
|