project-aster/samples/03_model_render/pipeline_utils.h

28 lines
699 B
C++

// =============================================
// Aster: pipeline_utils.h
// Copyright (c) 2020-2024 Anish Bhobe
// =============================================
#pragma once
#include "global.h"
#include "pipeline.h"
#include <EASTL/array.h>
struct RenderResourceManager;
struct Swapchain;
struct Device;
constexpr auto VERTEX_SHADER_FILE = "shader/model.vs.hlsl.spv";
constexpr auto FRAGMENT_SHADER_FILE = "shader/model.ps.hlsl.spv";
struct Vertex
{
vec3 m_Position;
vec2 m_TexCoord0;
};
vk::ShaderModule CreateShader(const Device *device, cstr shaderFile);
Pipeline CreatePipeline(const Device *device, const Swapchain *swapchain, const RenderResourceManager *resourceManager);