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 SharpKmyPhysics
14{
15 ref class PhysicsBase;
16}
17
18namespace SharpKmyGfx
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 public 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
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 SharpKmyGfx::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
59 void addDrawable(Drawable ^drawable);
61 bool viewVolumeCheck(SharpKmyMath::Vector3 pos, float radius);
64 static void makeBatchAndDrawCallAll();
65
66 virtual void draw(){}
67
68 static bool isSameScene(Render ^s1, Render ^s2)
69 {
70 return true;
71 }
72
74 };
75
76}
Definition: Color.h:5
Definition: DrawInfo.h:51
Definition: Render.h:32
void setViewMatrix(SharpKmyMath::Matrix4 proj, SharpKmyMath::Matrix4 view)
Definition: Render.cpp:66
bool viewVolumeCheck(SharpKmyMath::Vector3 pos, float radius)
Definition: Render.cpp:88
void setClearColor(float r, float g, float b, float a)
Definition: Render.cpp:32
void Release()
Definition: Render.cpp:17
SharpKmyGfx::Color getColor(int x, int y, float %depth)
Definition: Render.cpp:47
virtual void draw()
Definition: Render.h:66
void setClearMask(u32 mask)
Definition: Render.cpp:37
Texture getDepthTexture()
Definition: Render.cpp:27
void addDrawable(Drawable ^drawable)
Definition: Render.cpp:72
void setViewport(int x, int y, int width, int height)
Definition: Render.cpp:42
void getViewMatrix(SharpKmyMath::Matrix4 %proj, SharpKmyMath::Matrix4 %view)
Definition: Render.cpp:82
static bool isSameScene(Render ^s1, Render ^s2)
Definition: Render.h:68
Texture getColorTexture()
Definition: Render.cpp:22
Render()
Definition: Render.cpp:8
bool owned
Definition: Render.h:34
static void makeBatchAndDrawCallAll()
Definition: Render.cpp:61
void makeBatchAndDrawCall()
Definition: Render.cpp:56
SharpKmyMath::Matrix4 view
Definition: Render.h:73
static Render getDefaultRender()
Definition: Render.cpp:97
void setAmbientColor(SharpKmyMath::Vector3 color)
Definition: Render.cpp:77
SharpKmyMath::Matrix4 proj
Definition: Render.h:73
Definition: Texture.h:72
Definition: Matrix4.h:10
Definition: Billboard.cpp:4
Definition: Billboard.h:6
Definition: Vector3.h:8