Example #1
0
        public void Bind()
        {
            if ( stCurrentLoadedTexture != this )
            {
                GL.BindTexture( TextureTarget, ID );
                stCurrentLoadedTexture = this;
            }

            if ( !myLoaded )
            {
                Load();
                myLoaded = true;
            }
        }
Example #2
0
            public void SetCurrentTexture( Texture texture )
            {
                CurrentTexture = texture;

                GL.ActiveTexture( TextureUnit );
                CurrentTexture.Bind();
            }
Example #3
0
        public void SetTexture( string identifier, Texture texture )
        {
            if ( Started )
            {
                GL.End();
                ErrorCheck( "end" );
            }

            myTextures[ identifier ].SetCurrentTexture( texture );

            ErrorCheck( "settexture" );

            if ( Started )
                GL.Begin( BeginMode );
        }