diff options
Diffstat (limited to 'drivers/gles2/rasterizer_storage_gles2.h')
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index 8bc3369dbb..c1fbf73254 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -797,8 +797,40 @@ public: /* IMMEDIATE API */ + struct Immediate : public Geometry { + + struct Chunk { + RID texture; + VS::PrimitiveType primitive; + Vector<Vector3> vertices; + Vector<Vector3> normals; + Vector<Plane> tangents; + Vector<Color> colors; + Vector<Vector2> uvs; + Vector<Vector2> uv2s; + }; + + List<Chunk> chunks; + bool building; + int mask; + AABB aabb; + + Immediate() { + type = GEOMETRY_IMMEDIATE; + building = false; + } + }; + + Vector3 chunk_normal; + Plane chunk_tangent; + Color chunk_color; + Vector2 chunk_uv; + Vector2 chunk_uv2; + + mutable RID_Owner<Immediate> immediate_owner; + virtual RID immediate_create(); - virtual void immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture = RID()); + virtual void immediate_begin(RID p_immediate, VS::PrimitiveType p_primitive, RID p_texture = RID()); virtual void immediate_vertex(RID p_immediate, const Vector3 &p_vertex); virtual void immediate_normal(RID p_immediate, const Vector3 &p_normal); virtual void immediate_tangent(RID p_immediate, const Plane &p_tangent); |