mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
opengl: Implement blend state
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "backend/opengl/RenderPipelineGL.h"
|
||||
|
||||
#include "backend/opengl/BlendStateGL.h"
|
||||
#include "backend/opengl/DepthStencilStateGL.h"
|
||||
#include "backend/opengl/PersistentPipelineStateGL.h"
|
||||
#include "backend/opengl/OpenGLBackend.h"
|
||||
@@ -57,6 +58,14 @@ namespace opengl {
|
||||
|
||||
auto depthStencilState = ToBackend(GetDepthStencilState());
|
||||
depthStencilState->ApplyNow(persistentPipelineState);
|
||||
|
||||
|
||||
RenderPass* renderPass = ToBackend(GetRenderPass());
|
||||
auto& subpassInfo = renderPass->GetSubpassInfo(GetSubPass());
|
||||
|
||||
for (uint32_t attachmentSlot : IterateBitSet(subpassInfo.colorAttachmentsSet)) {
|
||||
ToBackend(GetBlendState(attachmentSlot))->ApplyNow(attachmentSlot);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user