Sign in to follow this  

Best way to Scroll picture on screen

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

Hi everybody! Presently, I use DirectDraw to scroll a big picture on screen. It works well but I read that microsoft plans to End directdraw development. So, what could I use to do so? GDI GetDC() / StretchBlt() don't produce nice animation. I read that we can use Direct3D for 2D but lot of video card cannot have texture bigger than 256x256. My picture can be 1600x1600. Any idea?

Share this post


Link to post
Share on other sites
Well u can move to Direct3D which obviously supports 2D.

A few things to google for...

1) Pretransformed vertices in directX (rhw)
2) Texture coordinates, u can use these to scroll the image by simply starting at a certain location within the texture, then thetexture would wrap around.
3) You would simply render a textured quad by setting the vertices etc, then render it to the screen and all is well.
ace

Share this post


Link to post
Share on other sites
Quote:
Original post by cletus76
Hi everybody!

Presently, I use DirectDraw to scroll a big picture on screen. It works well but I read that microsoft plans to End directdraw development.

So, what could I use to do so? GDI GetDC() / StretchBlt() don't produce nice animation. I read that we can use Direct3D for 2D but lot of video card cannot have texture bigger than 256x256. My picture can be 1600x1600.

Any idea?


Microsoft ended the dev of DDraw a long time ago. The last DDraw came with DirectX 7. But even if the development is halted, it doesn't mean that the product will disapear. They won't correct any other bug, they won't add any fonctionnality. But DDraw will still be a part of DirectX.

Now comes another problem: DirectX 10 will never exists. We don't know what the next MS graphic interface will be.

And for you information, you can achieve very good scroll with GDI. All the imaging software I know (photoshop, paint shop pro, the gimp, and so on) are using GDI to display bitmaps.

So you have 3 options:

  • continue to use DDraw - it will take ages before it vanishes.
  • use GDI
  • wait for XNA


Regards,

Share this post


Link to post
Share on other sites
Quote:
Original post by Emmanuel Deloget
And for you information, you can achieve very good scroll with GDI. All the imaging software I know (photoshop, paint shop pro, the gimp, and so on) are using GDI to display bitmaps.


Well, perharps I was not clear. I'm writing a Photo slide show software and I want to move some photo on screen. When I talk about picture scrolling, I mean Animation, not CViewPicture with window scroll bar.

Cletus.

Share this post


Link to post
Share on other sites
Thanks for the clarification.

If you choose the 3D way and if you want to bypass the 256x256 texture limitation (hum. Voodoo1?), you can create multiple 256x256 textures - enough to cover the source bitmap.

But XNA won't probably come before longhorn. When it will come, it will have to suport older games, so I guess that DX7 will still be supported. If it is not supported by XNA then I guess you will still be able to install DX9 on a machine - and therefore use DX7.

So I believe using DX7 is not a problem - and by the time, all the texture size limitation would have gone, and you will be able to go the 3D way.

Regards,

Share this post


Link to post
Share on other sites

This topic is 4759 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this