Jump to content
  • Advertisement
Sign in to follow this  
Lowspeed

Debug / Release Version!?

This topic is 4830 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, I have this simple render loop, the problem is that it will only render when using the debug version of the managed directx libraries. public void Render() { Point pointLocation = new Point(0, 0); int intOffset = 0; for(int j=0; j<10; j++) { // Loop through each row, starting a loop to draw the tiles of that row, starting top, ending bottom. pointLocation.Y = j * 9; // Isometric tiles are staggered, so, should we stagger? if ((j % 2) == 0) { intOffset = 16; } else { intOffset = 0; } for(int i=0; i<10; i++) { // Loop through each X tile, drawing a row starting from left, ending right. pointLocation.X = (i * 32) + intOffset; SpriteManager.Instance.Sprite.Draw2D(textureMapTile, Rectangle.Empty, new Rectangle(0, 0, 32, 32), pointLocation, Color.White.ToArgb()); } } } What makes it even more bizarre is that if I comment out the intOffset check (the part where I use the % operator) it works fine in the release version... Any ideas? Thanks in advance,

Share this post


Link to post
Share on other sites
Advertisement
Erm, well, what happens when you use the Release version? Do you get an error? an exception? Does it simply not draw anything?

Share this post


Link to post
Share on other sites
Are you calling Sprite.Begin() and Sprite.End() along with the drawing of the sprites? Perhaps it's just omitted in the posted code...

Are you sure it can find and load the texture properly in the release version?

Share this post


Link to post
Share on other sites
Hi,

SpriteManager is a static class using a singleton implementation. It calls Sprite.Begin(), then calls all it's subclasses (that use the sprite object) to render, then calls sprite.flush() sprite.end()...

I know the texture is being loaded because if I comment out the intOffset part it works fine.

Any other ideas?

Thank you for the reply,

Share this post


Link to post
Share on other sites
Hey guys,

I figured it would be a bit more help if you could see the project in it's entirety (all 80k of it)...

This is just the start of the project but really need help getting rid of/solving this problem...

http://www.chasegale.com/dump/base.zip

Thanks in advance,

Share this post


Link to post
Share on other sites
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!