Saturday, April 7, 2007

Inredning i båten

Hann med att pilla på båten idag, direkt efter påsklunchen. Satte in nya ljusgråa mattor på väggarna i ruffen, där det tidigare suttit röda fula mattor. Så här blev resultatet:




Satte fast den med dubbelhäftande mattejp - hoppas att det håller! Blev riktigt nöjd med passform, färg och allt. "Sobert grå" skulle det stått i någon designtidning, ha ha!

Wednesday, April 4, 2007

OpenGL Tidbits

Things I've learned this week, after nearly throwing my computer out the window:

1. The currently set glColor() affects texturemapping. Set glColor(1.0f, 1.0f, 1.0f); if you want your textures to be colored correctly.

2. Enabling texturing with glEnable(Gl.GL_TEXTURE_2D) will also 'texturemap' lines you draw (in my case, they all went black and white). After rendering the texturemapped object, disable texturing.

3. gluScaleImage() is a strange function. It generally just messes with your textures (or at least it does when you don't know how it works...) I use a home-made nearest neighbour algorithm instead, for scaling down my RGB raw textures to a 1024x1024-size.