wie im Betreff beschrieben funktioniert Text3D immer noch nicht.
Getestet auf Windows 7 (64-bit) mit Purebasic 5.20 beta 10 (32-bit), Subsystem OpenGL und Standard (DirectX9). Hier ein Beispielcode:
Code: Alles auswählen
EnableExplicit
Define.i tempTexture, tempMaterial, tempMesh, camera, light, node, entity, text1, text2
; init
InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindow(0,0,0,1024,768,"Bug Text3D",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0, #PB_Screen_WaitSynchronization)
; create objects
tempTexture = CreateTexture(#PB_Any, 64, 64)
StartDrawing(TextureOutput(tempTexture))
Box(0, 0, 64, 64, RGB(128, 128, 128))
Box(0, 31, 64, 3, RGB(255, 255, 255))
Box(31, 0, 3, 64, RGB(255, 255, 255))
StopDrawing()
tempMaterial = CreateMaterial(#PB_Any, TextureID(tempTexture))
tempMesh = CreateCube(#PB_Any, 50)
entity = CreateEntity(#PB_Any, MeshID(tempMesh), MaterialID(tempMaterial), 0, 0, 0)
RotateEntity(entity, 0, 45, 0, #PB_Relative)
node = CreateNode(#PB_Any, 0, 50, 0)
text1 = CreateText3D(#PB_Any, "Attached to entity") : Text3DColor(text1, RGB(0,224,0))
text2 = CreateText3D(#PB_Any, "Attached to node") : Text3DColor(text2, RGB(224,224,0))
If IsText3D(text1)
Debug "text1 succesful created"
EndIf
If IsText3D(text2)
Debug "text2 succesful created"
EndIf
AttachEntityObject(entity, "", Text3DID(text1))
AttachNodeObject(node, Text3DID(text2))
; create light
light = CreateLight(#PB_Any, RGB(225, 225, 225), 0, 25, 0, #PB_Light_Directional)
LightLookAt(light, 0,0,0)
; create camera
camera = CreateCamera(#PB_Any, 0, 0, 100, 100)
MoveCamera(camera, 0, 25, 250, #PB_Absolute)
;RotateCamera(camera, -15, 0, 0, #PB_Relative)
AmbientColor(RGB(32,32,32))
FreeMesh(tempMesh)
FreeMaterial(tempMaterial)
FreeTexture(tempTexture)
Repeat
While WindowEvent() : Wend
If ExamineKeyboard()
EndIf
RotateEntity(entity, 0, -0.1, 0, #PB_Relative)
RotateNode(node, 0, 0.1, 0, #PB_Relative)
RenderWorld()
FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape)
End