I'm attempting to render Quake models in-game using the packed WAD files and drawing the textures using a mesh, but I have found no way to create one on the fly. Is there a function that will read pixel data and turn it into a usable texture for meshes?
[editline]24th June 2017[/editline]
You can use a DHTML panel. Thanks Meep: [url]https://gist.github.com/meepdarknessmeep/a2bb9c61e2cca03e2a37b2d305b1e0e0[/url]
Cheers for the solution, I had no idea it was possible.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/GetRenderTarget]GetRenderTarget[/url][[url=http://wiki.garrysmod.com/page/Global/GetRenderTargetEx]Ex[/url]] creates a texture
[QUOTE=NeatNit;52397980][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/GetRenderTarget]GetRenderTarget[/url][[url=http://wiki.garrysmod.com/page/Global/GetRenderTargetEx]Ex[/url]] creates a texture[/QUOTE]
I guess you could draw each pixel as a quad and use that, but it would take up a render tick and thus the user could see it.
[QUOTE=code_gs;52397987]I guess you could draw each pixel as a quad and use that, but it would take up a render tick and thus the user could see it.[/QUOTE]
I don't quite follow what process you're trying to use, but once you have your texture you can render into it via [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/render/PushRenderTarget]render.PushRenderTarget[/url] and nothing would appear on the screen.
[editline]25th June 2017[/editline]
If you share some code I might be more helpful :wink:
[QUOTE=NeatNit;52398027]I don't quite follow what process you're trying to use, but once you have your texture you can render into it via [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/render/PushRenderTarget]render.PushRenderTarget[/url] and nothing would appear on the screen.
[editline]25th June 2017[/editline]
If you share some code I might be more helpful :wink:[/QUOTE]
I'm needing to convert raw pixel/RGB data into a texture during gameplay. I don't see how the render target functions could efficiently do that -- Meep's method can do it async.
Sounds a bit like AB problem but hey, if you got it working that's great.
Sorry, you need to Log In to post a reply to this thread.