I have an application that works on OSX. Renders stuff on the GPU and serves it over network I use ofFbo to draw and then I fetch the texture. It works well, BUT I then have a window on my desktop. I would like to run this in the console directly without icons or windows.
I am creating an alternative ofAppWindow based on CGL. I used ofAppGLFWWindow as a base and I removed everything GLFW-related. I get a context, and I activate it.
What is working:
ofClear() with colors. I can fetch a texture with the color used
ofShader() with custom shaders. I get the normal result
If I use OF drawing primitives, I get a black texture.
I am a bit lost on why this is happening. Any ideas?
Regarding ofAVFoundationPlayer, it seems that since I deleted glfwPollEvents , observeValueForKeyPath (in ofAVFoundationVideoPlayer.m) never gets called.
How is this function getting subscribed to the poll loop?
OSX-specific addons may need a NSApp instance present with an event loop to work. I added a NSApplication and video, syphon worked; but then I get again the icon of the application.
SOLUTION:
It turns out that you can hide entirely your application with this simple line: