Exemplo n.º 1
0
        public GLShader(string code, GLShaderType type = GLShaderType.Fragment, bool compileOnCreate = true)
        {
            SourceCode = code;
            Type       = type;

            switch (type)
            {
            case GLShaderType.Fragment:
                TKType = ShaderType.FragmentShader;
                break;

            case GLShaderType.Vertex:
                TKType = ShaderType.VertexShader;
                break;

            case GLShaderType.Geometry:
                TKType = ShaderType.GeometryShader;
                break;
            }

            GLObject = GL.CreateShader(TKType);

            GL.ShaderSource(GLObject, code);

            if (compileOnCreate)
            {
                Compile();
            }
        }
Exemplo n.º 2
0
Arquivo: GL.cs Projeto: mortend/uno
        public GLShaderHandle CreateShader(GLShaderType type)
        {
            int shaderName = TKGL.CreateShader((ShaderType)type);

            AddContextObject(new ShaderDisposable(shaderName));
            return(new GLShaderHandle(shaderName));
        }
Exemplo n.º 3
0
        public GLShaderHandle CreateShader(GLShaderType type)
        {
            var shader = MacGL.CreateShader((ShaderType)type);

            AddContextObject(new ShaderDisposable(shader));
            return(new GLShaderHandle(shader));
        }
Exemplo n.º 4
0
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision)
 {
     try
     {
         this.BeginFunc();
         return(this._gl.GetShaderPrecisionFormat(shader, precision));
     }
     finally
     {
         this.EndFunc();
     }
 }
Exemplo n.º 5
0
 public GLShaderHandle CreateShader(GLShaderType type)
 {
     try
     {
         this.BeginFunc();
         return(this._gl.CreateShader(type));
     }
     finally
     {
         this.EndFunc();
     }
 }
Exemplo n.º 6
0
        public GLShader(string code, GLShaderType type = GLShaderType.FRAGMENT)
        {
            SourceCode = code;
            Type       = type;

            switch (type)
            {
            case GLShaderType.FRAGMENT:
                TKType = ShaderType.FragmentShader;
                break;

            case GLShaderType.VERTEX:
                TKType = ShaderType.VertexShader;
                break;
            }

            GLObject = GL.CreateShader(TKType);

            GL.ShaderSource(GLObject, code);
        }
Exemplo n.º 7
0
Arquivo: GL.cs Projeto: mortend/uno
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision)
 {
     return(new GLShaderPrecisionFormat());
 }
Exemplo n.º 8
0
 public extern static uint compileShader(GLShaderType shaderType, [MarshalAs(UnmanagedType.LPStr)] string shaderSource);
Exemplo n.º 9
0
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 10
0
Arquivo: GL.cs Projeto: yongaru/uno
 public static GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision)
 {
     return(GL._gl.GetShaderPrecisionFormat(shaderType, precision));
 }
Exemplo n.º 11
0
Arquivo: GL.cs Projeto: yongaru/uno
 public static GLShaderHandle CreateShader(GLShaderType type)
 {
     return(GL._gl.CreateShader(type));
 }
Exemplo n.º 12
0
 public GLShaderHandle CreateShader(GLShaderType type)
 {
     return(new GLShaderHandle(0));
 }