Has anyone tried the above example yet and confirmed 3D slowness on iPad - Or you can even stick a few spinning boxes on the iPad and frame rate drops
p.s. Happy New Year
p.s. Happy New Year
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
SETSCREEN 1024, 768, 1
CreateTorus(1, 5, 10, 22, 22, 2, 2)
LOADSPRITE "image.bmp", 0
DIMDATA cheap[], .5, 1
DIMDATA nice[], .3, .6, .6, .6, .6, .6, .6, .7, 1, 1, 1, 1, 1, 1, 1, 1
WHILE TRUE
phi=phi+GETTIMER()/30
X_SETCELSHADES cheap[]
Render(phi)
dtime = GETTIMER()
fps = ((1000.0/dtime)+fps)/2
delay=delay+dtime
IF delay>1000 // 1/2 sec
delay=0
ShowFPS=fps
ENDIF
X_MAKE2D
PRINT "FPS: "+FORMAT$(0,1,ShowFPS), 100, 0 // + dtime, 0,0
SHOWSCREEN
WEND
// ------------------------------------------------------------- //
// Zeichnet einen Donut
// Renders a Donut
// ------------------------------------------------------------- //
FUNCTION Render: phi
X_MAKE3D 1, 250, 45
X_CAMERA 0, 10, 50, 0,0,0
// Licht Nr. -2 is Cel-Shading Postition / Light no -1 is cel shading position
X_SPOT_LT -2, 0, 0,0,100, 0,0,0,90
X_CULLMODE 1 // niemals 0 verwenden bei toons / Never use 0 with toon shading
X_SETTEXTURE 0, -1 // 0=Tex
X_ROTATION 80, 1,0,0
X_ROTATION phi, 0, 1, 0.1
X_DRAWOBJ 1, 0
ENDFUNCTION
// ------------------------------------------------------------- //
// -=# CREATETORUS #=-
// Donut Objekt machen / Make a donut object
//
// By Samuel R. Buss
// http://math.ucsd.edu/~sbuss/MathCG
// ------------------------------------------------------------- //
FUNCTION CreateTorus: num, MinorRadius, MajorRadius, NumWraps, NumPerWrap, TextureWrapVert, TextureWrapHoriz
LOCAL i, di, j, wrapFrac, wrapFracTex, phi, thetaFrac, thetaFracTex, theta
LOCAL x, y, z, r
X_AUTONORMALS 2 // smooth
X_OBJSTART num
FOR di=0 TO NumWraps-1
FOR j=0 TO NumPerWrap
FOR i=di+1 TO di STEP -1
wrapFrac = MOD(j, NumPerWrap)/NumPerWrap
wrapFracTex = j/NumPerWrap
phi = 360*wrapFrac
thetaFrac = (MOD(i, NumWraps)+wrapFracTex)/NumWraps
thetaFracTex = (i+wrapFracTex)/NumWraps
theta = 360*thetaFrac
r = MajorRadius + MinorRadius*COS(phi)
x = SIN(theta)*r
z = COS(theta)*r
y = MinorRadius*SIN(phi)
X_OBJADDVERTEX x,y,z, thetaFracTex*TextureWrapVert, 1-wrapFracTex*TextureWrapHoriz, _
RGB(0xff,0xff,0xff)
NEXT
NEXT
X_OBJNEWGROUP
NEXT
X_OBJEND
ENDFUNCTION // y
Quote from: KidNovak on 2010-Oct-22
I had all of the background "DRAWSPRITE's" in the main loop.
So, I removed the "DRAWSPRITE's" from the loop and now, back to 60FPS.
LOADBMP "background.png"
WHILE True
// Draw my wonderful graphics - No need to worry about the background
SHOWSCREEN
WEND
Quote
Don't know if it'll be helpfull but somebody might give it a try to let us all know?