Wednesday 8 August 2012

89.5 Display problems cracked



oh boy.....I got stuck for a while, trying to do what seemed to be a very simple thing...mixing small 3D models with 2D banner sprites...but try as I might the sprites didn't show.

I re-wrote, re-read the instructions, re-wrote, re-wrote, re-read again...but nothing! Tried another approach...still nothing, tried another.....still nothing...shouted at the screen...strangly didn't work...tried another approach.

doh..then it dawned on me...I made a simple error, 1 single missing line..which escaped me.

The sprite demo I based my sprite code on set up a vertice buffer on init, it was a 1 time set up in the demo so that works becuase it never prints anythng else, but since I was constantly updating the graphic types and putting in new buffers I needed to reset that buffer when it came time to render sprites.

add the line...boom..Sprites!

Doh!

oh well...it gave me something to do at 4am when I couldn't sleep after having a few too many drinks with Martin and getting my pre sleep hangover...I hate that, why can't I have normal pass out when drunk and wake up with hangover, like everyone else.

Onward an upward. With the display code issues resovled the rest of the coding is fairly easy maths and masking....should be very effective when I've finished it.



Ahthankyew

No comments: