I'm trying to create sprites out of 2D meshes. It works fine but I can't get any degree of transparency. I've been experimenting in just writing to a texture but I achieve absolutely nothing.
The basic idea is load a 2D, 2 triangle rectangle mesh.
Create a texture.
Use this code...
and keep changing settings until I see something happening. I've gone through every combination of different write values, different textureflags, setting object alpha, but nothing allows me to vary the rectangle's transparency.
Ultimately I need per pixel masking, but that'll be easy (with ROss C's pointer) once i get any amount of texture alpha to work!!
The basic idea is load a 2D, 2 triangle rectangle mesh.
Create a texture.
Use this code...
buf= TextureBuffer(texture) LockBuffer buf For loop=0 To TextureWidth(texture)-1 For loop1=0 To TextureHeight(texture)-1 WritePixelFast(loop,loop1,$80ffffFF,buf); write back to the texture Next Next UnlockBuffer buf
and keep changing settings until I see something happening. I've gone through every combination of different write values, different textureflags, setting object alpha, but nothing allows me to vary the rectangle's transparency.
Ultimately I need per pixel masking, but that'll be easy (with ROss C's pointer) once i get any amount of texture alpha to work!!