mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
fix error that depth/stencil buffer is not cleared (#1980)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user