Write To Texture

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
Post Reply
Piotrus04
Met Resolume in a bar the other day
Posts: 8
Joined: Mon Nov 06, 2017 12:05

Write To Texture

Post by Piotrus04 » Fri Sep 20, 2019 09:47

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

Menno
Team Resolume
Posts: 91
Joined: Tue Mar 12, 2013 13:56

Re: Write To Texture

Post by Menno » Fri Sep 20, 2019 16:10

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.

Piotrus04
Met Resolume in a bar the other day
Posts: 8
Joined: Mon Nov 06, 2017 12:05

Re: Write To Texture

Post by Piotrus04 » Fri Sep 20, 2019 20:27

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?

Menno
Team Resolume
Posts: 91
Joined: Tue Mar 12, 2013 13:56

Re: Write To Texture

Post by Menno » Mon Sep 23, 2019 09:56

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/

User avatar
subpixel
Hasn't felt like this about software in a long time
Posts: 134
Joined: Thu Jun 05, 2014 09:32
Location: Melbourne, AU

Re: Write To Texture

Post by subpixel » Thu Oct 10, 2019 01:35

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.

Post Reply