RenderStack 11.06.1
Public Member Functions
RenderStack.Graphics.Ints Class Reference

A class which holds integers that can be fed to OpenGL uniforms.

Inheritance diagram for RenderStack.Graphics.Ints:
RenderStack.Graphics.Params< T > RenderStack.Graphics.IUniformValue

List of all members.

Public Member Functions

IUniformValue GetUninitialized ()
 Creates a clone of this IUniformValue, returning the same type but does not copy values.
 Ints ()
 Ints (int elements, int dimension)
 Ints (int x)
override unsafe void Apply (ref IUniformContext context)
 Applies the uniform value to OpenGL.

Detailed Description

Definition at line 197 of file Params.cs.


Constructor & Destructor Documentation

RenderStack.Graphics.Ints.Ints ( )

Definition at line 208 of file Params.cs.

:base(1,1){}
RenderStack.Graphics.Ints.Ints ( int  elements,
int  dimension 
)

Definition at line 209 of file Params.cs.

:base(elements, dimension){}
RenderStack.Graphics.Ints.Ints ( int  x)

Definition at line 210 of file Params.cs.

:base(x){}

Member Function Documentation

IUniformValue RenderStack.Graphics.Ints.GetUninitialized ( )

Implements RenderStack.Graphics.IUniformValue.

Definition at line 199 of file Params.cs.

References RenderStack.Graphics.Params< T >.Value.

        {
            Ints clone = new Ints(Elements, Dimension);
            for(int i = 0; i < Value.Length; ++i)
            {
                clone.Value[i] = int.MaxValue;
            }
            return clone;
        }
override unsafe void RenderStack.Graphics.Ints.Apply ( ref IUniformContext  context)

Implements RenderStack.Graphics.IUniformValue.

Definition at line 211 of file Params.cs.

        {
            fixed(int* ptr = &Value[0])
            {
                switch(Elements)
                {
                    case  1: GL.Uniform1(context.Slot, Dimension, ptr); break;
                    case  2: GL.Uniform2(context.Slot, Dimension, ptr); break;
                    case  3: GL.Uniform3(context.Slot, Dimension, ptr); break;
                    case  4: GL.Uniform4(context.Slot, Dimension, ptr); break;
                }
            }
        }

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