Skip to content

Invalid operation when using depth texture #144

@ThibaultLejemble

Description

@ThibaultLejemble

When I attach a depth texture to a render pass I get an invalid operation OpenGL error (invalid operation) during operation "glDrawBuffers((GLsizei) draw_buffers.size(), draw_buffers.data())"! from this line

CHK(glDrawBuffers((GLsizei) draw_buffers.size(), draw_buffers.data()));
. And then I get the critical error RenderPass::RenderPass(): framebuffer is marked as incomplete: incomplete attachment.

I am using the example1.cpp file, where I added the following lines

        m_depth_tex = new Texture(
            Texture::PixelFormat::Depth,
            Texture::ComponentFormat::Float32,
            m_size);

        m_render_pass = new RenderPass({ this }, m_depth_tex);

If if replace GL_BACK_LEFT by attachment_id here

draw_buffers.push_back(GL_BACK_LEFT);
the invalid operation of glDrawBuffers is gone, but there is still the critical error of incomplete attachment.

I am using OpenGL on ubuntu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions