Open ThibaultLejemble opened 1 year ago
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 https://github.com/mitsuba-renderer/nanogui/blob/2ee903c96480d4aee54542ea3c340c13cc06dc32/src/renderpass_gl.cpp#L93. And then I get the critical error RenderPass::RenderPass(): framebuffer is marked as incomplete: incomplete attachment.
OpenGL error (invalid operation) during operation "glDrawBuffers((GLsizei) draw_buffers.size(), draw_buffers.data())"!
RenderPass::RenderPass(): framebuffer is marked as incomplete: incomplete attachment
I am using the example1.cpp file, where I added the following lines
example1.cpp
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 https://github.com/mitsuba-renderer/nanogui/blob/2ee903c96480d4aee54542ea3c340c13cc06dc32/src/renderpass_gl.cpp#L67 the invalid operation of glDrawBuffers is gone, but there is still the critical error of incomplete attachment.
GL_BACK_LEFT
attachment_id
glDrawBuffers
incomplete attachment
I am using OpenGL on ubuntu.
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 https://github.com/mitsuba-renderer/nanogui/blob/2ee903c96480d4aee54542ea3c340c13cc06dc32/src/renderpass_gl.cpp#L93. And then I get the critical errorRenderPass::RenderPass(): framebuffer is marked as incomplete: incomplete attachment
.I am using the
example1.cpp
file, where I added the following linesIf if replace
GL_BACK_LEFT
byattachment_id
here https://github.com/mitsuba-renderer/nanogui/blob/2ee903c96480d4aee54542ea3c340c13cc06dc32/src/renderpass_gl.cpp#L67 the invalid operation ofglDrawBuffers
is gone, but there is still the critical error ofincomplete attachment
.I am using OpenGL on ubuntu.