Jump to content
  • Advertisement

Archived

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

Rektis3D

Loading 2 DiretDraw Surfaces?

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

I first loaded one bitmap into a DDSurface,set it to a rect and blitted it from the backbuffer to the primary surface and everything was ok. Then i loaded a second bitmap(same size etc) in a different DDSurface, set it to different rect and the bitmaps were then moving really weird, like trembling,(i dont know how to describe it.Anyway they were not normal). Note that i use a variable (int count)like this "count = GetTickCount();" at the start of the loop and "while(GetTickCount() - count < 33);"at the end (although i tried changing number 33 nothing changed). please S M P a y r v o e j e c t

Share this post


Link to post
Share on other sites
Advertisement
maybe your source RECT and dest RECT sizes don't match in size? Try changing them and see what happens.

Edit: Oh, I think the problem might be that you're using source RECT instead of dest rect and vice versa when you call blt().

That happened to me

[edited by - Zeraan on September 15, 2002 8:03:58 PM]

Share this post


Link to post
Share on other sites
It''s a pretty bad idea to store GetTickCount() in an int!
GetTickCount() returns a 32-bit value that represents the number of milliseconds that has passed since the computer was started. That means that if you mashine has run more that 32 seconds, you''re in trouble!

Share this post


Link to post
Share on other sites
quote:
Original post by Enselic
It''s a pretty bad idea to store GetTickCount() in an int!
GetTickCount() returns a 32-bit value that represents the number of milliseconds that has passed since the computer was started. That means that if you mashine has run more that 32 seconds, you''re in trouble!


Please see the comments in this thread

A piece of advice for the OP: GetTickCount returns a DWORD, which is an "unsigned int" (or "unsigned long" if you prefer), not an "int". You can also declare your variable as a "DWORD" if you''ve included the right headers.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!