ofVideoPlayer and ofDisableArbTex()

I’m updating an old project to OF 0.9.0 and noticed that I can’t get my ofVideoPlayer to render with ofDisableArbTex() turned on. I’m just seeing a white rect instead of my video texture. I did a sanity check with the videoPlayerExample and am getting the same thing.

Was this disabled on purpose or is it a bug?

(I’m on OS X 10.11)

Thanks!

Couple of updates:

cc @julapy :slight_smile:

So how did you solve this issue? Can you post an example of video binded to texture?
I updated to 0.9 and have the same problem atm.

I haven’t resolved it yet. Waiting to see if there’s a better alternative.

I did this recently and was surprised it worked as I didn’t think the non-Arb texture would draw

in setup()

ofFbo::Settings fboSettings;
    fboSettings.width = videoPlayer.getWidth();
    fboSettings.height = videoPlayer.getHeight();
    fboSettings.internalformat = GL_RGBA;
    fboSettings.textureTarget = GL_TEXTURE_2D;
    videoFBO.allocate(fboSettings);

in update()


videoPlayer.update();
videoFBO.begin();
videoPlayer.draw(0, 0);
videoFBO.end();
```

and in draw()
```
videoFBO.getTexture().draw(0, 0);

```

Thanks Jason! I wonder how much this affects performance. I guess the texture is never downloaded off the video card so it shouldn’t be too big a hit…

Maybe this is something that should be added to the video player behind the scenes when ofDisableArbTex() is called.

yeah - not sure - typically the default stuff works for me so I wasn’t really familiar how ofDisableArbTex() was supposed to work. But in this case I had to have a non-Arb texture.

Hey @prisonerjohn I see this issue on OS X.
Seems like a regression.

With AVF on OS X we are using AVF’s internal texture by default - if I load the pixels from the video into a ofTexture that texture shows fine.

On windows there isn’t an optimized texture being generated by the internal player itself so the ofVideoPlayer makes one which respects the ofDisableArb call.

I posted an issue here:
https://github.com/openframeworks/openFrameworks/issues/4722

Thanks for reporting this!

Right. I’m afraid we’ll have to go with something like @jvcleave’s solution, as it doesn’t look like CoreVideo lets you specify the texture target with that shared texture. I guess that makes sense since the texture already exists :wink:

I might take a stab at this in the next couple of days as I’m updating an old project and would rather not rewrite all my shaders!

This has been fixed and pushed to master so it should just work if you pull the latest changes. Details here, thanks @theo!

Hi,

I seem to be having the same issue on 9.3. I get a white background instead of a video with ofDisableArbTex() on OSX. I gave the videoPlayer example a go and experienced the same issue. Is this still an issue? @theo
If anyone has a workaround for this I’d appreciate it greatly!

R