示例#1
0
 public UIAbilityIconProgram( ) : base("ui_abilityicon.vert", "ui_abilityicon.frag")
 {
     mvpMatrixHandle         = new UniformMatrixHandle(glProgram, "u_mvpMatrix");
     baseTextureCoordsHandle = new AttributeHandle(glProgram, "a_baseTexcoord");
     ampTextureCoordsHandle  = new AttributeHandle(glProgram, "a_ampTexcoord");
     baseTextureHandle       = new TextureHandle(glProgram, "u_baseTexture");
     ampTextureHandle        = new TextureHandle(glProgram, "u_ampTexture");
 }
示例#2
0
 public string GetAttributeNameFromHandle(AttributeHandle hAttribute)
 {
     Attributes attr = GetAttributeIdFromHandle(hAttribute);
     return GetAttributeNameFromId(attr);
 }
示例#3
0
        public Attributes GetAttributeIdFromHandle(AttributeHandle hAttribute)
        {
            if(_idHandleIndex.ExistSecond(hAttribute))
            {
                return _idHandleIndex.GetBySecond(hAttribute);
            }

            return Attributes.Unknown;
        }
示例#4
0
 public void Bind(AttributeHandle attribute)
 {
     Bind(attribute.Location);
 }
示例#5
0
        protected override WISE_RESULT OnUpdateAttribute(DateTime timeStamp, DatabaseHandle hDatabase, ObjectHandle hObject,
            ClassHandle hClass, AttributeHandle hAttribute, object value, AttributeQualityCode quality,
            TransactionHandle hTransaction)
        {
            WISE_RESULT result = WISEError.WISE_OK;

            // Call base class implementation
            result = base.OnUpdateAttribute(timeStamp, hDatabase, hObject, hClass, hAttribute, value, quality, hTransaction);
            WISEError.CheckCallFailedEx(result);

            //string myValue = string.Empty;
            //AttributeHandle myAttributeHandle = AttributeHandle.Invalid;
            //this.WISE.GetAttributeHandle(hDatabase, hObject, "SomeAttribute", ref myAttributeHandle);
            //this.WISE.GetAttributeValue(hDatabase, hObject, myAttributeHandle, ref myValue);

            //global::CBRNSensors.EntityEquipmentSensorCBRNLCD stateObject = new global::CBRNSensors.EntityEquipmentSensorCBRNLCD();
            //stateObject.CreateInstance(this.WISE, hDatabase);
            //stateObject.SensorState =
            //stateObject.AddToDatabase(hDatabase);

            return result;
        }
示例#6
0
 public ColorProgram( ) : base("color.vert", "color.frag")
 {
     mvpMatrixHandle = new UniformMatrixHandle(glProgram, "u_mvpmatrix");
     colorHandle     = new AttributeHandle(glProgram, "a_color");
 }
示例#7
0
 public TextureProgram(string vertexShader, string fragmentShader) : base(vertexShader, fragmentShader)
 {
     textureCoordsHandle = new AttributeHandle(glProgram, "a_texcoord");
     textureHandle       = new TextureHandle(glProgram);
 }
示例#8
0
 public ColorProgram( ) : base(Assets.GetVertexShader("color"), Assets.GetFragmentShader("color"))
 {
     mvpMatrixHandle = new UniformMatrixHandle(glProgram, "u_mvpmatrix");
     colorHandle     = new AttributeHandle(glProgram, "a_color");
 }
示例#9
0
        public Program(string vertexShader, string fragmentShader)
        {
            glProgram = CompileProgram(vertexShader, fragmentShader);

            positionHandle = new AttributeHandle(glProgram, "a_position");
        }
示例#10
0
 public TextureProgram(int vertexBuffer, int fragmentBuffer) : base(vertexBuffer, fragmentBuffer)
 {
     textureCoordsHandle = new AttributeHandle(glProgram, "a_texcoord");
     textureHandle       = new TextureHandle(glProgram);
 }
示例#11
0
        public Program(int vertexBuffer, int fragmentBuffer)
        {
            glProgram = CompileProgram(vertexBuffer, fragmentBuffer);

            positionHandle = new AttributeHandle(glProgram, "a_position");
        }
示例#12
0
 public ParticleProgram() : base(Assets.GetVertexShader("particle"), Assets.GetFragmentShader("particle"))
 {
     sizeHandle   = new AttributeHandle(glProgram, "a_size");
     colorHandle  = new AttributeHandle(glProgram, "a_color");
     matrixHandle = new UniformMatrixHandle(glProgram, "u_mvpmatrix");
 }