예제 #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();
            }
        }
예제 #2
0
파일: GL.cs 프로젝트: mortend/uno
        public GLShaderHandle CreateShader(GLShaderType type)
        {
            int shaderName = TKGL.CreateShader((ShaderType)type);

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

            AddContextObject(new ShaderDisposable(shader));
            return(new GLShaderHandle(shader));
        }
예제 #4
0
파일: GLDebugLayer.cs 프로젝트: yongaru/uno
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision)
 {
     try
     {
         this.BeginFunc();
         return(this._gl.GetShaderPrecisionFormat(shader, precision));
     }
     finally
     {
         this.EndFunc();
     }
 }
예제 #5
0
파일: GLDebugLayer.cs 프로젝트: yongaru/uno
 public GLShaderHandle CreateShader(GLShaderType type)
 {
     try
     {
         this.BeginFunc();
         return(this._gl.CreateShader(type));
     }
     finally
     {
         this.EndFunc();
     }
 }
예제 #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);
        }
예제 #7
0
파일: GL.cs 프로젝트: mortend/uno
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision)
 {
     return(new GLShaderPrecisionFormat());
 }
예제 #8
0
 public extern static uint compileShader(GLShaderType shaderType, [MarshalAs(UnmanagedType.LPStr)] string shaderSource);
예제 #9
0
 public GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shader, GLShaderPrecision precision)
 {
     throw new NotImplementedException();
 }
예제 #10
0
파일: GL.cs 프로젝트: yongaru/uno
 public static GLShaderPrecisionFormat GetShaderPrecisionFormat(GLShaderType shaderType, GLShaderPrecision precision)
 {
     return(GL._gl.GetShaderPrecisionFormat(shaderType, precision));
 }
예제 #11
0
파일: GL.cs 프로젝트: yongaru/uno
 public static GLShaderHandle CreateShader(GLShaderType type)
 {
     return(GL._gl.CreateShader(type));
 }
예제 #12
0
파일: DummyGL.cs 프로젝트: mortend/uno
 public GLShaderHandle CreateShader(GLShaderType type)
 {
     return(new GLShaderHandle(0));
 }