Removed KRSurface dependencies from KRPipeline
This commit is contained in:
@@ -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<KRShader*>& 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<KRShader*>& shaders, uint32_t vertexAttributes, ModelFormat modelFormat)
|
||||
: KRContextObject(context)
|
||||
, m_deviceHandle(deviceHandle)
|
||||
|
||||
@@ -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<KRShader*>& shaders, uint32_t vertexAttributes, ModelFormat modelFormat);
|
||||
KRPipeline(KRContext& context, KRSurface& surface, const PipelineInfo& info, const char* szKey, const std::vector<KRShader*>& shaders, uint32_t vertexAttributes, ModelFormat modelFormat);
|
||||
virtual ~KRPipeline();
|
||||
const char* getKey() const;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ KRPipeline* KRPipelineManager::getPipeline(KRSurface& surface, const PipelineInf
|
||||
std::vector<KRShader*> 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user