Untitled

Published August 11, 2006
Advertisement
YES! I found the texture bug - when a chunk is split down into smaller pieces, the following code was called -

chunk->children[1].tex.tx += chunk->children[1].tex.tw;
chunk->children[2].tex.ty += chunk->children[2].tex.th;
chunk->children[3].tex.tx += chunk->children[3].tex.tw;
chunk->children[4].tex.ty += chunk->children[4].tex.th;

I don't know why the [4] on the last line didn't throw an array OB access violation, or even why I wrote that. Changing it to [3] pushed that quadrant down where it needed to be. Hooray!



I think there are still a couple more bugs, like switching between texture pages and stuff (I think it'll only use the next texture in the stack if the current one is marked as "full", rather, it should use the next one if the current's maximum available slot is less than the needed space.)

Oh, and I have to code in the stuff to deallocate textures. I actually am not sure how my partitioning algorithm will fare up against fragmentation at this point, but we'll see. I have high hopes :)

Hur hur hur!
Previous Entry Untitled
Next Entry Untitled
0 likes 3 comments

Comments

Rob Loach
Tetris!!!!
August 11, 2006 05:18 PM
Mushu
Texturis!!
August 11, 2006 09:46 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Untitled

5326 views

Untitled

1043 views

Untitled

1185 views

Untitled

1100 views

Untitled

1145 views

Untitled

1430 views

Untitled

1098 views

Untitled

999 views

Untitled

1003 views

Untitled

1183 views
Advertisement