fix error that depth/stencil buffer is not cleared (#1980)

This commit is contained in:
minggo
2019-12-10 18:02:22 +08:00
committed by GitHub
parent dedc3b9c90
commit bcc71049bf
3 changed files with 6 additions and 6 deletions
@@ -38,9 +38,9 @@ bool GLES2Window::Initialize(const GFXWindowInfo &info) {
GFXDepthStencilAttachment& depth_stencil_attachment = render_pass_info.depth_stencil_attachment;
render_pass_info.depth_stencil_attachment.format = depth_stencil_fmt_;
depth_stencil_attachment.depth_load_op = GFXLoadOp::LOAD;
depth_stencil_attachment.depth_load_op = GFXLoadOp::CLEAR;
depth_stencil_attachment.depth_store_op = GFXStoreOp::STORE;
depth_stencil_attachment.stencil_load_op = GFXLoadOp::LOAD;
depth_stencil_attachment.stencil_load_op = GFXLoadOp::CLEAR;
depth_stencil_attachment.stencil_store_op = GFXStoreOp::STORE;
depth_stencil_attachment.sample_count = 1;
depth_stencil_attachment.begin_layout = GFXTextureLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
@@ -158,8 +158,8 @@ class GLES3GPUInputAssembler : public Object {
public:
GFXAttributeList attribs;
GLES3GPUBufferList gpu_vertex_buffers;
GLES3GPUBuffer* gpu_index_buffer;
GLES3GPUBuffer* gpu_indirect_buffer;
GLES3GPUBuffer* gpu_index_buffer = nullptr;
GLES3GPUBuffer* gpu_indirect_buffer = nullptr;
GLES3GPUAttributeList gpu_attribs;
GLenum gl_index_type;
map<GLuint, GLuint>::type gl_vaos;
@@ -38,9 +38,9 @@ bool GLES3Window::Initialize(const GFXWindowInfo &info) {
GFXDepthStencilAttachment& depth_stencil_attachment = render_pass_info.depth_stencil_attachment;
render_pass_info.depth_stencil_attachment.format = depth_stencil_fmt_;
depth_stencil_attachment.depth_load_op = GFXLoadOp::LOAD;
depth_stencil_attachment.depth_load_op = GFXLoadOp::CLEAR;
depth_stencil_attachment.depth_store_op = GFXStoreOp::STORE;
depth_stencil_attachment.stencil_load_op = GFXLoadOp::LOAD;
depth_stencil_attachment.stencil_load_op = GFXLoadOp::CLEAR;
depth_stencil_attachment.stencil_store_op = GFXStoreOp::STORE;
depth_stencil_attachment.sample_count = 1;
depth_stencil_attachment.begin_layout = GFXTextureLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL;