View unanswered posts | View active topics It is currently Mon Jun 18, 2018 2:52 am



Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
 Easy GL2D 

Should libgl2d be integrated into libnds? viewtopic.php?p=6893#p6893
Yes, integrate it immediately if not sooner. 38%  38%  [ 36 ]
No, let's have this as a separate library and work towards middleware. 20%  20%  [ 19 ]
Let's do both - integrate it as is and build an abstraction layer on top. 18%  18%  [ 17 ]
I'm good with whatever is decided. 24%  24%  [ 23 ]
Total votes : 95

 Easy GL2D 
Author Message

Joined: Sun Apr 17, 2011 8:10 pm
Posts: 43
yep, im using that technique to animate human characters

On other platforms Im used to drawing for example, the torso, then saving its matrix values e.g.(1,0,0,1,50,40)

Then when I am ready to draw a limb I load the torso's matrix (glLoadMatrix) and rotate and translate for each limb.

Maybe I could use Push and PopMatrix instead.(like your tentacle example)

glSpriteOnQuad seems to be the best command because an arm for example has to have its origin or 'handle' at the shoulder so it rotates from the shoulder.
glSpriteOnQuad could also be used to draw isometric tiles, the diamond shaped ones, from a square texture.


Thu Sep 13, 2012 3:40 pm
Profile

Joined: Sun Apr 17, 2011 8:10 pm
Posts: 43
by the way how do you set magenta as the clear color?

I can only see GL_TEXTURE_COLOR0_TRANSPARENT which uses black
the texture packer uses magenta

I tried deleting GL_TEXTURE_COLOR0_TRANSPARENT from the source and put -gT #FF00FF into the GRIT file but it didnt help


Thu Sep 13, 2012 4:16 pm
Profile

Joined: Sun Apr 17, 2011 8:10 pm
Posts: 43
even if I set my png's background to 0,0,0 black and put the GL_TEXTURE_COLOR0_TRANSPARENT enum back into the sourcecode black is still not transparent


Thu Sep 13, 2012 7:13 pm
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 351
GL_TEXTURE_COLOR0_TRANSPARENT indicates that paletted textures that specify index 0 in the image data should be transparent for that pixel - in other words it ignores the color value at index 0 in the palette and does not draw the pixels that reference this palette index.


Thu Sep 13, 2012 7:25 pm
Profile

Joined: Sun Apr 17, 2011 8:10 pm
Posts: 43
aha ok, so how do I, get magenta to be transparent

or how do I get magenta to be the first color in the palette?


Thu Sep 13, 2012 8:28 pm
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 351
I am not really a grit expert, but
Code:
-gT FF00FF
should do it


Thu Sep 13, 2012 8:41 pm
Profile

Joined: Sun Apr 17, 2011 8:10 pm
Posts: 43
it worked! thanks,
I turned my bitmap into an indexed image used magenta as the background and added the flag and this time it worked,


Thu Sep 13, 2012 9:18 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 57 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

Who is online

Users browsing this forum: No registered users and 0 guests


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

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads