Logo
InternalCommandBuffer.h
1#pragma once
2#include "BlendInfo.h"
3#include "StateInfo.h"
4
5namespace SharpKmyGfx
6{
7 ref class Shader;
8 ref class Texture;
9 ref class ModelInstance;
10 ref class ICBMaterial;
11
12 public ref class InternalCommandBuffer
13 {
14 public:
15 kmyGfx::GameViewDrawCommandBuffer* _obj = nullptr;
16 bool _own = false;
17
19 InternalCommandBuffer(kmyGfx::GameViewDrawCommandBuffer* ptr);
22 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, array<SharpKmyMath::Vector3>^ data);
23 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, array<VertexPositionColor>^ data);
24 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, array<VertexPositionTextureColor>^ data);
26 void drawScreen(Material^ mtl);
28 /*
29 void bindShader(Shader^ shader, bool skinned);
30 void setTexture(int index, Texture^ t);
31 void setTransformUniform(int materialBufferIndex, SharpKmyMath::Matrix4 mtx4);
32 void drawVertices(PrimitiveType prim, int count, int instancenum);
33 void drawVertices(VertexBuffer^ vb);
34 void drawIndices(PrimitiveType prim, u32 count, u32 offset, IndexType itype, u32 instanceNum);
35 void bindBlend(BlendInfo bi);
36 void enableBlend(bool enable);
37 void viewport(u16 x, u16 y, u16 w, u16 h);
38 void clear(bool color, bool depth, bool stencil);
39 void clearColor(float r, float g, float b, float a);
40 void bindPolygonState(CullType cull, PolygonMode polygonmode);
41 void bindState(StateInfo si);
42 void getVertexAndDraw(PrimitiveType prim, int materialBufferIndex, SharpKmyMath::Matrix4 mtx4, array<SharpKmyMath::Vector3> ^data);
43 void getVertexAndDraw(PrimitiveType prim, int materialBufferIndex, SharpKmyMath::Matrix4 mtx4, array<VertexPositionTextureColor> ^data);
44 void setLineWidth(float width);
45 UniformWriter^ getUniformWriter(Shader^ shd);
46 */
47 void copyFramebuffer(Texture^ tex, int x, int y, int w, int h);
48 void clearFramebuffer(float r, float g, float b, float a, bool color, bool depth, bool stencil);
49 void viewport(u16 x, u16 y, u16 w, u16 h);
50 void reset();
51 };
52}
Definition: Framebuffer.h:8
Definition: ICBMaterial.h:6
Definition: InternalCommandBuffer.h:13
bool _own
Definition: InternalCommandBuffer.h:16
InternalCommandBuffer()
Definition: InternalCommandBuffer.cpp:7
void viewport(u16 x, u16 y, u16 w, u16 h)
Definition: InternalCommandBuffer.cpp:361
void copyFramebuffer(Texture^ tex, int x, int y, int w, int h)
Definition: InternalCommandBuffer.cpp:326
void reset()
Definition: InternalCommandBuffer.cpp:342
void clearFramebuffer(float r, float g, float b, float a, bool color, bool depth, bool stencil)
Definition: InternalCommandBuffer.cpp:334
~InternalCommandBuffer()
Definition: InternalCommandBuffer.cpp:21
void bindFramebuffer(Framebuffer^ fb)
Definition: InternalCommandBuffer.cpp:349
void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, VertexBuffer^ vb)
Definition: InternalCommandBuffer.cpp:31
void drawScreen(Material^ mtl)
Definition: InternalCommandBuffer.cpp:319
kmyGfx::GameViewDrawCommandBuffer * _obj
Definition: InternalCommandBuffer.h:15
void drawModelInstance(ModelInstance^ mdl, Material^ mtl)
Definition: InternalCommandBuffer.cpp:293
Definition: Material.h:6
Definition: ModelInstance.h:19
Definition: Texture.h:12
Definition: VertexBuffer.h:11
Definition: Matrix4.h:12
Definition: Asset.h:4
PrimitiveType
Definition: GfxTypes.h:76