saltwater.be

playground of Bruno Windels

28/02

Make maakt het niet

Man, make maakt het mij momenteel moeilijk.

Iedere keer als mijn Makefile er toe komt om iets te compileren gebruikt ie het commando 'g++ -c -o' ipv het opgegeven commando. Precies of ie zijn eigen zinnetje doet. Veel zin om laptop tegen de muur te kwakken ... maar k ga het toch maar niet doen.

Zal wel weer zo'n @#!% typo zijn.

Update: typo gevonden :-P Note-to-self: kopieer geen make regels van C projecten naar Makefile's voor C++ projecten.


Categorieën: Programmeren | Geen reacties

06/07

OpenGL (Again :-) and Wavefront

Today I hacked a bit on a wavefront loader. It's a fairly simple format and we used it for jaqel plus blender can export it. The loader is pretty naive and only loads the geometry (only triangles), not the materials although I added a custom texture token so it loads texture maps. The code is pretty ugly, I'll clean it up tomorrow.

I created this would-be basketball to test the application. As you can see the texture and texture coordinates where made in a hurry ;-)

The plan is to let the 'basketball' bounce inside a room to test collision detection

This is also my first OpenGL application that uses Vertex Arrays. This allows you to access your vertex data (unlike display lists) while keeping it in memory only once. This comes in handy when doing collision detection.


Categorieën: Programmeren | Geen reacties

04/07

SuSE 9.3, OpenGL, Collision Detection

Installed SuSE 9.3 today. The ISO's became available a month or so ago and I read that it was easier to get ATI hardware acceleration working than on 9.2 so I gave it a go, and indeed, it works now, although some "hacking" was involved, meaning it didn't work out of the box :-)

The fonts showed up a bit large , unfortunately it always takes an effort to get it right from a fresh installation.

Before installing SuSE, I added a light to the textured cubes in my OpenGL example. Next I think I'll try to write an animation.

After installing SuSE, I did some research on collision detection and I ended up with a an interesting technique for limiting the number of polygons you have to test colision with : Octrees. It's a tree structure that contains polygons. The polygons of a child node are within the bounding volume of the parent node. So if you don't colide with the parent bounding volume, there is no need to test collision with the polygons of the child node. Nice idea :-)


Categorieën: Programmeren | Geen reacties

02/07

Playing with OpenGL

Yesterday, I decided to learn OpenGL. Making Jaqel together with Robin was really fun and I may create another game, if I can make the effort of sticking to one project at a time :-).

Qt has very good OpenGL integration. It's really a pleasure to work with. It even converts your QImages to OpenGL ready textures.

When learning Java3D for Jaqel, even rotating a textured cube inside a small window was slow (no hardware acceleration). With OpenGL in C++, it is relatively smooth.

This is what I have so far using the NeHe tutorials :-)


Categorieën: Programmeren | Geen reacties

01/07

Qt 4 released!

Trolltech released Qt 4. While there where beta versions available for quite some time, it is nice to hear that Trolltech conciders it done. This version is also GPL'ed on MS Windows, so now I can write applications for my family and friends that didn't make the switch (yet :-)

This should also make it a lot easier to write eyecandy loaded software for KDE, as the examples demonstrate.

The trolls have also created a rather embarrasing but funny movie about Qt 4.

PS: for those of you that have never heard of Trolltech/Qt, it is the basis for KDE and (in my opinion) one of the best GUI toolkits available.


Categorieën: Linux, Open Source, Programmeren | Geen reacties