This topic is now archived and is closed to further replies.

Any ideas?

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

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.


Share this post

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


Share this post

Link to post
Share on other sites