#98925 - xexamedes - Fri Aug 18, 2006 3:39 pm
Hi! I pretty new to DS development but have been coding C and java since the earily ninties.
I am trying to port an existing 2d physics library (wiht opengl demos) to DS and so far things are going great. I've scaled things to avoid to be bitten by the 16x16x16 max monster, et.c.
My problem now is that I really need a wireframe look on mu stuff, but no matter which bits I set, I still get every quad filled in white.
N.B. that I don't have a real DS to develop for (yet), but run everything i the Ideas emulator.
My question is whether anyone know if there's a bug in this emu concerning filling, et.c. or if it is a known 'feature' of the DS?
I think I've seen someone post a picture of a wireframe cone somwhere, but I have no ide how it was done.
Thanks for any help,
PS
#98935 - ecurtz - Fri Aug 18, 2006 4:35 pm
You get wireframe by setting the opacity value of your polygons to 0.
No idea if it works in any emulators.
#99048 - xexamedes - Sat Aug 19, 2006 6:55 am
Thanks! I tried it, and it didn't work :) But I've been googling a bit for this also, and the zeroed alpha value pops up again and again, so I'm sure you're right.
Is there any other specific info on how to use this? Have you set something in the environment gl setup first? etc.
But I'm leaning towards that the ideas emulator has only implemented textured polys, and just fill non-textured as white. I'll have to wait for my DS to know for sure
If I succeed (when! be positive! :) my intention is to make a PALib module out of the physics so that you can just drop stuff into a world and have then roll all over each other. We'll see.
Br,
PS
#99098 - walaber - Sat Aug 19, 2006 3:26 pm
that code will definately work on the hardware... I don't think Dualis likes it though :)
not sure adout Ideas...
_________________
Go Go Gadget NDS!
#99530 - xexamedes - Tue Aug 22, 2006 9:13 am
I am using the ideas emulator (since it's the only one support 3d atm).
If I understand you correctly, you mean that even though ideas fills my quads, they will be "empty", i.e. wireframed on a real DS ?
My code goes something like this;
<init>
PA_Init();
PA_InitVBL(); // Initializes a standard VBL
PA_Init3D();
PA_InitText(1,3);
</init>
<main loop>
PA_Init3DDrawing(0.0,0.0,0.7,0.0,0.0,Z);
glColor3f(1, 1, 1);
glMatrixMode(GL_MODELVIEW);
glLight(0, RGB15(90, 30, 250), 2, 0, -2);
glPushMatrix();
render();
glPopMatrix(1);
glFlush();
</main loop>
<render>
glEnable(GL_OUTLINE);
glBegin(GL_QUAD);
glPolyFmt(POLY_ALPHA(31)|POLY_FORMAT_LIGHT0|POLY_CULL_NONE);
PA_Vertex3D(v1.x,v1.y, Z);
PA_Vertex3D(v2.x,v2.y, Z);
PA_Vertex3D(v3.x,v3.y, Z);
PA_Vertex3D(v4.x,v4.y, Z);
glEnd();
</render>
And I know that it shouldn't use PA for serious gl work, but everything _else_ work great, and from time to time I've tried to copy stuff from some NeHe demo and end up the same way; Stuff move and fall about correctly, but filled instead of wireframe.
I've begun fiddling with lightning and outlines, but nothing really helps.
Oh, outlines makes it different; Then only collisions are drawn between objects but everything else is invisible :|
Does anyone spot some glaring mistake??
BR,
PS