Advertisement Jump to content
Sign in to follow this  

Image Processing, need help

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

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.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!