Jump to content
  • Advertisement
Sign in to follow this  
yurixd

Image Processing, need help

This topic is 4842 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

Advertisement
You're going to have to give us some more details. You say that when you try to render to a non-square surface, your application crashes. Exactly where does it crash? What does the debug spew say (hopefully you're using the Debug Runtime)? If you don't know what the debug spew is, take a look at the Forum FAQ.

From glancing at how you lock your texture and render target, you're not taking into acount the pitch of the surface. Depending on how the graphics card allocates texture memory in your particular instance, this could cause rendering problems but shouldn't cause a crash. Also, I don't think you can directly lock a render target, so at the end of the code snippet you posted (if your program gets to that point), locking a render target, not checking to see if the lock was successful, and then accessing the pointer is a sure fire way to trample all over memory.

neneboricua

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!