RenderStack 11.06.1
Public Member Functions | Static Public Member Functions | Properties
RenderStack.Graphics.Attribute Class Reference

Attribute for use in VertexFormat. Attributes should always be made to be part of one VertexFormat. More...

List of all members.

Public Member Functions

 Attribute ()
 Attribute (VertexUsage usage, VertexAttribPointerType type, int index, int dimension)
 Attribute (VertexUsage usage, VertexAttribPointerType type, int index, int dimension, bool normalized)
int Stride ()

Static Public Member Functions

static int SizeOfType (VertexAttribPointerType type)

Properties

VertexUsage Usage [get, set]
VertexAttribPointerType Type [get, set]
int Index [get, set]
int Dimension [get, set]
int Offset [get, set]
bool Normalized [get, set]
string UsageString [get]

Detailed Description

Note:
Mostly stable.

Definition at line 32 of file Attribute.cs.


Constructor & Destructor Documentation

RenderStack.Graphics.Attribute.Attribute ( )

Definition at line 86 of file Attribute.cs.

        {
        }
RenderStack.Graphics.Attribute.Attribute ( VertexUsage  usage,
VertexAttribPointerType  type,
int  index,
int  dimension 
)

Definition at line 90 of file Attribute.cs.

        {
            Usage      = usage;
            Type       = type;
            Index      = index;
            Dimension  = dimension;
            Offset     = -1; // Set by VertexFormat when attached to it
            Normalized = false;
        }
RenderStack.Graphics.Attribute.Attribute ( VertexUsage  usage,
VertexAttribPointerType  type,
int  index,
int  dimension,
bool  normalized 
)

Definition at line 105 of file Attribute.cs.

        {
            Usage      = usage;
            Type       = type;
            Index      = index;
            Dimension  = dimension;
            Offset     = -1; // Set by VertexFormat when attached to it
            Normalized = normalized;
        }

Member Function Documentation

static int RenderStack.Graphics.Attribute.SizeOfType ( VertexAttribPointerType  type) [static]

Definition at line 34 of file Attribute.cs.

        {
            switch(type)
            {
                case VertexAttribPointerType.Byte:           return 1;
                case VertexAttribPointerType.Double:         return 8;
                case VertexAttribPointerType.Float:          return 4;
                case VertexAttribPointerType.HalfFloat:      return 2;
                case VertexAttribPointerType.Int:            return 4;
                case VertexAttribPointerType.Short:          return 2;
                case VertexAttribPointerType.UnsignedByte:   return 1;
                case VertexAttribPointerType.UnsignedInt:    return 4;
                case VertexAttribPointerType.UnsignedShort:  return 2;
                default: throw new System.Exception("Invalid typeCode");
            }
        }
int RenderStack.Graphics.Attribute.Stride ( )

Property Documentation

VertexUsage RenderStack.Graphics.Attribute.Usage [get, set]
VertexAttribPointerType RenderStack.Graphics.Attribute.Type [get, set]

Definition at line 59 of file Attribute.cs.

int RenderStack.Graphics.Attribute.Index [get, set]
int RenderStack.Graphics.Attribute.Dimension [get, set]
int RenderStack.Graphics.Attribute.Offset [get, set]
bool RenderStack.Graphics.Attribute.Normalized [get, set]

Definition at line 63 of file Attribute.cs.

string RenderStack.Graphics.Attribute.UsageString [get]

Definition at line 66 of file Attribute.cs.

Referenced by RenderStack.Graphics.VertexFormat.ToString().


The documentation for this class was generated from the following file: