From 221cb58382ae34d4f91d9923fd979a328feabace Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 23 Jul 2016 08:58:19 -0300 Subject: Add some doc to ImmediateGeometry --- doc/base/classes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index d9f524e614..4c2a0fe7ba 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -15688,9 +15688,14 @@ + Node to draw simple geometry from code, ala OpenGL 1.x + ImmediateGeometry is a node used for displaying simple geometry created from code, very similar to how glBegin() and glEnd() worked in old versions of OpenGL (1.x). + Simply call [method begin()], and add vertices. For custom vertex colors, uvs, normal, etc. call one of the set_ functions below before adding each vertex. When done, call [method end] + Calls to begin/end are accumulative and all geometry is added together. To clear all the geometry, call [method clear]. + If a material override is set, and this material contains a texture, it's possible to override the texture used in this material for every begin/end set of calls. @@ -15700,12 +15705,14 @@ + Simple helper to draw an uvsphere, with given latitudes, longitude and radius. + Add a vertex with the currently set color/uv/etc. @@ -15714,44 +15721,53 @@ + Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. + For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations. + Clear everything that was drawn using begin/end. + Call this when done adding a batch of geometry, otherwise it can't be displayed. + Set the color that the next vertex will use to be drawn. + Set the normal that the next vertex will use to be drawn. + Set the tangent (and binormal facing) that the next vertex will use to be drawn. + Set the UV that the next vertex will use to be drawn. + Set the second layer of UV that the next vertex will use to be drawn. -- cgit v1.2.3