Jump to content
  • Advertisement
Sign in to follow this  
NVergunst

OpenGL C# Sprite.Draw2D and resizing problems

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

Hello everyone. I am very new to DX, so please bear with me. I just learned last week how to draw a png to the screen using DX, and have been using that. Problem is, is works sometimes perfectly, and sometimes it doesnt. Things in the code that work for 1 image dont for another. Basically, I have a bunch of textures that I am drawing and some of them overlap. To me it seems random, I could just need a new pair of eyes for it something, I dont know. But what are possible reasons for a texture to be drawn not in the location specified? In my code, I pass in a value to be drawn at (20,20) and it draws at (20,20). I pass in a point to draw at (320,320) and it draws closer to (450,500) for some images and other it draws perfectly well at (320,320). So the code for the point and drawing is all the same, and it seems to work randomly. I have no idea why. I have converted my app from GDI+ to XNA and now to MDX, and it is a fairly larger than normal application for drawing 2D images to say the least. :) Another issue I am having, is whenever I resize the window I get various errors. Sometimes AccessViolation errors, other times DeviceLost errors and such... I have created an event for .Resize() to call my device setup again, but it doesnt work. It will either continue to error, or just turn the area that used to be how big it was to white, and the "new" area that was added on a resize larger will just stay black. It is frustrating to say the least. The graphics portion worked just fine in GDI and XNA but the first was just too slow and lagged and the latter was just too heavy on requirements to run on a non-dev machine, so I have to find something new. I tried OpenGL, but it doesnt render correctly in Vista with Aero on. Any help would be appreciated, thanks.

Share this post


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