gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Compile errors with 3D, lesson 2

#61466 - Maverick - Sun Nov 20, 2005 3:34 pm

I have worked through many compile errors in this code, but have not come across these before and am completely stumped.

The lines that are having trouble are:

glNormal(NORMAL_PACK(f32tov10(x),f32tov10(y),f32tov10(z)));

error: invalid operands to binary >>

glTexCoord2t16(f32tot16 (mulf32(u,intof32(1<<(3+x)))), f32tot16 (mulf32(v,intof32(1<<(3+y)))));

error: invalid operands to binary >>

MATRIX_LOAD4x4 = floatof32(-1.0F);

warning: overflow in implicit constant conversion

u8 red = f32toint(mulf32 (r,intof32(31)));
u8 green = f32toint(mulf32 (g,intof32(31)));
u8 blue = f32toint(mulf32 (b,intof32(31)));

error: invalid operands to binary >>

Once this is sorted it should compile(hopefully)

Any help would be much appreciated


Thanks
_________________
http://downtou.ne1.net/


Last edited by Maverick on Mon Nov 21, 2005 7:23 pm; edited 1 time in total

#61469 - Webez - Sun Nov 20, 2005 3:52 pm

I have compiled those lines using f32 for x,y,z,u,v,r,g and b a and it didn't give me any error. If you are using fixed point for variables everything should be ok. Do you have the the most updated libnds?

#61485 - Maverick - Sun Nov 20, 2005 7:13 pm

Ive got it down to just the

MATRIX_LOAD4x4 = floatof32(-1.0F);

warning: overflow in implicit constant conversion

By removing anything im not using and using

glColor3b(1,1,1);

Instead of

glColor3f32(intof32(1),intof32(1),intof32(1));

I cant think of anything else.

Is there anything i could use instead of gluFrustumf32?
_________________
http://downtou.ne1.net/


Last edited by Maverick on Mon Nov 21, 2005 7:27 pm; edited 1 time in total

#61547 - Maverick - Mon Nov 21, 2005 2:12 pm

OK, i got it compiling, am using integers now.

But now that it is in a state where it should do something, it only does this:

[Images not permitted - Click here to view it]

it just displays two dots in the middle of the screen, i dont get it, its driving me crazy.

HELP!!!!!

Thanx
_________________
http://downtou.ne1.net/