Open GWRon opened 5 years ago
So the basic idea is: to have Render2Texture working all across the available drivers:
Means - if you do not use custom graphics drivers then you could just use it.
Maybe it would be a good idea to define the "Render2Texture" stuff already in brl.graphics (or the likes) so that all extending drivers have to incorporate the functionality (or to throw an error about being unsupported there). Both modules: legacy (read "maxmods") brl.mod and NG brl.mod are open source and ready for adjustments (especially if they only ADD functionality).
Bump.
Is there a chance to get it working on NG dx9/11 and default openGL?
I got DX9 working in NG and NG.SDL flavour. When doing a "change user" (Windows key + L) it looses the device and textures are gone.
This is why I added "Persist()" and "Valid()" methods with the first saving the GPU texture to the persistPixmap and in "OnDeviceLost()" it only tries to fetch a new pixmap if there is none existing yet. "Valid()" sets a flag if the image is no longer valid/ensured to be valid. That way you can simply create a new one in your app logic once you see it is no longer valid.
I also incorporated it right into Max2D (and its extensions) so that it runs "out of the box".
I made some PR for brl.mod, pub.mod and sdl.mod months ago ... seems nobody is interested in trying it out (ok one did try and found it cumbersome to not having Timage
as base for gpu and non-gpu images). So without much buzz, Brucey never merged it...
https://github.com/bmx-ng/brl.mod/pull/174
https://github.com/bmx-ng/pub.mod/pull/37
https://github.com/bmx-ng/sdl.mod/pull/26
For "live chats" (next to the classic issues here) you could join us on discord: https://discord.gg/udSSJkj
in davecamp/srs.mod#4 you (@davecamp) wrote
Which is why I open this issue to discuss this stuff and to increase the urge a bit :-)