Take the 2-minute tour ×

I will be teaching a introductory course in Computer Graphics this term. I have been teaching that course for the past two years, and so far I have been using Glut / Free Glut as libraries.

This year I am planning to alter / update the course a little bit. I've been researching in various libraries and frameworks to use for the practical exercises. Based on my experience, students have very good knowledge in languages such as C#, Java and have had many problems with C++ in the past. Due to that, I had to loose time teaching basics of C/C++ for them to catch up.

The mathematical and theoretical background of the course will not change. They will still learn about CG concepts such as transformations, matrices, cameras, textures, shading, ray-tracing algorithms etc.

So, my question is: Do you have any experience with other frameworks?

My primary candidate right now is Microsofts XNA, even though I am trying to avoid MS stack, based on my experience my students prefer to use C# for their projects.

I've also looked into Java3D and Qt. I am not sure whether Java3D is still being developed, and I can hardly find any good textbook for that. On the other hand, Qt might be to large of a framework for the basic tasks required by students.

share|improve this question
add comment

closed as not constructive by genpfault, Neil Knight, Will Jan 6 '12 at 14:55


3 Answers

How about SDL? It's cross-platform, high-level, and you can use it with OpenGL or DirectX. It's written in C, but has bindings for C#, if you want to avoid C++.

The pSX playstation emulator uses SDL, and it's quite good.

share|improve this answer
This looks interesting. Are there any resources that I can use (books, tutorials) that are specific to c#? –  user496607 Jan 5 '12 at 15:16
A graphics platform that has bindings for multiple languages could be good for a class, as I'm sure not all of your students prefer C#/Java over C/C++. –  SomeWritesReserved Jan 5 '12 at 15:30
@user496607: Here's a quick start guide: matrix44.net/old/sdl/sdlnet.html. About books, there is only one: amazon.com/Focus-SDL-Game-Development/dp/1592000304, and I think it focuses on C++. If the bindings share the interface, however, language shouldn't matter. –  dario_ramos Jan 5 '12 at 15:45
add comment

I have had great experience with XNA. It a framework for building games and includes other useful features: graphics, audio, content management, Xbox/WP7 support, etc.

It uses C#, which your students are familiar with and makes prototyping much faster (no worries about memory management, segfaults, etc.). It is basically a managed wrapper around DirectX with a lot of convenience types. XNA 4.0 has a drastically different API that abstracts some of the DirectX away in favor of cross-compatibility with the Xbox and Windows Phone 7, so you may want to stick with XNA 3 if you are more focused on the graphical side.

To be clear, it's not a game engine. You will have to know some basics of 3D graphics to get up and running with anything on the screen. It also makes writing and managing shaders relatively easy, which is a big part of current computer graphics.



share|improve this answer
Yes, I have even seen some courses that use XNA as a primary tool. I think it will be interesting for students to build models in Blender and include them in their projects. With XNA this was fairly easy. –  user496607 Jan 5 '12 at 15:26
add comment

To teach CG basics I think that OpenGL indeed is the best API since it is more focused than DirectX/XNA, easier to use in the beginning and portrays the basic concepts rather well.

To use it with C# I can recommend the Tao Framework from personal experience, although I don't know how well it is maintained. An alternative is OpenTK.

DirectX is the better production API but might be overkill to teach the basics. If you want to use it, I'd recommend SlimDX as a wrapper. I only had a short glimpse at XNA some time ago but I can imagine it might be a tad too high-level for teaching.

share|improve this answer
I have to disagree that OpenGL is the best API for teaching. I'm a graphics professional and have been doing graphics programming for close to 20 years. OpenGL, while it performs well, is extremely confusing to learn and use. I'm often baffled by why a small change suddenly causes all drawing to fail. The error handling is atrocious, too. It's great for what it does, but it's simply too complex and archaic for an intro level class. –  user1118321 Jan 6 '12 at 0:18
add comment
