🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Any ideas?

Started by
0 comments, last by Ratman 24 years, 7 months ago
Ok, I've been using some code for the infamous "RTS game programming with Direct X", and its worked just about perfectly so far. Now, I just bout a new video card (3D prophet-thats GeForce 256 based) and everything I've done has gone bad. Take a look at what I mean: http://www.123.net/~sourmosh/Image2.gif (theirs lines running everywhere, and graphics get drawn several times across the screen-the text is fine though).
And I just have no idea where to start in tracking down the program. Does anyone have any idea what it could be? Thanks

Ratman

Advertisement
Your pitch is probably wrong. Normally if you have a 640x480 screen, your pitch will be 1280 (640 * 2 bytes per pixel), but cards dont always do this for some strange reason.

Sometimes youll get a card that has a pitch of 2000 for 640x480 (example) or something like that. So you have to poll your card to get the correct pitch.

Basically once you create a surface in DirectDraw, do a GetSurfaceDesc() and then save the pitch from DDSD.lPitch

That should give you the appropriate pitch for your card.

-Geoff

This topic is closed to new replies.

Advertisement