Page 1 of 1

Write To Texture

Posted: Fri Sep 20, 2019 09:47
by Piotrus04
Hi all !

I couldn't figure out how to write to a texture using the current FFGL 2.0 sdk for resolume.

Anybody has an example of cpu generated picture sent to "pGL->inputTextures[ 0 ]" in the processOpenGl method ?

all the best

Re: Write To Texture

Posted: Fri Sep 20, 2019 16:10
by Menno
FreeFrame 1.0 is no longer supported so there's no cpu processing for images anymore. You need to use OpenGL to render textures. You can start by looking at the AddSubtract effect for example. When you're following an OpenGL tutorial pay particular attention to framebufferobjects, that's what you need to capture opengl output if you're interrested in that.

Re: Write To Texture

Posted: Fri Sep 20, 2019 20:27
by Piotrus04
Ok, but is it still possible to simply load an image (or fill an array in cpu side) and fill a texture with it, like a generator does?

Re: Write To Texture

Posted: Mon Sep 23, 2019 09:56
by Menno
Yes you will want to use OpenGL's glTexImage2D function.
This tutorial contains a description on how to load textures: http://www.opengl-tutorial.org/beginner ... ured-cube/

Re: Write To Texture

Posted: Thu Oct 10, 2019 01:35
by subpixel
Nice tutorial! All the way from explaining and coding for a BMP file to using DXT compressed textures. Interested to run through that myself some time.