Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


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!
Sign in to follow this  


Recommended Comments

Guest Anonymous Poster


MatTd likes to touch little boys.

-- Your Mother

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!