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 kmyGfx::SYSTEMLAYOUT* _lyt = nullptr;
15 public:
16 kmyGfx::GameViewDrawCommandBuffer* _obj = nullptr;
17 bool _own = false;
18
20 InternalCommandBuffer(kmyGfx::GameViewDrawCommandBuffer* ptr);
23 void reset();
24
26 void viewport(u16 x, u16 y, u16 w, u16 h);
27 void clearFramebuffer(float r, float g, float b, float a, bool color, bool depth, bool stencil);
29
31
33 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, array<SharpKmyMath::Vector3>^ data);
34 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, array<VertexPositionColor>^ data);
35 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, array<VertexPositionTextureColor>^ data);
36 void drawModelInstance(ModelInstance^ mdl, Material^ mtl, ShaderPass pass, bool ditherTranslucent);
37 void drawGeometry(GeometryInstance^ gi, Material^ mtl, ShaderPass pass, bool ditherTranslucent);
38 void drawGeometries(System::Func<GeometryInstance^, bool> ^filter, Material^ mtl, ShaderPass pass, bool ditherTranslucent);
39 void drawScreen(Material^ mtl);
40 void execImmediate();
41
42 void copyFramebuffer(Texture^ tex, int x, int y, int w, int h);
43 };
44}
Definition: Framebuffer.h:8
Definition: GeometryInstance.h:9
Definition: ICBMaterial.h:6
Definition: InternalCommandBuffer.h:13
void storeSystemParameter()
Definition: InternalCommandBuffer.cpp:440
bool _own
Definition: InternalCommandBuffer.h:17
void drawModelInstance(ModelInstance^ mdl, Material^ mtl, ShaderPass pass, bool ditherTranslucent)
Definition: InternalCommandBuffer.cpp:300
InternalCommandBuffer()
Definition: InternalCommandBuffer.cpp:7
void drawGeometries(System::Func< GeometryInstance^, bool > ^filter, Material^ mtl, ShaderPass pass, bool ditherTranslucent)
Definition: InternalCommandBuffer.cpp:349
void drawGeometry(GeometryInstance^ gi, Material^ mtl, ShaderPass pass, bool ditherTranslucent)
Definition: InternalCommandBuffer.cpp:327
kmyGfx::SYSTEMLAYOUT * _lyt
Definition: InternalCommandBuffer.h:14
void setMatrix(SharpKmyMath::Matrix4 proj, SharpKmyMath::Matrix4 view)
Definition: InternalCommandBuffer.cpp:425
void viewport(u16 x, u16 y, u16 w, u16 h)
Definition: InternalCommandBuffer.cpp:418
void copyFramebuffer(Texture^ tex, int x, int y, int w, int h)
Definition: InternalCommandBuffer.cpp:383
void reset()
Definition: InternalCommandBuffer.cpp:399
void clearFramebuffer(float r, float g, float b, float a, bool color, bool depth, bool stencil)
Definition: InternalCommandBuffer.cpp:391
~InternalCommandBuffer()
Definition: InternalCommandBuffer.cpp:23
void bindFramebuffer(Framebuffer^ fb)
Definition: InternalCommandBuffer.cpp:406
void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, SharpKmyMath::Matrix4 transform, VertexBuffer^ vb)
Definition: InternalCommandBuffer.cpp:38
void drawScreen(Material^ mtl)
Definition: InternalCommandBuffer.cpp:376
kmyGfx::GameViewDrawCommandBuffer * _obj
Definition: InternalCommandBuffer.h:16
void execImmediate()
Definition: InternalCommandBuffer.cpp:447
Definition: Material.h:6
Definition: ModelInstance.h:19
Definition: Texture.h:12
Definition: VertexBuffer.h:11
Definition: Matrix4.h:12
Definition: Asset.h:4
ShaderPass
Definition: GfxTypes.h:220
PrimitiveType
Definition: GfxTypes.h:76