Esempio 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();
            }
        }
Esempio n. 2
0
File: GL.cs Progetto: mortend/uno
        public GLShaderHandle CreateShader(GLShaderType type)
        {
            int shaderName = TKGL.CreateShader((ShaderType)type);

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

            AddContextObject(new ShaderDisposable(shader));
            return(new GLShaderHandle(shader));
        }
Esempio n. 4
0
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision)
 {
     try
     {
         this.BeginFunc();
         return(this._gl.GetShaderPrecisionFormat(shader, precision));
     }
     finally
     {
         this.EndFunc();
     }
 }
Esempio n. 5
0
 public GLShaderHandle CreateShader(GLShaderType type)
 {
     try
     {
         this.BeginFunc();
         return(this._gl.CreateShader(type));
     }
     finally
     {
         this.EndFunc();
     }
 }
Esempio 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);
        }
Esempio n. 7
0
File: GL.cs Progetto: mortend/uno
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision)
 {
     return(new GLShaderPrecisionFormat());
 }
 public extern static uint compileShader(GLShaderType shaderType, [MarshalAs(UnmanagedType.LPStr)] string shaderSource);
Esempio n. 9
0
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
File: GL.cs Progetto: yongaru/uno
 public static GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision)
 {
     return(GL._gl.GetShaderPrecisionFormat(shaderType, precision));
 }
Esempio n. 11
0
File: GL.cs Progetto: yongaru/uno
 public static GLShaderHandle CreateShader(GLShaderType type)
 {
     return(GL._gl.CreateShader(type));
 }
Esempio n. 12
0
 public GLShaderHandle CreateShader(GLShaderType type)
 {
     return(new GLShaderHandle(0));
 }