Sign in to follow this  
cNoob

Transparent on Image Surfaces

Recommended Posts

Hey all i was just mucking around with my computer reading the internet looking for sprites and most of them are animated gif so i thought of a nice little project i could do. It was to make an animation of a smily face look left then right then pause and pull a tounge and just keep looping. The animation looks as follows: Smiley(looks center)->Smiley(looks left)->Smiley(looks center)->Smiley(looks right)->Smiley(looks center)->Smiley(pulls tounge) (Very Artistic) So i first designed a bitmap 384x64 six frames of 64x64 i then added my faces and changed the background from white to black. Then in my code i create a image surface and load my bitmap to it and use RECT to copy a certain part of my bitmap and display it at the center of the screen Sleep for 100ms(I know its not the best for timing) then go onto the next frame. In my code i clear the screen black and it all works great and looks good. But if i change the background from black to another color i have to change the color of the bitmaps background. So is it possible to have transparent with an image surface or will i have to use a texture instead. Thanx for your time cNoob [Edited by - cNoob on November 27, 2005 3:32:17 PM]

Share this post


Link to post
Share on other sites

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