summaryrefslogtreecommitdiffstats
path: root/scene/resources/multimesh.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-10-03 16:33:42 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-10-03 21:35:16 +0200
commit22d83bc9f655d5ae7a1b49709c4c1b663725daf5 (patch)
treea817195c08d4713a70ca014a3f63f5937934fe36 /scene/resources/multimesh.h
parent78d97b060a6873a454e710380cb9ef1bde5e4c65 (diff)
downloadredot-engine-22d83bc9f655d5ae7a1b49709c4c1b663725daf5.tar.gz
Begining of GLES3 renderer:
-Most 2D drawing is implemented -Missing shaders -Missing all 3D -Editor needs to be set on update always to be used, otherwise it does not refresh -Large parts of editor not working
Diffstat (limited to 'scene/resources/multimesh.h')
-rw-r--r--scene/resources/multimesh.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 0cf9e92def..be4ee38fcd 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -30,16 +30,33 @@
#define MULTIMESH_H
#include "scene/resources/mesh.h"
-
+#include "servers/visual_server.h"
class MultiMesh : public Resource {
OBJ_TYPE( MultiMesh, Resource );
RES_BASE_EXTENSION("mmsh");
+public:
+ enum TransformFormat {
+ TRANSFORM_NONE = VS::MULTIMESH_TRANSFORM_NONE,
+ TRANSFORM_2D = VS::MULTIMESH_TRANSFORM_2D,
+ TRANSFORM_3D = VS::MULTIMESH_TRANSFORM_3D
+ };
+
+ enum ColorFormat {
+ COLOR_NONE = VS::MULTIMESH_COLOR_NONE,
+ COLOR_8BIT = VS::MULTIMESH_COLOR_8BIT,
+ COLOR_FLOAT = VS::MULTIMESH_COLOR_FLOAT,
+ };
+private:
AABB aabb;
Ref<Mesh> mesh;
RID multimesh;
+ TransformFormat transform_format;
+ ColorFormat color_format;
+
+
protected:
static void _bind_methods();
@@ -55,6 +72,12 @@ public:
void set_mesh(const Ref<Mesh>& p_mesh);
Ref<Mesh> get_mesh() const;
+ void set_color_format(ColorFormat p_color_format);
+ ColorFormat get_color_format() const;
+
+ void set_transform_format(TransformFormat p_transform_format);
+ TransformFormat get_transform_format() const;
+
void set_instance_count(int p_count);
int get_instance_count() const;
@@ -76,4 +99,8 @@ public:
};
+
+VARIANT_ENUM_CAST( MultiMesh::TransformFormat );
+VARIANT_ENUM_CAST( MultiMesh::ColorFormat);
+
#endif // MULTI_MESH_H