-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodes (objects) port from ofxDatGui --> ImGui #18
Comments
Hmm, I didn't think about that case where you need to draw the GUI from OF. Another option is to link a texture-ID in order to display images. An image tex id can be an FBO tex ID, I think. |
Basically most of the objects that works with video/webcam/images, drawing ofTextures inside the objects, and sound objects with signal waveform visualizer (ofPolyline) or fft data (audio analysis). The linking of a texture id from an FBO seems the better choice, i'll check it. Don't like the transparent zone option, but i'm going to try them all and we'll talk again. |
Got it! using ofTexture with proper allocate: ofTextureData texData;
texData.width = camWidth;
texData.height = camHeight;
texData.textureTarget = GL_TEXTURE_2D;
texData.bFlipTexture = true;
static_cast<ofTexture *>(_outletParams[0])->allocate(texData); and calling a method from ofxImGui helpers did the trick:
So, problem solved, for ofPolyline waveform graphics, with ofTexture.bind()/unbind() will work! |
Yes, the FBO option would be the best option, that keeps Gui separated and "canalised" (with API methods). (don't spend too much time on the other solutions?) For plotting, checkout the ImGui demo Edit: Ok, great, works fine for FBOs. :) |
Actually there's no need for FBO, just using the link ofTexture pointer, so no GPU limits problem, it works like a charm! But is a really good idea to have a mechanism enabling/disabling automatic preview depending on the resources Great the plotting from imgui, i'll check it! |
No description provided.
The text was updated successfully, but these errors were encountered: