Trait kiss3d::resource::GLPrimitive
[−]
[src]
pub trait GLPrimitive: Copy { fn gl_type(_type: Option<Self>) -> GLuint; fn size(_type: Option<Self>) -> GLuint; fn upload(&self, location: GLuint); }
Trait implemented by structures that can be uploaded to a uniform or contained by a gpu array.
Required Methods
fn gl_type(_type: Option<Self>) -> GLuint
The opengl primitive type of this structure content.
fn size(_type: Option<Self>) -> GLuint
The number of elements of type self.gl_type()
this structure stores.
fn upload(&self, location: GLuint)
Uploads the element to a gpu location.
Implementors
impl GLPrimitive for GLfloat
impl GLPrimitive for GLint
impl GLPrimitive for GLuint
impl GLPrimitive for Matrix2<GLfloat>
impl GLPrimitive for Rotation2<GLfloat>
impl GLPrimitive for Matrix3<GLfloat>
impl GLPrimitive for Rotation3<GLfloat>
impl GLPrimitive for Matrix4<GLfloat>
impl GLPrimitive for Vector3<GLfloat>
impl GLPrimitive for Vector2<GLfloat>
impl GLPrimitive for Vector2<GLuint>
impl GLPrimitive for Vector3<GLuint>
impl GLPrimitive for Point3<GLfloat>
impl GLPrimitive for Point2<GLfloat>
impl GLPrimitive for Point2<GLuint>
impl GLPrimitive for Point3<GLuint>
impl GLPrimitive for (GLfloat, GLfloat, GLfloat)
impl GLPrimitive for (GLfloat, GLfloat)
impl GLPrimitive for (GLuint, GLuint)
impl GLPrimitive for (GLuint, GLuint, GLuint)