Started declaring graphics resources
This commit is contained in:
@@ -14,4 +14,112 @@ namespace Seele
|
||||
bool bFullscreen;
|
||||
};
|
||||
|
||||
class RenderCommandBase
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(RenderCommandBase);
|
||||
|
||||
class DescriptorBinding
|
||||
{
|
||||
public:
|
||||
DescriptorBinding()
|
||||
: binding(0)
|
||||
, descriptorType(VK_DESCRIPTOR_TYPE_MAX_ENUM)
|
||||
, descriptorCount(-1)
|
||||
, shaderStages(VK_SHADER_STAGE_ALL)
|
||||
{}
|
||||
DescriptorBinding(const DescriptorBinding& other)
|
||||
: binding(other.binding)
|
||||
, descriptorType(other.descriptorType)
|
||||
, descriptorCount(other.descriptorCount)
|
||||
, shaderStages(other.shaderStages)
|
||||
{}
|
||||
void operator=(const DescriptorBinding& other)
|
||||
{
|
||||
binding = other.binding;
|
||||
descriptorType = other.descriptorType;
|
||||
descriptorCount = other.descriptorCount;
|
||||
shaderStages = other.shaderStages;
|
||||
}
|
||||
uint32_t binding;
|
||||
//TODO make generic enum
|
||||
VkDescriptorType descriptorType;
|
||||
uint32_t descriptorCount;
|
||||
VkShaderStageFlags shaderStages;
|
||||
};
|
||||
DECLARE_REF(DescriptorBinding);
|
||||
|
||||
class DescriptorAllocator
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(DescriptorAllocator);
|
||||
|
||||
class DescriptorSet
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(DescriptorSet);
|
||||
|
||||
class DescriptorLayout
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(DescriptorLayout);
|
||||
class PipelineLayout
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(PipelineLayout);
|
||||
class VertexDeclaration
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(VertexDeclaration);
|
||||
class GraphicsPipeline
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(GraphicsPipeline);
|
||||
class UniformBuffer
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(UniformBuffer);
|
||||
class Viewport
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(Viewport);
|
||||
class VertexBuffer
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(VertexBuffer);
|
||||
class IndexBuffer
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(IndexBuffer);
|
||||
class StructuredBuffer
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(StructuredBuffer);
|
||||
class Texture
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(Texture);
|
||||
class Texture2D : public Texture
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(Texture2D);
|
||||
class RenderPass
|
||||
{
|
||||
|
||||
};
|
||||
DECLARE_REF(RenderPass);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#include "SceneRenderPath.h"
|
||||
|
||||
Seele::SceneRenderPath::SceneRenderPath(Graphics* graphics)
|
||||
: RenderPath(graphics)
|
||||
{
|
||||
}
|
||||
|
||||
Seele::SceneRenderPath::~SceneRenderPath()
|
||||
{
|
||||
}
|
||||
|
||||
void Seele::SceneRenderPath::applyArea(Rect area)
|
||||
{
|
||||
}
|
||||
|
||||
void Seele::SceneRenderPath::init()
|
||||
{
|
||||
}
|
||||
|
||||
void Seele::SceneRenderPath::beginFrame()
|
||||
{
|
||||
}
|
||||
|
||||
void Seele::SceneRenderPath::render()
|
||||
{
|
||||
}
|
||||
|
||||
void Seele::SceneRenderPath::endFrame()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Seele
|
||||
class SceneRenderPath : public RenderPath
|
||||
{
|
||||
public:
|
||||
SceneRenderPath();
|
||||
SceneRenderPath(Graphics* graphics);
|
||||
virtual ~SceneRenderPath();
|
||||
virtual void applyArea(Rect area) override;
|
||||
virtual void init() override;
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#include "SceneView.h"
|
||||
#include "SceneRenderPath.h"
|
||||
|
||||
Seele::SceneView::SceneView()
|
||||
Seele::SceneView::SceneView(Graphics* graphics)
|
||||
: View(graphics)
|
||||
{
|
||||
renderer = new SceneRenderPath(graphics);
|
||||
}
|
||||
|
||||
Seele::SceneView::~SceneView()
|
||||
{
|
||||
}
|
||||
|
||||
void Seele::SceneView::initRenderer()
|
||||
{
|
||||
renderer = new SceneRenderPath();
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ namespace Seele
|
||||
class SceneView : public View
|
||||
{
|
||||
public:
|
||||
SceneView();
|
||||
SceneView(Graphics* graphics);
|
||||
~SceneView();
|
||||
virtual void initRenderer() override;
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "View.h"
|
||||
|
||||
Seele::View::View()
|
||||
Seele::View::View(Graphics* graphics)
|
||||
: graphics(graphics)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2,17 +2,18 @@
|
||||
#include "RenderPath.h"
|
||||
namespace Seele
|
||||
{
|
||||
class Graphics;
|
||||
// A view is a part of the window, which can be anything from a viewport to an editor
|
||||
class View
|
||||
{
|
||||
public:
|
||||
View();
|
||||
View(Graphics* graphics);
|
||||
virtual ~View();
|
||||
virtual void initRenderer() = 0;
|
||||
void beginFrame();
|
||||
void endFrame();
|
||||
void applyArea(Rect area);
|
||||
protected:
|
||||
Graphics* graphics;
|
||||
PRenderPath renderer;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Seele::Window::Window(const WindowCreateInfo& createInfo)
|
||||
: width(createInfo.width)
|
||||
, height(createInfo.height)
|
||||
{
|
||||
graphics = new VulkanGraphics();
|
||||
center = new Section();
|
||||
center->resizeArea(Rect(1, 1, 0, 0));
|
||||
center->addView(new SceneView());
|
||||
graphics = new VulkanGraphics();
|
||||
center->addView(new SceneView(graphics));
|
||||
windowHandle = graphics->createWindow(createInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user