Download

Image Buffer to Texture 2D

What is the best way for me to use an image buffer as a texture in a material?

I have an external application that produces a gui display using opengl, and gives me a pointer to the image buffers and details about the buffers: frame height, width, fps, active buffer index, etc. I want to have a ue4 material that uses the texture, so I can have a 3D computer screen. This buffer gets updated 30 times per second, so efficiency matters a lot. I’ve looked at import buffer as texture, but I’m not sure if it’s what I need or how to use it properly. I haven’t come across much online about it except for the link below, where the developer updates at 2 hz.

http://192.168.83.17:15871/cgi-bin/blockpage.cgi?ws-session=1173706638

**Import Buffer as Texture 2D - **Import Buffer as Texture 2D | Unreal Engine Documentation

I’m not sure if this is what I want, since it requires the buffer to be converted into a byte array. I’m guessing that the conversion could take more time than some hypothetical alternative where the material accesses the buffer’s texels directly when rendering to screen. But this is not an area I’m knowledgeable in. Am I right about it being more costly? Is there even an alternative?