Re: PureBasic 6.00 Alpha 1 released !
Posted: Thu May 20, 2021 1:28 am
Yes, I had misunderstood that too with the labels in a data section.
Then almost anything goes...
Then almost anything goes...
http://www.purebasic.com
https://www.purebasic.fr/english/
But is the following example supported? Because I'm getting an IMA.Fred wrote: Wed May 19, 2021 7:57 pm It only this syntax:
Which is not supportedCode: Select all
Data.i ?Label
Code: Select all
DataSection
IID_IHTMLDocument2:
Data.l $332C4425
Data.w $26CB, $11D0
Data.b $B4, $83, $00, $C0, $4F, $D9, $01, $19
EndDataSection
Procedure.i WebGadget_GetHTMLDocument2 (nGadget)
Protected oBrowser.IWebBrowser2 = GetWindowLongPtr_(GadgetID(nGadget), #GWL_USERDATA)
Protected oDocumentDispatch.IDispatch
Protected oHTMLDocument.IHTMLDocument2
If oBrowser
If oBrowser\get_document(@oDocumentDispatch) = #S_OK
If oDocumentDispatch\QueryInterface(?IID_IHTMLDocument2, @oHTMLDocument) = #S_OK
oDocumentDispatch\Release()
EndIf
EndIf
EndIf
ProcedureReturn oHTMLDocument
EndProcedure
And you SHOULD be extremely proud! I find it mindblowing how you've managed to go from an asm backend to C backend in such a relatively short period of time (and you can even successfully compile the IDE with it which shows how far along it already is!!!)Fred wrote: Wed May 19, 2021 10:08 amAfter months of development, we are very proud to release the next generation of PureBasic !
Fred can confirm that but I think the idea is to have both Backend available and you will have to choose the one you want to use via the compiler options menu.Saki wrote: Thu May 20, 2021 11:18 am A question, actually not important, I think.
Will the old compiler continue to exist, or will
only the new one will be included.
From the effort, I self think only the new will be developed further ?
" - The x86-x64 asm compilers will still be supported, we don't have a plan to drop them at this point "
Code: Select all
Structure Vector
x.f
y.f
z.f
m.f
EndStructure
InitEngine3D()
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Textures",#PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/fonts",#PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Scripts",#PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Models", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Packs/skybox.zip", #PB_3DArchive_Zip)
Parse3DScripts()
InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops()
Global bitplanes.b=DesktopDepth(0),RX.w=DesktopWidth(0),RY.w=DesktopHeight(0),refreshrate.a=DesktopFrequency(0)
; Global win.i=OpenWindow(#PB_Any,240,180,RX/3,RY/3,"press up/down to move",#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget|#PB_Window_SystemMenu|#PB_Window_TitleBar)
; OpenWindowedScreen(WindowID(win),0,0,RX/3,RY/3,1,0,0,#PB_Screen_WaitSynchronization)
OpenScreen(RX,RY,bitplanes,"press up/down to move",#PB_Screen_NoSynchronization)
Global camera.i=CreateCamera(#PB_Any,0,0,100,100)
MoveCamera(camera,0,0,300,#PB_Absolute)
CameraRange(camera,1,10000)
CameraLookAt(camera,0,0,0)
Global light.i=CreateLight(#PB_Any,RGB(245,245,245),0,100,200,#PB_Light_Point)
LightLookAt(light,0,0,0)
#NVertex=100000:#TransSteps=150:#ObjectStayTime=300
;- Material
Global mat.i=CreateMaterial(#PB_Any,TextureID(LoadTexture(#PB_Any,"White.jpg")))
DisableMaterialLighting(mat.i,1)
; MaterialShininess(mat,0)
; MaterialBlendingMode(mat,#PB_Material_AlphaBlend)
Global objeto.l=0,malla.i=CreateMesh(#PB_Any,#PB_Mesh_PointList,#PB_Mesh_Static),Dim TargetVertex.Vector(#NVertex),Dim trans.Vector(#NVertex),TransCount.l
Global Dim MallaData.PB_MeshVertex(#NVertex)
Procedure DrawMatrix()
Protected r.w=230,g.w=200,b.w=110,i.i
For i=0 To #NVertex
MallaData(i)\color=RGBA(r,g,b,200)
MeshVertexPosition(MallaData(i)\x,MallaData(i)\y,MallaData(i)\z)
MeshVertexColor(MallaData(i)\color)
Next
FinishMesh(1)
SetMeshMaterial(malla,MaterialID(mat))
EndProcedure
Macro getmod(ve)
v#\m=Sqr(v#\x*v#\x+v#\y*v#\y+v#\z*v#\z)
EndMacro
Macro GetTransStepVector()
trans(i)\x=(TargetVertex(i)\x-MallaData(i)\x)/#TransSteps
trans(i)\y=(TargetVertex(i)\y-MallaData(i)\y)/#TransSteps
trans(i)\z=(TargetVertex(i)\z-MallaData(i)\z)/#TransSteps
EndMacro
Procedure object(obj.l)
;ver más en http://www.mathcurve.com/surfaces/superficies.shtml
Protected i.l,xd.f,u.f,ii.f=360/#NVertex
Select obj
Case 1
For i=0 To #NVertex
TargetVertex(i)\x=(Random(1800)-900)/10;*i/#NVertex
TargetVertex(i)\y=(Random(1800)-900)/10;*i/#NVertex
TargetVertex(i)\z=(Random(1800)-900)/10;*i/#NVertex
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 2
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 3
;cinta de moebius
For i=0 To #NVertex
xd=Random(18000)*2*#PI/18000
u=(i/#NVertex-1/2)/2
TargetVertex(i)\x=100*Cos(xd)*(1+u*Cos(xd/2))
TargetVertex(i)\y=100*Sin(xd)*(1+u*Cos(xd/2))
TargetVertex(i)\z=100*u*Sin(xd/2)
;Get "trans" Step-vector:
GetTransStepVector()
Next
Case 4
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(i*360/#NVertex)*Cos(u)*100
TargetVertex(i)\y=Cos(xd)*Cos(u)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 5
For i=0 To #NVertex
xd=Random(1800)
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Cos(xd)*Sin(xd)*100
TargetVertex(i)\z=Sin(i*ii)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 6
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 7
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(u)*Cos(u)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 8
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 9
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(u)*Cos(u)*Sin(xd)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*Cos(xd)*100
TargetVertex(i)\z=Sin(xd)*Cos(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 10
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*100
TargetVertex(i)\z=Cos(xd)*Sin(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 11
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Sin(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 12
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(u)*Cos(xd)*100
TargetVertex(i)\y=Sin(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*Sin(xd)*Cos(u)*Cos(xd)*200
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 13
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Sin(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 14
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(xd)*Cos(xd)*100
TargetVertex(i)\y=Sin(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 15
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(u)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*Cos(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 16
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*Sin(u)*100
TargetVertex(i)\y=Sin(u)*Sin(xd)*Cos(u)*100
TargetVertex(i)\z=Sin(xd)*Cos(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 17
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Cos(u)*Sin(u)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 18
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Sin(u)*100
TargetVertex(i)\y=Cos(xd)*Cos(u)*100
TargetVertex(i)\z=Cos(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 19
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(xd)*Cos(xd)*Sin(u)*200
TargetVertex(i)\y=Sin(u)*Cos(u)*Sin(xd)*200
TargetVertex(i)\z=Sin(u)*Cos(xd)*Cos(u)*200
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 20
For i=0 To #NVertex
TargetVertex(i)\x=Random(150)-75
TargetVertex(i)\y=Random(150)-75
TargetVertex(i)\z=Random(150)-75
If Random(1)
PokeF(TargetVertex(i)+SizeOf(float)*(Random(2)),75)
Else
PokeF(TargetVertex(i)+SizeOf(float)*(Random(2)),-75)
EndIf
;Get "trans" step-vector:
GetTransStepVector()
Next
Default
For i=0 To #NVertex
TargetVertex(i)\x=(Random(1800)-900)/10*i/#NVertex
TargetVertex(i)\y=(Random(1800)-900)/10*i/#NVertex
TargetVertex(i)\z=(Random(1800)-900)/10*i/#NVertex
;Get "trans" step-vector:
GetTransStepVector()
Next
EndSelect
Transcount=#TransSteps
EndProcedure
;==============================================================
DrawMatrix()
GetMeshData(malla,0,MallaData(),#PB_Mesh_Vertex,0,MeshVertexCount(malla)-1)
enti.i=CreateEntity(#PB_Any,MeshID(malla),MaterialID(mat))
zz.f=0
; UseCursor(0)
CreateText3D(0,StrF(Engine3DStatus(#PB_Engine3D_CurrentFPS)),"",10,$ffAAAA44):MoveText3D(0,-200,100,0,#PB_Absolute)
Repeat
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Up)
zz.f+20
ElseIf KeyboardPushed(#PB_Key_Down)
zz.f-20
EndIf
If contador.l=0
contador.l=#ObjectStayTime
objeto+1:If objeto>20:objeto=1:EndIf
object(objeto.l)
EndIf
contador.l-1
If TransCount>0
TransCount-1
If TransCount>0
For i.i=0 To #NVertex
MallaData(i)\x+trans(i)\x
MallaData(i)\y+trans(i)\y
MallaData(i)\z+trans(i)\z
Next
SetMeshData(malla, 0, MallaData(), #PB_Mesh_Vertex, 0, MeshVertexCount(malla)-1)
Else
For i.i=0 To #NVertex
MallaData(i)\x = TargetVertex(i)\x
MallaData(i)\y = TargetVertex(i)\y
MallaData(i)\z = TargetVertex(i)\z
Next
SetMeshData(malla, 0, MallaData(), #PB_Mesh_Vertex, 0, MeshVertexCount(malla)-1)
EndIf
EndIf
Text3DCaption(0,"MIN: "+StrF(Engine3DStatus(#PB_Engine3D_MinimumFPS),2)+" MAX: "+StrF(Engine3DStatus(#PB_Engine3D_MaximumFPS),2))
MoveEntity(enti,0,0,zz,#PB_Absolute)
RotateEntity(enti,1.333,0.5,0.2,#PB_Relative)
RenderWorld()
FlipBuffers();:Delay(4)
Until KeyboardPushed(#PB_Key_Escape); Or WindowEvent()=#PB_Event_CloseWindow
Code: Select all
Structure Vector
x.f
y.f
z.f
m.f
EndStructure
Structure PointVertex
x.f
y.f
z.f
color.l;d3dcolor
EndStructure
InitEngine3D()
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Textures",#PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/fonts",#PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Scripts",#PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Models", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home+"examples/3d/Data/Packs/skybox.zip", #PB_3DArchive_Zip)
Parse3DScripts()
InitSprite()
InitKeyboard()
InitMouse()
ExamineDesktops()
Global bitplanes.b=DesktopDepth(0),RX.w=DesktopWidth(0),RY.w=DesktopHeight(0),refreshrate.a=DesktopFrequency(0)
; Global win.i=OpenWindow(#PB_Any,240,180,RX/3,RY/3,"press up/down to move",#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget|#PB_Window_SystemMenu|#PB_Window_TitleBar)
; OpenWindowedScreen(WindowID(win),0,0,RX/3,RY/3,1,0,0,#PB_Screen_WaitSynchronization)
OpenScreen(RX,RY,bitplanes,"press up/down to move",#PB_Screen_NoSynchronization)
Global camera.i=CreateCamera(#PB_Any,0,0,100,100)
MoveCamera(camera,0,0,300,#PB_Absolute)
CameraRange(camera,1,10000)
CameraLookAt(camera,0,0,0)
Global light.i=CreateLight(#PB_Any,RGB(245,245,245),0,100,200,#PB_Light_Point)
LightLookAt(light,0,0,0)
#NVertex=100000:#TransSteps=150:#ObjectStayTime=600
;- Material
Global mat.i=CreateMaterial(#PB_Any,TextureID(LoadTexture(#PB_Any,"White.jpg")))
DisableMaterialLighting(mat.i,1)
; MaterialShininess(mat,0)
; MaterialBlendingMode(mat,#PB_Material_AlphaBlend)
Global objeto.l=0,Stars.i,malla.i=CreateMesh(#PB_Any,#PB_Mesh_PointList,#PB_Mesh_Static),Dim OriginVertex.PointVertex(#NVertex),Dim TargetVertex.Vector(#NVertex),Dim trans.Vector(#NVertex),TransCount.l
Procedure DrawMatrix()
Protected r.w=230,g.w=200,b.w=110,i.i
For i=0 To #NVertex
OriginVertex(i)\color=RGBA(r,g,b,200)
MeshVertexPosition(OriginVertex(i)\x,OriginVertex(i)\y,OriginVertex(i)\z)
MeshVertexColor(OriginVertex(i)\color)
Next
FinishMesh(0)
SetMeshMaterial(malla,MaterialID(mat))
Stars.i=CreateNode(#PB_Any,0,0,0)
AttachNodeObject(Stars,MeshID(malla))
EndProcedure
Macro getmod(ve)
v#\m=Sqr(v#\x*v#\x+v#\y*v#\y+v#\z*v#\z)
EndMacro
Macro GetTransStepVector()
trans(i)\x=(TargetVertex(i)\x-OriginVertex(i)\x)/#TransSteps
trans(i)\y=(TargetVertex(i)\y-OriginVertex(i)\y)/#TransSteps
trans(i)\z=(TargetVertex(i)\z-OriginVertex(i)\z)/#TransSteps
EndMacro
Procedure object(obj.l)
;ver más en http://www.mathcurve.com/surfaces/superficies.shtml
Protected i.l,xd.f,u.f,ii.f=360/#NVertex
Select obj
Case 1
For i=0 To #NVertex
TargetVertex(i)\x=(Random(1800)-900)/10;*i/#NVertex
TargetVertex(i)\y=(Random(1800)-900)/10;*i/#NVertex
TargetVertex(i)\z=(Random(1800)-900)/10;*i/#NVertex
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 2
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 3
;cinta de moebius
For i=0 To #NVertex
xd=Random(18000)*2*#PI/18000
u=(i/#NVertex-1/2)/2
TargetVertex(i)\x=100*Cos(xd)*(1+u*Cos(xd/2))
TargetVertex(i)\y=100*Sin(xd)*(1+u*Cos(xd/2))
TargetVertex(i)\z=100*u*Sin(xd/2)
;Get "trans" Step-vector:
GetTransStepVector()
Next
Case 4
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(i*360/#NVertex)*Cos(u)*100
TargetVertex(i)\y=Cos(xd)*Cos(u)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 5
For i=0 To #NVertex
xd=Random(1800)
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Cos(xd)*Sin(xd)*100
TargetVertex(i)\z=Sin(i*ii)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 6
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 7
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(u)*Cos(u)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 8
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 9
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(u)*Cos(u)*Sin(xd)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*Cos(xd)*100
TargetVertex(i)\z=Sin(xd)*Cos(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 10
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(u)*Sin(xd)*100
TargetVertex(i)\z=Cos(xd)*Sin(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 11
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Sin(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 12
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(u)*Cos(xd)*100
TargetVertex(i)\y=Sin(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*Sin(xd)*Cos(u)*Cos(xd)*200
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 13
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Sin(u)*Sin(xd)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 14
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(xd)*Cos(xd)*100
TargetVertex(i)\y=Sin(xd)*Sin(u)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 15
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*100
TargetVertex(i)\y=Cos(u)*Sin(u)*100
TargetVertex(i)\z=Sin(xd)*Cos(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 16
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(u)*Sin(u)*100
TargetVertex(i)\y=Sin(u)*Sin(xd)*Cos(u)*100
TargetVertex(i)\z=Sin(xd)*Cos(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 17
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Cos(xd)*100
TargetVertex(i)\y=Cos(u)*Sin(u)*100
TargetVertex(i)\z=Sin(u)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 18
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Cos(xd)*Sin(u)*100
TargetVertex(i)\y=Cos(xd)*Cos(u)*100
TargetVertex(i)\z=Cos(xd)*100
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 19
For i=0 To #NVertex
xd=Random(1800)
u=i*ii
TargetVertex(i)\x=Sin(xd)*Cos(xd)*Sin(u)*200
TargetVertex(i)\y=Sin(u)*Cos(u)*Sin(xd)*200
TargetVertex(i)\z=Sin(u)*Cos(xd)*Cos(u)*200
;Get "trans" step-vector:
GetTransStepVector()
Next
Case 20
For i=0 To #NVertex
TargetVertex(i)\x=Random(150)-75
TargetVertex(i)\y=Random(150)-75
TargetVertex(i)\z=Random(150)-75
If Random(1)
PokeF(TargetVertex(i)+SizeOf(float)*(Random(2)),75)
Else
PokeF(TargetVertex(i)+SizeOf(float)*(Random(2)),-75)
EndIf
;Get "trans" step-vector:
GetTransStepVector()
Next
Default
For i=0 To #NVertex
TargetVertex(i)\x=(Random(1800)-900)/10*i/#NVertex
TargetVertex(i)\y=(Random(1800)-900)/10*i/#NVertex
TargetVertex(i)\z=(Random(1800)-900)/10*i/#NVertex
;Get "trans" step-vector:
GetTransStepVector()
Next
EndSelect
Transcount=#TransSteps
EndProcedure
;==============================================================
DrawMatrix()
; enti.i=CreateEntity(#PB_Any,MeshID(malla),MaterialID(mat))
zz.f=0
; UseCursor(0)
CreateText3D(0,StrF(Engine3DStatus(#PB_Engine3D_CurrentFPS)),"",10,$ffAAAA44):MoveText3D(0,-200,100,0,#PB_Absolute)
Repeat
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Up)
zz.f+20
ElseIf KeyboardPushed(#PB_Key_Down)
zz.f-20
EndIf
If contador.l=0
contador.l=#ObjectStayTime
objeto+1:If objeto>20:objeto=1:EndIf
object(objeto.l)
EndIf
contador.l-1
If TransCount>0
TransCount-1
If TransCount>0
UpdateMesh(malla,0)
For i.i=0 To #NVertex
OriginVertex(i)\x+trans(i)\x
OriginVertex(i)\y+trans(i)\y
OriginVertex(i)\z+trans(i)\z
MeshVertexPosition(OriginVertex(i)\x,OriginVertex(i)\y,OriginVertex(i)\z)
Next
FinishMesh(0)
Else
UpdateMesh(malla,0)
For i.i=0 To #NVertex
OriginVertex(i)\x=TargetVertex(i)\x
OriginVertex(i)\y=TargetVertex(i)\y
OriginVertex(i)\z=TargetVertex(i)\z
MeshVertexPosition(OriginVertex(i)\x,OriginVertex(i)\y,OriginVertex(i)\z)
Next
FinishMesh(0)
EndIf
EndIf
Text3DCaption(0,"MIN: "+StrF(Engine3DStatus(#PB_Engine3D_MinimumFPS),2)+" MAX: "+StrF(Engine3DStatus(#PB_Engine3D_MaximumFPS),2))
MoveNode(Stars,0,0,zz,#PB_Absolute)
RotateNode(Stars,1.333,0.5,0.2,#PB_Relative)
RenderWorld()
FlipBuffers();:Delay(4)
Until KeyboardPushed(#PB_Key_Escape); Or WindowEvent()=#PB_Event_CloseWindow
Marc56us wrote: Thu May 20, 2021 1:01 pm" - The x86-x64 asm compilers will still be supported, we don't have a plan to drop them at this point "
https://www.purebasic.fr/english/viewto ... 30#p567230
will I be able to use DLL with classes? similar to the SteamWorks API?Fred wrote: Wed May 19, 2021 10:08 am
to have the C backend at the same level than the current ASM backend. For this, we opened a new specific forum to report C related backend.
I have not noticed that. Maybe you are using some libs (UseSQLiteDatabase(),UsePNGImageEncoder(),...) in your apps that are now updated with a new PB version. Or you are maybe comparing 64bit exe with a previous 32 bit exe. Also make sure to tick "Optimize generated code" in compiler options. It is disabled by default.CDXbow wrote: Sat May 22, 2021 2:06 am but I have noticed the C compiled programs are about 30% bigger.
For the tests I have done so far with my existing programs, I have found 2% to 8% more size (so insignificant given the small initial size of PB programs)CDXbow wrote: Sat May 22, 2021 2:06 am Big thanks to Fred and the team, you guys are brilliant.
I've recompiled & run half a dozen small programs without problems.
I can't see any speed difference in the exes, but I have noticed the C compiled programs are about 30% bigger.