SystemProperty() Uses

Blitz3D Forums/Blitz3D Beginners Area/SystemProperty() Uses

_PJ_(Posted 2013) [#1]
I've only really used this function for cross-checking exe paths and locating AppData, but it really is a very powerful command.

I was wondering if anybody had actually hacked out any DLLs or identified how to use it for more functionality
(One possibly useful aspect springs to mind is the "Allow non-square textures" DX capabilities of GPU cards )

Admittedly there are CallDLL and the use of Userlibs & declarations which may or may not be better suited, but I can't help but feel there's some real potential here that's just not (to my knowledge) been tapped.

Even if nobody has done anything of the sort, is there any pointers on just how one might go about it?
I am just guessing here, but it sounds like it works by allowing access to pointers to retrieve the memory addresses of actual API system handles?


Kryzon(Posted 2013) [#2]
SystemProperty() can also return object handles:

Direct3D7
Direct3DDevice7
DirectDraw7
DirectInput7

Most of the "extention" libraries for Blitz3D (aShadow, Seyhajin, MikhailV [fastEXT], Devils Child [by Tom]) make use of the "Direct3DDevice7" value to hook into the context and change things.
This is how they manage the special effects they do, such as Environment Mapped Bump-Mapping.
If you can get access to Direct3D 7's SDK and know how to use C++ or other DLL creating languages, you can make use of this.


Yasha(Posted 2013) [#3]
it sounds like it works by allowing access to pointers to retrieve the memory addresses of actual API system handles?


...buuuuut remember that B3D doesn't expose any real way to manipulate raw pointers without using DLLs to do it anyway (the absolute bare minimum approach I can think of - at least, that doesn't involve ludicrously unsafe and unintended hackery - still requires you to use Windows kernel functions).


_PJ_(Posted 2013) [#4]

If you can get access to Direct3D 7's SDK and know how to use C++ or other DLL creating languages, you can make use of this.

I have a limited grasp now of the above, but not enough. I still wouldn't know where to begin.

So overall in the face of what's already out there and the workload involved, it's not particularly worthwhile, kinda "reinventing the wheel" unless there's something very specific that's required and hasn't been addressed by other libraries?

And needing custom DLL or the decls for windows DLLs to access windows API functions means that SystemProperty is unnecessary since the DLL can be used to do all that's required without it?


Yasha(Posted 2013) [#5]
SystemProperty is useful as an easy way to give the DLL access to the Blitz3D DirectX context, but yeah it requires a DLL to actually do anything with it. Blitz3D simply doesn't provide any actual DirectX functions to manipulate the acquired handles on its own.

I'd say the bigger reason why it's of limited utility is that it's still stuck with DirectX 7, and with FastExtension and so on basically all the mileage that there is to get has been got out of that particular API.

Because of the ongoing concerns about the long-term viability of DX7, if you really want to do something in that vein, it'd be better to start from scratch and do something with OpenGL 1.1 (OpenGL 1.1 is a "permanent" part of Windows - even though it's deprecated by the Khronos folks, it's a lot less likely to go anywhere any time soon and as long as you stick to the very basic functionality, may actually be the more reliable these days).

I'm very nearly ready to "officially" re-release bOGL version 2 (the core engine is there, it mainly needs testing, docs, and addon modules): you might want to keep an eye on that project if you're interested in ultralight 3D engines based on legacy tech.