Vertex position 3d: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Example Call) |
||
(One intermediate revision by the same user not shown) | |||
Line 26: | Line 26: | ||
vertex_normal(static_buffer, nx, ny, nz); | vertex_normal(static_buffer, nx, ny, nz); | ||
vertex_color(static_buffer, color, alpha); | vertex_color(static_buffer, color, alpha); | ||
vertex_end(); | vertex_end(static_buffer); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
__NOTOC__ | __NOTOC__ | ||
{{Function:GM}} | {{Function:GM}} |
Latest revision as of 19:22, 17 June 2018
Description
Adds the given 3D vertex to the given vertex buffer.
Parameters
Parameter | Data Type | Description |
---|---|---|
buffer | integer | Index of the vertex buffer. |
x | gs_scalar | x coordinate of the vertex to add |
y | gs_scalar | y coordinate of the vertex to add |
z | gs_scalar | z coordinate of the vertex to add |
Return Values
void: This function does not return anything.
Example Call
// demonstrates adding a vertex to a vertex buffer
vertex_begin(static_buffer, vf_position3d_normal_color);
vertex_position_3d(static_buffer, x, y, z);
vertex_normal(static_buffer, nx, ny, nz);
vertex_color(static_buffer, color, alpha);
vertex_end(static_buffer);