I've not hit any problems myself so far with Dark Physics - I'll wait to hear from you.
[EDIT]now to not[/EDIT]
In the meantime, here's some example code for building an object from scratch WITHOUT memblocks:
sync on
sync rate 60
sync sleep 1
autocam off
restore ObjectData
BuildObjectFromData(1)
position camera 0.0, 1.5, -5.0
point camera 0.0, 0.0, 0.0
position light 0, 0.0, 1.5, -5.0
point light 0, 0.0, 0.0, 0.0
do
xrotate object 1, wrapvalue( object angle x(1) + 0.25 )
yrotate object 1, wrapvalue( object angle y(1) + 0.5 )
zrotate object 1, wrapvalue( object angle z(1) + 1.0 )
sync
loop
function BuildObjectFromData(Object as integer)
local Vertices as integer
local Indices as integer
local Diffuse as dword
local Index as integer
local x as float
local y as float
local z as float
local nx as float
local ny as float
local nz as float
local i as integer
null = make vector3(1)
read Vertices
read Indices
make object new 1, Vertices, Indices, FVF_XYZ || FVF_NORMAL || FVF_DIFFUSE
lock vertexdata for limb 1, 0
for i = 0 to Vertices-1
read x, y, z
read nx, ny, nz
read Diffuse
set vertexdata position i, x, y, z
set vertexdata normals i, nx, ny, nz
set vertexdata diffuse i, Diffuse
next
for i = 0 to Indices-1
read Index
set indexdata i, Index
next
unlock vertexdata
endfunction
ObjectData:
data 24, 36 ` 24 vertices, 36 indices
` Vertex data
data -1, -1, -1, 0, 0, -1, 0xffffffff ` Front face
data -1, 1, -1, 0, 0, -1, 0xff000000
data 1, 1, -1, 0, 0, -1, 0xffff0000
data 1, -1, -1, 0, 0, -1, 0xff00ff00
data -1, -1, 1, 0, 0, 1, 0xff0000ff ` Back face
data -1, 1, 1, 0, 0, 1, 0xffffff00
data 1, 1, 1, 0, 0, 1, 0xff00ffff
data 1, -1, 1, 0, 0, 1, 0xffff00ff
data -1, -1, -1, -1, 0, 0, 0xffffffff ` Left face
data -1, 1, -1, -1, 0, 0, 0xff000000
data -1, -1, 1, -1, 0, 0, 0xff0000ff
data -1, 1, 1, -1, 0, 0, 0xffffff00
data 1, -1, -1, 1, 0, 0, 0xff00ff00 ` Right face
data 1, 1, -1, 1, 0, 0, 0xffff0000
data 1, -1, 1, 1, 0, 0, 0xffff00ff
data 1, 1, 1, 1, 0, 0, 0xff00ffff
data -1, 1, -1, 0, 1, 0, 0xff000000 ` Top face
data 1, 1, -1, 0, 1, 0, 0xffff0000
data -1, 1, 1, 0, 1, 0, 0xffffff00
data 1, 1, 1, 0, 1, 0, 0xff00ffff
data -1, -1, -1, 0, -1, 0, 0xffffffff ` Bottom face
data 1, -1, -1, 0, -1, 0, 0xff00ff00
data -1, -1, 1, 0, -1, 0, 0xff0000ff
data 1, -1, 1, 0, -1, 0, 0xffff00ff
` Index data
data 0, 1, 2, 0, 2, 3 ` Front face
data 4, 6, 5, 4, 7, 6 ` Back face
data 8, 10, 9, 9, 10, 11 ` Left face
data 12, 13, 14, 14, 13, 15 ` Right face
data 16, 19, 17, 16, 18, 19 ` Top face
data 20, 21, 22, 21, 23, 22 ` Bottom face
` FVF constants
#constant FVF_XYZ = 0x002
#constant FVF_XYZRHW = 0x004
#constant FVF_XYZB1 = 0x006
#constant FVF_XYZB2 = 0x008
#constant FVF_XYZB3 = 0x00a
#constant FVF_XYZB4 = 0x00c
#constant FVF_XYZB5 = 0x00e
#constant FVF_NORMAL = 0x010
#constant FVF_PSIZE = 0x020
#constant FVF_DIFFUSE = 0x040
#constant FVF_SPECULAR = 0x080
#constant FVF_TEX0 = 0x000
#constant FVF_TEX1 = 0x100
#constant FVF_TEX2 = 0x200
#constant FVF_TEX3 = 0x300
#constant FVF_TEX4 = 0x400
#constant FVF_TEX5 = 0x500
#constant FVF_TEX6 = 0x600
#constant FVF_TEX7 = 0x700
#constant FVF_TEX8 = 0x800