- depth_buf.storage(DEPTH_COMPONENT, size, size, 0);
- depth_buf.image(0, DEPTH_COMPONENT, UNSIGNED_BYTE, 0);
- depth_buf.parameter(GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
- depth_buf.parameter(GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
- depth_buf.parameter(GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
- depth_buf.parameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- depth_buf.parameter(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ depth_buf.set_compare_enabled(true);
+ depth_buf.set_compare_func(LEQUAL);
+ depth_buf.set_wrap(CLAMP_TO_EDGE);
+ depth_buf.storage(DEPTH_COMPONENT, size, size);