Balder's Game Loop

Aug 19, 2010 at 4:11 PM
Edited Aug 19, 2010 at 4:45 PM

While Looking into the example Programatic:Teapot. I found something that reminds me of the Game loop in OpenGL




I was experimenting with how to do dynamic texture using the the example Materials (previous version)

e.g. perhaps Draw a fill rectangle on the texture ImageMap (reflectionmap.jpg)

I created a Game.Update+=Game_update method to test if I could randomly change the texture options (randomely choosing one out of three available). so there is flickering of changing texture on the Box.

It does not work, I wonder what I have done wrong?

Question: what would be an "official" way to draw something on the imageMap fo a texture and return the new one back to the geometry and making sure that the geometry's texture is refreshed with the new one?


Aug 19, 2010 at 6:13 PM

The official method would be to implement the IMap interface and create your own map that returns the modified pixels. Problem is that I'm refactoring things these days and it might not work properly. It works with, but not the current code base. It will change a bit for the next release.