For advanced OpenGL coders i miss more optinal params
i would like to see this protoypes
hWnd = TBGL_CreateSimpleWindow("Caption", XResolution, YResolution)
' create centered window on screen with zbuffer
hWnd = TBGL_CreateWindow ("Caption", XResolution, YResolution, BitDepth, windowFlags [, xPos , yPos ] )
' create centered window or fullscreen with ZBufferBits and flags and optional position
hWnd = TBGL_CreateWindowEx("Caption", XResolution, YResolution , ColorBits [, DepthBits] [,StencilBits] [,AccumBits] ,WindowFlags [, xPos , yPos ] )
' create window / fullscreen with user defined features
if any optional xBits are missing don't create this buffer
(a 2D Ortho render buffer don't need a zBuffer)
now if you support all 4 types of buffers (color, depth, stencil, accum)
you need optional params for clearing all or only user selected buffers
TBGL_ClearBuffer [ flags ]
%CLEAR_ALL ' all created buffers with one call (default or if flags are missed)
%CLEAR_COLOR = 1
%CLEAR_DEPTH = 2
%CLEAR_STENCIL = 4
%CLEAR_ACCUM = 8
Of course i can create my own OpenGL window with all my needs (shadows, ...)
but i think it's better to have only one thinBasic OpenGL module
i'm right ?
now i readed the whole TBGL help file line by line
and i must say you have done a realy good job
the sprite section is near complete
and i like the scene/entity system
By the way you know it ?
you can share the same display lists with multiply render context's
this would be the key to have more then one active TBGL controls
(i never used this feature but it's posible and should be simple)
thanks for your suggestions.
I will consider them for next releases.
Regading clear buffer -> TBGL_ClearFrame has already implemented optional params of %TBGL_CLEAR_COLOR, %TBGL_CLEAR_DEPTH as help file says.
As for accu buffer ... it is cool stuff, but it hasn't been hw accelerated for long time, that is why I avoided it in the past.
Credits for sprite system go to Michael Hartlef, which kindly developed it for TBGL module :occasion:
Regarding features "missing" from TBGL... I want to keep TBGL safe path, that is why there is no shaders and other advanced technologies. This is to protect the beginner users from using something which could fail on other machines.
I have this complaint regarding bigger free engines, which are action packed with latest stuff, but often there something fails mysteriously, even basic texturing.
But, would that mean limiting thinBASIC coders to code old safe path for grannys? Definitely not!
That is why there are OpenGL headers bundled with thinBASIC (in Inc folder).
Also, I keep in mind there are more advanced coders, like you, and this is why I prepare mechanisms, which will allow developing advanced modules, which can be integrated to TBGL (overriding of pixel format, ability to destroy resources along with main TBGL render surface and much more).
This stuff will make it to TBGL during ThinBASIC 2.x series.
I have currently one more secret, specialised module in working which will take advantage of more modern approaches, it will be targeted to higher end graphic cards users and plug-in able to TBGL.
P.S. Thanks for the tip about display list sharing. I know about it, I keep it in mind, but so far there has been no time to work on it. It would need some more complex internal rewrite, for which I need to allocate bigger amount of time.