init commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "dvc_config.h"
|
||||
#include "dvc_pre_declare.h"
|
||||
#include "math/dvc_vector3.h"
|
||||
#include "math/dvc_vector4.h"
|
||||
#include "device/dvc_vertex_desc.h"
|
||||
|
||||
DV_CORE_BEGIN_NAMESPACE
|
||||
|
||||
class VertexShaderInterface
|
||||
{
|
||||
public:
|
||||
virtual const char* getName(void) const = 0;
|
||||
virtual const VertexDesc& getOutputVertexDesc() const = 0;
|
||||
|
||||
typedef std::function<DeviceBufferAccessorConstPtr(VertexElementType)> SetInputAttributeFunc;
|
||||
virtual void prepare(const UniformBuffer* uniformBuffer, SetInputAttributeFunc setInputAttributeFunc) = 0;
|
||||
|
||||
virtual void process(size_t index, void* outputVertex, fVector3& vertexWorldPos) = 0;
|
||||
};
|
||||
|
||||
class PixelShaderInterface
|
||||
{
|
||||
public:
|
||||
virtual const char* getName(void) const = 0;
|
||||
|
||||
typedef std::function<size_t(const std::string&)> SetInputAttributeFunc;
|
||||
virtual void prepare(const UniformBuffer* uniformBuffer, SetInputAttributeFunc setInputAttributeFunc) = 0;
|
||||
|
||||
virtual void process(const VertexDesc& veretexDesc, const float32_t* pixelData, fVector4& color) = 0;
|
||||
};
|
||||
|
||||
class ShaderFileInterface
|
||||
{
|
||||
public:
|
||||
virtual VertexShaderInterface* getVertexShader(const char* szName) = 0;
|
||||
virtual PixelShaderInterface* getPixelShader(const char* szName) = 0;
|
||||
};
|
||||
|
||||
typedef ShaderFileInterface* (*ShaderFileInterfaceFunc)();
|
||||
|
||||
DV_CORE_API ShaderFileInterface* LoadShaderFile(const char* szShaderFile);
|
||||
|
||||
DV_CORE_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user