28 #ifndef HPL_GPU_PROGRAM_H 29 #define HPL_GPU_PROGRAM_H 31 #include "hpl1/engine/graphics/GraphicsTypes.h" 32 #include "hpl1/engine/math/MathTypes.h" 33 #include "hpl1/engine/resources/ResourceBase.h" 34 #include "hpl1/engine/system/SystemTypes.h" 40 enum eGpuProgramType {
41 eGpuProgramType_Vertex,
42 eGpuProgramType_Fragment,
43 eGpuProgramType_LastEnum
46 enum eGpuProgramMatrix {
47 eGpuProgramMatrix_View,
48 eGpuProgramMatrix_Projection,
49 eGpuProgramMatrix_Texture,
50 eGpuProgramMatrix_ViewProjection,
51 eGpuProgramMatrix_LastEnum
54 enum eGpuProgramMatrixOp {
55 eGpuProgramMatrixOp_Identity,
56 eGpuProgramMatrixOp_Inverse,
57 eGpuProgramMatrixOp_Transpose,
58 eGpuProgramMatrixOp_InverseTranspose,
59 eGpuProgramMatrixOp_LastEnum
68 static void SetLogDebugInformation(
bool abX) { mbDebugInfo = abX; }
73 virtual void Bind() = 0;
79 virtual bool SetFloat(
const tString &asName,
float afX) = 0;
82 return SetVec2f(asName, avVec.x, avVec.y);
84 virtual bool SetVec2f(
const tString &asName,
float afX,
float afY) = 0;
87 return SetVec3f(asName, avVec.x, avVec.y, avVec.z);
90 return SetVec3f(asName, aCol.r, aCol.g, aCol.b);
92 virtual bool SetVec3f(
const tString &asName,
float afX,
float afY,
float afZ) = 0;
95 return SetVec4f(asName, aCol.r, aCol.g, aCol.b, aCol.a);
97 virtual bool SetVec4f(
const tString &asName,
float afX,
float afY,
float afZ,
float afW) = 0;
99 virtual bool SetMatrixf(
const tString &asName,
const cMatrixf &mMtx) = 0;
100 virtual bool SetMatrixf(
const tString &asName, eGpuProgramMatrix mType,
101 eGpuProgramMatrixOp mOp) = 0;
104 static bool mbDebugInfo;
109 #endif // HPL_GPU_PROGRAM_H
Definition: ResourceBase.h:36
Definition: GPUProgram.h:62