diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-07-23 08:58:19 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-07-23 08:58:57 -0300 |
commit | 221cb58382ae34d4f91d9923fd979a328feabace (patch) | |
tree | 32ffcaf2b8ed173e73984ca1b17d761a86da200d /doc | |
parent | 1eefff283a961dbdd6365924d76db13023abdf68 (diff) |
Add some doc to ImmediateGeometry
Diffstat (limited to 'doc')
-rw-r--r-- | doc/base/classes.xml | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ </class> <class name="ImmediateGeometry" inherits="GeometryInstance" category="Core"> <brief_description> + Node to draw simple geometry from code, ala OpenGL 1.x </brief_description> <description> </description> + 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. <methods> <method name="add_sphere"> <argument index="0" name="lats" type="int"> @@ -15700,12 +15705,14 @@ <argument index="2" name="radius" type="float"> </argument> <description> + Simple helper to draw an uvsphere, with given latitudes, longitude and radius. </description> </method> <method name="add_vertex"> <argument index="0" name="pos" type="Vector3"> </argument> <description> + Add a vertex with the currently set color/uv/etc. </description> </method> <method name="begin"> @@ -15714,44 +15721,53 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + 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. </description> </method> <method name="clear"> <description> + Clear everything that was drawn using begin/end. </description> </method> <method name="end"> <description> + Call this when done adding a batch of geometry, otherwise it can't be displayed. </description> </method> <method name="set_color"> <argument index="0" name="color" type="Color"> </argument> <description> + Set the color that the next vertex will use to be drawn. </description> </method> <method name="set_normal"> <argument index="0" name="normal" type="Vector3"> </argument> <description> + Set the normal that the next vertex will use to be drawn. </description> </method> <method name="set_tangent"> <argument index="0" name="tangent" type="Plane"> </argument> <description> + Set the tangent (and binormal facing) that the next vertex will use to be drawn. </description> </method> <method name="set_uv"> <argument index="0" name="uv" type="Vector2"> </argument> <description> + Set the UV that the next vertex will use to be drawn. </description> </method> <method name="set_uv2"> <argument index="0" name="uv" type="Vector2"> </argument> <description> + Set the second layer of UV that the next vertex will use to be drawn. </description> </method> </methods> |