main-practice1

Programming Practice 1: OpenGL and FLTK

Due September 15, 2010

The goal of this practice program is to make sure you are able to write OpenGL programs - to get FlTk to put a window up, and get some graphics drawn. This is your opportunity to make sure you know how to run the compiler, link with the libraries, etc.

For the actual projects, we will give you framework code that creates windows and stuff like that. But, in this practice assignment you should do it all yourself - it might be your only experience trying to make it work. If nothing else, it will give you a chance to make sure you can compile and build OpenGL/FlTk programs for this class.

Requirements

The requirements are pretty minimal:your program should open a window, and draw a picture in it. The window should stay open until the user closes it. The window should get redrawn properly if it is uncovered, etc.

You’ll need to use some library for creating windows. Since the frameworks for the later projects are written using FlTk, we ask that you use FLTK for this assignment as well.

  • Tutorial on VS2008 and FLTK are available here.
  • The “OpenGL Survival Kit” (still being updated) can help you understand what is going on in the tutorials. You don’t need to worry about understanding picking or animation - it isn’t required for this practice assignment and this year, we’ll provide you with framework code to take care of it for the projects.

You should do the drawing using OpenGL. You don’t need to do anything fancy - just draw a few lines and polygons to get the hang of it. It doesn’t need to be 3D, or have lighting, or use any fancy features - you’ll have plenty of opportunities to do that later.

Your picture must be a picture of something - you can tell us what it is. It has to have lines and triangles/polygons, and it has to have different colors in it.

Of course, if you want to make a really cool picture, that’s fine by us and we won’t complain. (in fact, we’ll thank you for making our life interesting). How cool your picture is won’t effect your grade (providing that your program meets the minimum requirements).

You are allowed to work with a partner for this assignment. Please make it clear if you have worked with someone else (in your documentation, etc). Note: for this assignment, each person must turn in an assignment (even if you turn in the same files as your partner) - this is not the normal way we’ll do things.

What to turn in

You should turn in the “usual stuff” - a readme file (that describes what your program does), the source code for your program, and the .vcproj and .sln file required to build it. Please do not turn in extra files.

Please turn in a screen shot of your program in action.

Handin directories will be created after the 10th of September (probably not until the 13th).

How you will be graded

We will grade this check/no check. If you turn something in that seems reasonable, we’ll give you credit. If you don’t turn something in, we’ll be concerned that you won’t be able to do the projects (coming soon!). If you turn something in that doesn’t work, we’ll find out soon enough when you can’t do the project.

(Download sample solution)Please note that in this solution, the links to FlTk libraries are hard links. So, if you are trying from home, please set it to the relative path (using env variables as shown in the FlTk tutorial)

Page last modified on September 10, 2010, at 03:28 PM