Skip to content
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

Invalid operation when using depth texture #144

Open
ThibaultLejemble opened this issue Mar 31, 2023 · 0 comments
Open

Invalid operation when using depth texture #144

ThibaultLejemble opened this issue Mar 31, 2023 · 0 comments

Comments

@ThibaultLejemble
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant