![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
Auxiliary structure holding basic vertex attributes. More...
#include <vppLangIntInOut.hpp>
Public Member Functions | |
void | setClipPlanes (int n) |
Sets the number of additional clipping planes. More... | |
void | setCullPlanes (int n) |
Sets the number of additional culling planes. More... | |
void | getClipPlanes () |
Retrieves the number of additional clipping planes. More... | |
void | getCullPlanes () |
Retrieves the number of additional culling planes. More... | |
Public Attributes | |
Vec4 | position |
In or Out: Position of the vertex in clip space (after projection). | |
Float | pointSize |
In or Out: Size of the point primitive. | |
Float | clipDistance [] |
In or Out: Array of additional clipping planes. | |
Float | cullDistance [] |
In or Out: Array of additional culling planes. | |
Auxiliary structure holding basic vertex attributes.
There are predefined members inside several shader objects (VertexShader, GeometryShader, TessControlShader, TessEvalShader), called inVertices
, outVertex
or outVertices
, giving access to this structure. It is supposed to be either only written into or being read, depending on the field and shader. In case of writes, fields of the structure represent various results of geometric computation inside shader, mainly the vertex position. In case of reads, you can read values computed by previous shader in the pipeline.
You can also compute several other auxiliary values, like rendered point size (used in point drawing mode), or additional clipping/culling planes.
In shaders that write to the structure, writing to any field of it is optional.
The gl_perVertex
structure is only conceptual. It is not possible to declare a variable of gl_perVertex
type in your code. Use it only as a member of shader interfaces, accessing the fields with dot operator.
void vpp::gl_perVertex::getClipPlanes | ( | ) |
Retrieves the number of additional clipping planes.
Caution: in shaders where gl_perVertex
is arrayed, this method is accessible on the whole array, not single item.
void vpp::gl_perVertex::getCullPlanes | ( | ) |
Retrieves the number of additional culling planes.
Caution: in shaders where gl_perVertex
is arrayed, this method is accessible on the whole array, not single item.
void vpp::gl_perVertex::setClipPlanes | ( | int | n | ) |
Sets the number of additional clipping planes.
Caution: in shaders where gl_perVertex
is arrayed, this method is accessible on the whole array, not single item.
void vpp::gl_perVertex::setCullPlanes | ( | int | n | ) |
Sets the number of additional culling planes.
Caution: in shaders where gl_perVertex
is arrayed, this method is accessible on the whole array, not single item.