This site is no longer active and is available for archival purposes only. Registration and login is disabled.

E3DSurface with alpha blended texture


E3DSurface with alpha blended texture

Postby WPennypacker » Dec 4, 2007 @ 6:46pm

Hello,

I'm trying to get some equivalent of a Billboarded Quad for a game, using EdgeLib.

To do this, I need to be able to draw a 3D surface with a 2D surface texture applied to it, but that texture must be able to have an alpha mask.

Is this possible?

Thanks a lot.

[UPDATE]

So I've been trying to get a 3D Surface to draw with a 2D RGBA Surface applied as the texture with no results. It just refuses to draw anything.

Finally, by directly calling Render from the Display's 'buffer' surface, I was able to specify a keycolor for a texture and render a 3D surface with an alpha masked texture.

My last problem is that 3D surfaces renderered with anything other than the Display object seem to disregard the World transform.

I suppose I could just ignore the world transform and manage the different coordinate systems myself, but it would be nice to not have to.

Please let me know if I'm missing something entirely, or if theres an easier way to achieve a 3D surface with a masked texture.

Thanks again.
WPennypacker
pm Member
 
Posts: 2
Joined: Dec 4, 2007 @ 6:41pm


Postby edge » Dec 5, 2007 @ 10:12am

Hi,

It's not possible to directly render onto a surface and using the world transformation (because it's part of the display object).

However, it is possible to render through the display class using color keyed surfaces. In ClassEDisplay::SetShading you can combine E3D_TEXTURE and EFX_COLORKEY.

Unfortunately, the internal render doesn't support rendering with RGBA surfaces at the moment.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby WPennypacker » Dec 5, 2007 @ 5:08pm

Ah, that worked.

For now, 1-bit alpha is all I really need, so your solution was great.

Thanks a lot.
WPennypacker
pm Member
 
Posts: 2
Joined: Dec 4, 2007 @ 6:41pm


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron