Feature suggestion on window creation
issueid=112 05-03-2010 00:00
Number of reported issues by D.J.Peters: 7
Feature suggestion on window creation

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)

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)
Issue Details
Issue Number 112
Issue Type Feature
Project TBGL
Category Unknown
Status Suggested
Priority Unknown
Suggested Version Unknown
Implemented Version (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)

05-03-2010 09:08
Super Moderator
Hi Joshy,

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.

08-06-2013 09:44
My very last try ;-)

add a %TBGL_WS_STENCIL flag for the TBGL_CreateWindowEx() command
and of course %TBGL_CLEAR_STENCILfor the TBGL_ClearFrame() command also.

please, please, please, please, please, please please, please, please

It's ok if you self don't need it in TBGL but advanced TBGL users or
pure OpenGL coders or thinBasic module coders should have this feature.

Why we should create a new OpenGL window or Canvas as module for thinBasic
if you support thinBasic with TBGL all the years in the past ?

Think about it before you put this wish in a trash again.
(others asked for the missing stencil buffer feature before too)

I'm sure you need only 20 minutes to add this missing feature in TBGL.

Happy coding.


11-06-2013 12:16
Super Moderator

If you feel blocked, there are native OpenGL headers in ThinBASIC, in Inc folder:
  • thinBasic_gl.inc
  • thinBasic_glext.inc
  • thinBasic_wgl.inc
  • thinBasic_glu.inc

... which would allow to do what you need.

I am currently working on TBGL_PrintFont2D request by Rene, once done, I will consider other requests.
I must admit I am slightly offended by your tone, which is definitely not a thing of bad/good english skills.

Thank you for understanding,

+ Reply