Feature request: access to private identifier by..
BlitzMax Forums/BlitzMax Programming/Feature request: access to private identifier by..
| ||
using scoping. It would be nice to get access to some of the private functions and globals/constants in some modules.. like brl.glmax2d and brl.d3d7max2d. I keep getting graphical glitches because some states cannot be synced between my custom OpenGL drawing and the max2d driver (specifically access to BindTex would be the best). So, can we get a feature that allows us to use module scoping to use anything that is private in a module? Talking about this: brl.glmax2d.BindTex(name) brl.dxgraphics._driver |
| ||
Voting 'no' on this, since it introduces unnecessary ambiguity in the syntax. |
| ||
it introduces unnecessary ambiguity in the syntax. You can already use module scoping to tell the compiler exactly what you want to use (just not private identifiers). |
| ||
The other option, of course, is to do away with the BRL max2d module and implement your own version... plash.glmax2d. Copy it, rename it. Tweak the code. Job done. I did basically the same thing for my wxGLMax2d module, because the official one imported brl.glgraphics. (Why we couldn't have a "factory"-based approach to the XXGraphics modules, like we do with pixmap/audio loaders, I don't know - would save a lot of hassles). Anyhoo... :-) |
| ||
The other option, of course, is to do away with the BRL max2d module and implement your own version... plash.glmax2d. Is that legally out of line with the brl license?Copy it, rename it. Tweak the code. Job done. You can't create a DLL directly exporting brl modules, so why would we be able to change the copyright (in this case to MIT) and re-release it as our own? |
| ||
Alternatively..Local state_boundtex:Int ?NoTouch _brl_glmax2d_BindTex(..) state_boundtex = _brl_glmax2d_state_boundtex ' et cetera.. ? Take a peek at the *.i files in a module's directory and the assembly code in any '.bmx' folder (the one that gets generated when you compile code), and that code should make sense. EDIT: Where '?NoTouch .. ?' is defining an area with special privileges, different to '?<Operating System> .. ?' sections (compiling the enclosed code if the <Operating System> is the compiler's target). |