Sign in to follow this  


Recommended Posts

I need to draw a 3D cube with high resolution images(1280*1024) on each side. Each image had to be half-transparent, so we would see all sides of the cube. And i need update(load) every image from bitmap on each render. I tried to use Direct3D (but it is no metter for me, what technologe i'll use), and i have some problems: 1. Loading Bitmap as texture takes too mach time - 100ms for each image, and help says, that device.GetSurfaceLevel(0).GetGraphics() cann't work with textures with alpha-channel. So, how else? Or maby my approach is wrong and I should do it another way? 2. Original bitmap isn't transparent, and to read and to set alpha for each pixel it is too long. I don't know, how to tell direct3D to draw whole image with specified transparency. P.S. Please, sorry if there were some mistakes. English is not my native language...

Share this post

Link to post
Share on other sites
Can't help with question one, but as far as question two goes, as long as your vertex structure has a diffuse colour e.g:

struct Vertex
float X,Y,Z,Rhw; DWORD Color; float U,V;


and you set up your renderstates like:



Then you can control the alpha of an entire textured polygon by setting the alpha of the colour components of its vertices as well as by per-pixel alpha information in the texture.


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