diff --git a/kraken/KRPipeline.cpp b/kraken/KRPipeline.cpp index 8c3214c..8660a68 100644 --- a/kraken/KRPipeline.cpp +++ b/kraken/KRPipeline.cpp @@ -109,12 +109,6 @@ const char* KRPipeline::KRENGINE_PUSH_CONSTANT_NAMES[] = { "fade_color", // PushConstant::fade_color }; -KRPipeline::KRPipeline(KRContext& context, KRSurface& surface, const PipelineInfo& info, const char* szKey, const std::vector& shaders, uint32_t vertexAttributes, ModelFormat modelFormat) - : KRPipeline(context, surface.m_deviceHandle, surface.getForwardOpaquePass(), surface.getDimensions(), surface.getDimensions(), info, szKey, shaders, vertexAttributes, modelFormat) -{ -// TODO - renderPass needs to be selected dynamically from info.render_pass -} - KRPipeline::KRPipeline(KRContext& context, KrDeviceHandle deviceHandle, KRRenderPass& renderPass, Vector2i viewport_size, Vector2i scissor_size, const PipelineInfo& info, const char* szKey, const std::vector& shaders, uint32_t vertexAttributes, ModelFormat modelFormat) : KRContextObject(context) , m_deviceHandle(deviceHandle) diff --git a/kraken/KRPipeline.h b/kraken/KRPipeline.h index 5231bf7..118d218 100644 --- a/kraken/KRPipeline.h +++ b/kraken/KRPipeline.h @@ -41,7 +41,6 @@ class KRSampler; class KRShader; -class KRSurface; class KRRenderPass; class KRUniformBuffer; class KRTexture; @@ -216,7 +215,6 @@ class KRPipeline : public KRContextObject public: KRPipeline(KRContext& context, KrDeviceHandle deviceHandle, KRRenderPass& renderPass, Vector2i viewport_size, Vector2i scissor_size, const PipelineInfo& info, const char* szKey, const std::vector& shaders, uint32_t vertexAttributes, ModelFormat modelFormat); - KRPipeline(KRContext& context, KRSurface& surface, const PipelineInfo& info, const char* szKey, const std::vector& shaders, uint32_t vertexAttributes, ModelFormat modelFormat); virtual ~KRPipeline(); const char* getKey() const; diff --git a/kraken/KRPipelineManager.cpp b/kraken/KRPipelineManager.cpp index 2bb3eb0..482f998 100644 --- a/kraken/KRPipelineManager.cpp +++ b/kraken/KRPipelineManager.cpp @@ -83,7 +83,7 @@ KRPipeline* KRPipelineManager::getPipeline(KRSurface& surface, const PipelineInf std::vector shaders; shaders.push_back(m_pContext->getShaderManager()->get(*info.shader_name + ".vert", "spv")); shaders.push_back(m_pContext->getShaderManager()->get(*info.shader_name + ".frag", "spv")); - KRPipeline* pipeline = new KRPipeline(*m_pContext, surface, info, info.shader_name->c_str(), shaders, info.vertexAttributes, info.modelFormat); + KRPipeline* pipeline = new KRPipeline(*m_pContext, surface.m_deviceHandle, surface.getForwardOpaquePass(), surface.getDimensions(), surface.getDimensions(), info, info.shader_name->c_str(), shaders, info.vertexAttributes, info.modelFormat); m_pipelines[key] = pipeline;