Option Explicit
'//declare references to revolution3d
Public Engine As New R3D_Engine
Public Control As New R3D_Control
Public Pipeline As New R3D_Pipeline
Public Interface2D As New R3D_Interface2D
Private Sub Form_Load()
Me.Width = 640 * Screen.TwipsPerPixelX
Me.Height = 480 * Screen.TwipsPerPixelX
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
Engine.Inf_SetRenderTarget Form1.hWnd, R3DRENDERTARGET_WINDOW
Engine.Inf_ForceResolution 640, 480, 16
If Engine.InitializeMe(True) = -1 Then End
With Pipeline
.SetAmbientLight 255, 255, 255
.SetBackColor 0, 0, 155
.SetDithering False
.SetSpecular False
.SetFillMode R3DFILLMODE_SOLID
.SetShadeMode R3DSHADEMODE_FLAT
.SetTextureFilter R3DTEXTUREFILTER_LINEARFILTER
End With
Dim bRun As Boolean
bRun = True
While Not bRun = False
If Control.Keyboard_GetKeyState(R3DKEY_ESCAPE) = True Then bRun = False
Pipeline.Renderer_Clear
Pipeline.Renderer_Render
Call Interface2D.Primitive_SetDrawColor(255, 255, 255)
Call Interface2D.Primitive_DrawText(50, 160, "Hello.I am Panos ")
Call Pipeline.Renderer_Display
Wend
Engine.TerminateMe
End
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
End Sub