To explain this it needs a little information:
Some may remember I made some 3d-editor to draw 3d-stuff. This stuff has to be saved somehow in a format so it can be loaded as fast as even possible - so save can take its time but loading has to be fast.
Now the TBGL-Entities don't have native methods except loading m15 to get filled with data from file. m15-format does not support materials so I won't stick to them.
The creating of a display-list in TBGL works through passing single values in a certain order and not just through a pointer to the loaded binary data. It looks similar to this:
TBGL_NewList xyz
TBGL_BeginPoly %GL_TRIANGLES
TBGL_Color 255, 255, 255
TBGL_TexCoord2D 0.000000, 0.000000
TBGL_Normal 0.000000, 1.000000, 0.000000
TBGL_Vertex -4.250000, 4.250000, -0.200000
'...
TBGL_TexCoord2D 1.000000, 0.000000
TBGL_EndPoly
TBGL_EndList
so its always a keyword (tbgl-function) followed by comma delimited numbers, how to deal with the variable xyz we know already
My idea was to save the (3d-)data in the way it can be processed as fastest as possible from file - or string- without any further converting numbers nor looping through a bunch of data to sort them in - straightforward as one would type it in. And since oxygen can process stuff from string on the fly I wonder if there were a possibility that oxygen can call TB(GL)-Keywords and -functions - even if it means to save the keywords in the data prefixed in every line with somewhat like "send_to" or to list/declare all needed/used functions in advance before processing the data to install "the right connections"
I could imagine that would work only on non-core-functions - so maybe just on modules that are included through "uses". In doubt O2 should surely use its own functions if names are identical - or there could be a switch... So would be possible to use "Console_PrintL" or "File_Load" through oxygen-functions - and even TBGL_...
But in reality looks more like one had to declare all those needed functions from within oxygen at the current TB-pointer of the function inside TBGL-module for example...and since I have not found any method yet to get the function-pointers of a by tB loaded .dll I have no idea if it makes sense to think further into this direction.
So the final question: Could oxygen - i think in tB it's within the same process - use the functions of another currently loaded tB-module and how
- anyone ideas to this?
Bookmarks