I have copied the example from the docs and i cant get it to work.
I do not see a pyramid.
I have changed a few bits from the original, they are :-
added GENX_OBJ()
X_MAKE2D just so i could put the print statement in
and i added 1,1000,45 to the X_MAKED bit as the compiler was complaining.
I have checked to make sure the pyramid saves and viewed it in Hemlos' AGOSA(very nice =D)
LOCAL mx,my,b1,b2,phi
LOCAL ob=GENX_OBJ()
X_OBJSTART ob
X_OBJADDVERTEX -5, -10, -5, 0,0,RGB(0,0,255)
X_OBJADDVERTEX 5, -10, -5, 0,0,RGB(0,0,255)
X_OBJADDVERTEX 0, 0, 0, 0,0,RGB(255,255,255) // Peak
X_OBJADDVERTEX 5, -10, 5, 0,0,RGB(0,0,255)
X_OBJADDVERTEX -5, -10, 5, 0,0,RGB(0,0,255)
// ..new Group
X_OBJNEWGROUP
// ...or Bottom
// X_OBJADDVERTEX 5, -10, -5, 0,0,RGB(0,0,255)
// X_OBJADDVERTEX -5, -10, -5, 0,0,RGB(0,0,255)
X_OBJADDVERTEX -5, -10, -5, 0,0,RGB(0,0,255)
X_OBJADDVERTEX 0, 0, 0, 0,0,RGB(255,255,255)
X_OBJADDVERTEX -5, -10, 5, 0,0,RGB(0,0,255)
X_OBJEND
// X_SAVEOBJ "Pyramid.ddd", 5
// X_LOADOBJ "Pyramid.ddd", ob
WHILE TRUE
MOUSESTATE mx, my, b1 ,b2
phi=mx*360 / 640
X_MAKE3D 1,1000,45
X_CAMERA 0, 1500, -3000, 0 ,0 ,0
X_DRAWAXES 0, 0, 0
X_AMBIENT_LT 0, RGB(255,255,0)
X_MOVEMENT mx-230, 0, 0
X_SCALING 3, 3, 3
X_ROTATION phi, 0, 1, 0
X_DRAWOBJ ob, 0
X_MAKE2D
PRINT "RUNNING",100,100
SHOWSCREEN
WEND
END
hmm.
It seems to be working now,don't know what happened there...
Nice if is working now the code is well... take a look to some OpenGL Wrappers, I think Kano did one and I did another, but Kano is more Pro than mine...
Take a look because you can do more things with lights and put a bit more powerfull the 3D, I think in 3D we are a bit obsolete, but I think with time all change in a future...
GLBasic has it's own OpenGL Wrapper done by Gernot and Nils.
You can find it under GLBasic\Samples\Common -> gl.gbas.
Cool thanks guys