mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-05 07:45:59 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
38
BeefySysLib/gfx/Shader.h
Normal file
38
BeefySysLib/gfx/Shader.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
NS_BF_BEGIN;
|
||||
|
||||
class Texture;
|
||||
class Shader;
|
||||
|
||||
class ShaderParam
|
||||
{
|
||||
public:
|
||||
virtual ~ShaderParam() {}
|
||||
|
||||
virtual void SetTexture(Texture* texture) = 0;
|
||||
virtual void SetFloat2(float x, float y) { SetFloat4(x, y, 0, 1); }
|
||||
virtual void SetFloat3(float x, float y, float z) { SetFloat4(x, y, z, 1); }
|
||||
virtual void SetFloat4(float x, float y, float z, float w) = 0;
|
||||
};
|
||||
|
||||
class Shader
|
||||
{
|
||||
public:
|
||||
ShaderParam* mTextureParam;
|
||||
int mLastResizeCount;
|
||||
int mVertexSize;
|
||||
|
||||
public:
|
||||
virtual void Init();
|
||||
|
||||
public:
|
||||
Shader();
|
||||
virtual ~Shader();
|
||||
|
||||
virtual ShaderParam* GetShaderParam(const StringImpl& name) = 0;
|
||||
};
|
||||
|
||||
NS_BF_END;
|
Loading…
Add table
Add a link
Reference in a new issue