PNG Alpha Channels for Sprites

Previous topic - Next topic

bigsofty

Is there a way to get a 2D Sprite, to control its transparency via the alpha channel of its PNG?

Also how do I achieve additive blending (in opengl something like... GlBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)) in 2D?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

Sure. PNG transparency is supported. Alpha blending comes from command ALPHAMODE. If you need a different mode, try using INLINE.

bigsofty

Thanks Gernot,

2 questions...

My PNG has an 8 bit alpha channel, is there a way that I can use the full 8 bits for different levels of blending?

Also...

If I use inline to change the blending mode... how would this affect the cross platform compilation (Is this opengl command supported in your PDA/GP2X OpenGL libs?)

Thanks for the info...


Ian
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

bigsofty

P.S. Small bug in code completion within the editor... type "func" and then CTRL+T, you get "FUNCTION" but the cursor seems to get located before the 1st character, in the gutter, not at the end of the code completed word.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

thx. OpenGL calls are platform independent.

bigsofty

Excellent! I'll give the Inline call a go... :)

And question one?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)