Skip to content

How to know the frame is finish rendering after calling render with OpenGL backend? #7284

Answered by Mahmuttalemdar
August1996 asked this question in Q&A
Discussion options

You must be logged in to vote
// Create your own callback
using RenderCallback = std::function<void(uint8_t*, size_t, uint32_t, uint32_t)>;

// Create your own callback object
RenderCallback renderCallback;
std::vector<uint8_t> streamBuffer;
void Render() 
{    
    // Begin rendering frame
    if (renderer->beginFrame(swapChain)) {
        // Render the scene
        renderer->render(view);
        // End rendering frame
        renderer->endFrame();
        
        // If rendering streaming is enabled, perform post-render operations
        if (Config.RenderStreaming == true) {
            PostRender();
        }
    }
}
void PostRender()
 {
    // Create a PixelBufferDescriptor for reading pixels
    filament::b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@August1996
Comment options

Answer selected by August1996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants