summaryrefslogtreecommitdiff
path: root/drivers/gles1/rasterizer_gles1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles1/rasterizer_gles1.cpp')
-rw-r--r--drivers/gles1/rasterizer_gles1.cpp81
1 files changed, 81 insertions, 0 deletions
diff --git a/drivers/gles1/rasterizer_gles1.cpp b/drivers/gles1/rasterizer_gles1.cpp
index 60c88af508..9e13f12abe 100644
--- a/drivers/gles1/rasterizer_gles1.cpp
+++ b/drivers/gles1/rasterizer_gles1.cpp
@@ -2165,6 +2165,74 @@ int RasterizerGLES1::multimesh_get_visible_instances(RID p_multimesh) const {
}
+/* IMMEDIATE API */
+
+
+RID RasterizerGLES1::immediate_create() {
+
+ Immediate *im = memnew( Immediate );
+ return immediate_owner.make_rid(im);
+
+}
+
+void RasterizerGLES1::immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture){
+
+
+}
+void RasterizerGLES1::immediate_vertex(RID p_immediate,const Vector3& p_vertex){
+
+
+}
+void RasterizerGLES1::immediate_normal(RID p_immediate,const Vector3& p_normal){
+
+
+}
+void RasterizerGLES1::immediate_tangent(RID p_immediate,const Plane& p_tangent){
+
+
+}
+void RasterizerGLES1::immediate_color(RID p_immediate,const Color& p_color){
+
+
+}
+void RasterizerGLES1::immediate_uv(RID p_immediate,const Vector2& tex_uv){
+
+
+}
+void RasterizerGLES1::immediate_uv2(RID p_immediate,const Vector2& tex_uv){
+
+
+}
+
+void RasterizerGLES1::immediate_end(RID p_immediate){
+
+
+}
+void RasterizerGLES1::immediate_clear(RID p_immediate) {
+
+
+}
+
+AABB RasterizerGLES1::immediate_get_aabb(RID p_immediate) const {
+
+ return AABB(Vector3(-1,-1,-1),Vector3(2,2,2));
+}
+
+void RasterizerGLES1::immediate_set_material(RID p_immediate,RID p_material) {
+
+ Immediate *im = immediate_owner.get(p_immediate);
+ ERR_FAIL_COND(!im);
+ im->material=p_material;
+}
+
+RID RasterizerGLES1::immediate_get_material(RID p_immediate) const {
+
+ const Immediate *im = immediate_owner.get(p_immediate);
+ ERR_FAIL_COND_V(!im,RID());
+ return im->material;
+
+}
+
/* PARTICLES API */
@@ -5327,6 +5395,12 @@ bool RasterizerGLES1::is_mesh(const RID& p_rid) const {
return mesh_owner.owns(p_rid);
}
+
+bool RasterizerGLES1::is_immediate(const RID& p_rid) const {
+
+ return immediate_owner.owns(p_rid);
+}
+
bool RasterizerGLES1::is_multimesh(const RID& p_rid) const {
return multimesh_owner.owns(p_rid);
@@ -5447,6 +5521,13 @@ void RasterizerGLES1::free(const RID& p_rid) {
particles_owner.free(p_rid);
memdelete(particles);
+ } else if (immediate_owner.owns(p_rid)) {
+
+ Immediate *immediate = immediate_owner.get(p_rid);
+ ERR_FAIL_COND(!immediate);
+
+ immediate_owner.free(p_rid);
+ memdelete(immediate);
} else if (particles_instance_owner.owns(p_rid)) {
ParticlesInstance *particles_isntance = particles_instance_owner.get(p_rid);