Jump to content
  • Advertisement
Sign in to follow this  
Lucky808

Isometric tilemap rendering

This topic is 2087 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

 

Has anyone read the book "Learning IOS Game Programming"? I'm current using the rendering method (for Orthogonal maps) taught in the book in my new game. I've successfully converted some of the code to work with Isometric tilemap. However, I hit a road block when it comes to rendering objects on the map in the right order. I'm using 3 map layers. (1.ground, 2.grass, 3.wall and trees). I render the first 2 layers, then the player object, then the 3rd layer. However I could not get it to render objects in correct orders. i.e. a player standing in front of a tree should show up as such, meaning the tree should be rendered 1st then the player.

I've implemented a depth buffer and set up the following:

 

 

        glOrthof(0.0f, rect.size.width0.0f, rect.size.height0.0f100.0f);

 

 

        glEnable(GL_DEPTH_TEST);

        glDepthMask(GL_TRUE);

        glDepthFunc(GL_LEQUAL);

        glDepthRangef(0.0f1.0f);

 

        glClearDepthf(1.0f);

        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

 

But objects are still not being rendered in the correct order. If someone who is familiar with the rendering method in that book can you please point me to the right direction.

Any input will be appreciated!

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

This topic is 2087 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!