Logo
InternalCommandBuffer.h
1#pragma once
2#include "BlendInfo.h"
3#include "StateInfo.h"
4
5namespace XXSharpKmyGfx
6{
7 ref class Shader;
8 ref class Texture;
9 ref class ModelInstance;
10 ref class ICBMaterial;
11
12 private ref class InternalCommandBufferHandle {
13 public:
14 kmyGfx::GameViewDrawCommandBuffer* _obj = nullptr;
15 };
16
17 private ref class InternalCommandBuffer
18 {
19 XXSharpKmyMath::Matrix4 _proj, _view;
20 bool owned = false;
21 public:
22 kmyGfx::GameViewDrawCommandBuffer* _obj = nullptr;
23
24 InternalCommandBuffer();
25 InternalCommandBuffer(kmyGfx::GameViewDrawCommandBuffer* ptr);
26 void begin();
27 InternalCommandBufferHandle^ close();
28
29 void bindFramebuffer(Framebuffer^ fb);
30 void viewport(u16 x, u16 y, u16 w, u16 h);
31 void clearFramebuffer(float r, float g, float b, float a, bool color, bool depth, bool stencil);
32 void setMatrix(XXSharpKmyMath::Matrix4 proj, XXSharpKmyMath::Matrix4 view);
33 void storeSystemParameter();
34 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, XXSharpKmyMath::Matrix4 transform, VertexBuffer^ vb);
35 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, XXSharpKmyMath::Matrix4 transform, array<XXSharpKmyMath::Vector3>^ data);
36 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, XXSharpKmyMath::Matrix4 transform, array<VertexPositionColor>^ data);
37 void drawVertices(PrimitiveType prim, ICBMaterial^ mtl, XXSharpKmyMath::Matrix4 transform, array<VertexPositionTextureColor>^ data);
38 void drawModelInstance(ModelInstance^ mdl, Material^ mtl, ShaderPass pass, bool ditherTranslucent);
39 void drawGeometry(GeometryInstance^ gi, Material^ mtl, ShaderPass pass, bool ditherTranslucent);
40 void drawGeometries(System::Func<GeometryInstance^, bool> ^filter, Material^ mtl, ShaderPass pass, bool ditherTranslucent);
41 void drawScreen(Material^ mtl);
42 void copyFramebuffer(Texture^ tex, int x, int y, int w, int h);
43
44 void execImmediate();
45
46 };
47}