Post by matthew on Feb 16, 2007 7:49:03 GMT -5
I'm really excited about the possibilities of what can be achieved using Truevision3D. ;D
So I've created a Template for your Programmes.
It's rather simplistic at this time but it works.
There are some good Truevision3D Tutorials here.
You'll need to run this first if you haven't already done so.
So I've created a Template for your Programmes.
It's rather simplistic at this time but it works.
There are some good Truevision3D Tutorials here.
You'll need to run this first if you haven't already done so.
CONST TV_KEY_ESCAPE = 1 ' The Escape Key on the Keyboard
DIM windowWidth : windowWidth = 640 ' Width of the Window
DIM windowHeight : windowHeight = 480 ' Height of the Window
Graphics.Initialize windowWidth, windowHeight ' Initialise the Graphics
Mouse.Initialize ' Initialise the Mouse if it's needed :)
DIM tv
SET tv = CreateObject("TrueVision3D.TrueVision8") ' Create our 3D Engine
tv.Init3DWindowedMode System.GethWnd
DIM scene
SET scene = CreateObject("TrueVision3D.Scene8") ' Create our 3D Scene
' ^^
' We need to create an Engine and a Scene before we can display anything on Screen.
DIM inp
SET inp = CreateObject("TrueVision3D.InputEngine8") ' I assume this handles Keyboard Input?
tv.DisplayFPS = FALSE ' Don't display the FramesPerSecond
Do
tv.Clear ' Clear the Screen
Scene.Drawtext "Hello World, I'm a Brutus2D-TrueVision3D App!!!", 10, 10 ' Write some Text
tv.RenderToScreen ' Now show our Text on the Screen
System.ProcessMessages ' Keep our Application responsive :)
Loop Until inp.IsKeyPressed(TV_KEY_ESCAPE) ' Loop until the 'Escape' Key is pressed
Set tv = Nothing ' These are Important...
Set scene = Nothing ' They Dispose of everything we've used...
Set inp = Nothing ' So there are no nasty memory leaks.
mouse.terminate ' Terminate the Mouse
graphics.terminate ' Terminate the Graphics