CreateShader() public method

public CreateShader ( ShaderType aType ) : int
aType ShaderType
return int
Exemplo n.º 1
0
        public GLSLShader(GraphicsInterface gi, string shaderSourceCode, ShaderType sType)
        {
            fShaderID = -1;
            fGI = gi;

            if (shaderSourceCode.Length > 0)
            {
                fShaderID = gi.CreateShader(sType);

                String[] shaderSourceStringArray = new String[1];
                shaderSourceStringArray[0] = shaderSourceCode;

                gi.ShaderSource(fShaderID, 1, shaderSourceStringArray, null);
            }
        }