opengl - Wrong framebuffer status (return 36054) when try to do depth attachment -


here code setting framebuffer shadow mapping, yet returns 36054 when checking framebuffer status. ideas?

//bind framebuffer shadow mapping gl.glgenframebuffers(1, framebuff); gl.glbindframebuffer(gl4.gl_framebuffer, framebuff.get(0));  gl.glgentextures(1, texturebuff);  gl.glbindtexture(gl4.gl_texture_2d, texturebuff.get(0)); gl.gltexstorage2d(gl4.gl_texture_2d, 1, gl4.gl_depth_component32f, displaywidth, displayheight); gl.gltexparameteri(gl4.gl_texture_2d, gl4.gl_texture_mag_filter, gl4.gl_linear); gl.gltexparameteri(gl4.gl_texture_2d, gl4.gl_texture_min_filter, gl4.gl_linear);//gl_linear_mipmap_linear gl.gltexparameteri(gl4.gl_texture_2d, gl4.gl_texture_wrap_s, gl4.gl_clamp_to_edge); gl.gltexparameteri(gl4.gl_texture_2d, gl4.gl_texture_wrap_t, gl4.gl_clamp_to_edge);  gl.gltexparameteri(gl4.gl_texture_2d, gl4.gl_texture_compare_mode, gl4.gl_compare_ref_to_texture); gl.gltexparameteri(gl4.gl_texture_2d, gl4.gl_texture_compare_func, gl4.gl_lequal); gl.glframebuffertexture(gl4.gl_framebuffer, gl4.gl_depth_attachment, texturebuff.get(0), 0); gl.gldrawbuffer(gl4.gl_none);  if(gl.glcheckframebufferstatus(gl4.gl_framebuffer) != gl4.gl_framebuffer_complete)     return gl.glcheckframebufferstatus(gl4.gl_framebuffer); 

fixed. displaywidth , displayheight set during reshape function, , assigned 0 default before assigned in reshape function, 0 @ time setting buffers, broke rule.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -