Logo
Render.h
1#pragma once
2
3#include "gfx/Texture.h"
4#include "gfx/Material.h"
5#include "Texture.h"
6#include "ModelData.h"
7#include "Color.h"
8#include "Math/Vector3.h"
9#include "Math/Matrix4.h"
10
11using namespace System;
12
13namespace XXSharpKmyPhysics
14{
15 ref class PhysicsBase;
16}
17
18namespace XXSharpKmyGfx
19{
20 ref class MaterialInstance;
21 ref class GeometryInstance;
22 ref class SpriteBatch;
23 ref class GeomCluster;
24 ref class Drawable;
25 value class Color;
26
27 //======================================================================================================================
31 private ref class Render
32 {
33 public:
34 bool owned;
35
36 public:
37 Render();
38 Render(int priority, int width, int height);
39 void Release();
40
41 Texture^ getColorTexture();
42 Texture^ getDepthTexture();
43 void setClearMask(u32 mask);
44 void setClearColor(float r, float g, float b, float a);
45 void setViewport(int x, int y, int width, int height);
46 XXSharpKmyGfx::Color getColor(int x, int y, float %depth);
47 void getColor(int x, int y, int w, int h, array<UINT32> ^buffer);
48
49#if KMY_VR
50 static Render^ getDefaultRender();
51 static Render^ getRender2D();
52 static Render^ getRenderL();
53 static Render^ getRenderR();
54#else // #if KMY_VR
55 static Render^ getDefaultRender();
56#endif // #if KMY_VR
57
58 void setViewMatrix(XXSharpKmyMath::Matrix4 proj, XXSharpKmyMath::Matrix4 view);
59 void addDrawable(Drawable ^drawable);
60 void getViewMatrix(XXSharpKmyMath::Matrix4 %proj, XXSharpKmyMath::Matrix4 %view);
61 bool viewVolumeCheck(XXSharpKmyMath::Vector3 pos, float radius);
62 void setAmbientColor(XXSharpKmyMath::Vector3 color);
63 void makeBatchAndDrawCall();
64 static void makeBatchAndDrawCallAll();
65
66 virtual void draw(){}
67
68 static bool isSameScene(Render ^s1, Render ^s2)
69 {
70 return true;
71 }
72
73 XXSharpKmyMath::Matrix4 proj, view;
74 };
75
76}