Archived

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

Oneexistence

Windowed mode blitting

Recommended Posts

Oneexistence    122
Hi I''m using a windowed mode. I create a primary surface and then load a bitmap into an offscreen surface. I then get the window rectangle and try and then blt the offscreen surface to the primary surface. Only nothing shows up. If I try a colour fill instead that doesn''t work either. However, if I blt to the entire screen and do a colour fill it works but it doesn''t work if I try to blt the bitmap to the entire screen. Any ideas? I''m at a loss. Thanks

Share this post


Link to post
Share on other sites
Cybertron    122
You cant use page flipping in windowed mode, so create the primary surface and an offscreen plain surface that is the size of the sctreen you want. Replace the flip() function with a Blit that copies the back buffer to the primary surface. for the source rect, make the top left point 0, and for the dest rect make the top left point the top left point of the window client area

then you can use the backbuffer like normal and not have to worry about clipping. writing to the primary surface isnt a good idea anyways

Share this post


Link to post
Share on other sites