PDA

View Full Version : ScriptBasic & TBGL



John Spikowski
24-08-2013, 08:49
*** deleted ***

peter
24-08-2013, 15:33
Hi,

And here is the OxygenBasic Version.


include "sw.inc"
include "swgl.inc"


hwnd = Window 640,450, SW_WINDOWED
InitGl (hwnd)


single a
ClsColor 0, 0, 0, 255


while (1)

ClearScreen
glLoadIdentity
glRotatef a, 1.0, 1.0, 1.0
glBegin GL_TRIANGLES
glColor3ub 255,0,0 : glVertex3f -0.5, -0.5, 0.0
glColor3ub 0,255,0 : glVertex3f 0.5, -0.5, 0.0
glColor3ub 0,0,255 : glVertex3f 0.0, 0.5, 0.0
glEnd

DoEvents
SwapBuffer
SetFps (60)
a +=1
iF a>360 then a=0
iF Key(27) then Exit While

wend
QuitGl
Quit

Petr Schreiber
24-08-2013, 22:24
Hi John,

thanks for your interest, but I must disappoint you. TBGL functions are not classic functions - they use thinCore procedures for parsing to retrieve parameters. So TBGL as is will not be usable from other language without thinCore.

At the moment, my time resources are just enough to support TBGL in one language. I do not plan to make money on it so I am happy with the current approach.


Petr

P.S. The power of TBGL is not in the simple use as in the example posted, but in the built in extras such as model format handling, garbage collection, scene system and internal adaptivity mechanism, which scales the rendering code for different generations of GPUs. And state safe programming support of course.