43
I test this simple 3D code:
// Animation Demo
// Start: Friday, March 22, 2002
SYSTEMPOINTER TRUE
SETSCREEN 480,320,TRUE
SMOOTHSHADING TRUE
TYPE tMouse
x%
y%
active%
ENDTYPE
// Array to hold mice
GLOBAL mouse[] AS tMouse
DIM mouse[5]
X_LOADOBJ "media/1.ddd", 1
LOADSPRITE "media/player01.jpg", 1
WHILE TRUE
updateMice()
IF mouse[0].active THEN phi=phi+GETTIMER()/100
// IF KEY(208) THEN MOVE = MOVE - 10
X_MAKE3D 1, 1000, 45
X_CAMERA 0, 0, -250 + MOVE, 0, 0, 0
X_SPOT_LT 0, RGB(255,255,255), 0,50,100,0,10,100,180
//phi=phi+GETTIMER()/100
permil=permil+GETTIMER()/20000; IF permil>=1 THEN permil=0
X_ROTATION 180, 1,0,0
X_ROTATION phi, 0,-1,0
X_SETTEXTURE 1,-1
X_DRAWANIM 1, 0, 128, permil, TRUE
GOSUB ShowFPS
PRINT "MOVE" + MOVE,0,20
SHOWSCREEN
WEND
// ------------------------------------------------------------- //
// -=# SHOWFPS #=-
// ------------------------------------------------------------- //
SUB ShowFPS:
X_MAKE2D
dtime=GETTIMER()
fps = ((1000/dtime)+fps)/2
delay=delay+dtime
IF delay>1000 // 1/2 sec
delay=0
fps_draw=fps
ENDIF
PRINT "FPS: "+fps_draw+"px:" + ply_x + " py:" + ply_y + " d:" + ply_dir, 0 ,0
ENDSUB // SHOWFPS
FUNCTION updateMice:
FOR imouse% = 0 TO GETMOUSECOUNT()-1
SETACTIVEMOUSE imouse%
MOUSESTATE mx%, my%, b1%, b2%
mouse[imouse].x=mx
mouse[imouse].y=my
mouse[imouse].active=b1
NEXT
ENDFUNCTION
I export the 3D model from 3D studio max to 3ds ... and i convert the 3ds (whit tool) in .ddd model
In Windows mode the code work fine, but in iphone runtime the model not show in screen ...
Detail model:
3d model polys -> 700
texture format -> jpg - 128x128
Help!