/** * @brief * Creates a program and assigns a vertex, geometry and fragment shader to it */ Program *ShaderLanguage::CreateProgram(VertexShader *pVertexShader, GeometryShader *pGeometryShader, FragmentShader *pFragmentShader) { // Create a program instance Program *pProgram = CreateProgram(); if (pProgram) { // Assign the given vertex, geometry and fragment shaders to the program pProgram->SetVertexShader(pVertexShader); pProgram->SetGeometryShader(pGeometryShader); pProgram->SetFragmentShader(pFragmentShader); } // Return the created program instance return pProgram; }
/** * @brief * Creates a program and assigns a vertex, tessellation control, tessellation evaluation, geometry and fragment shader to it */ Program *ShaderLanguage::CreateProgram(VertexShader *pVertexShader, TessellationControlShader *pTessellationControlShader, TessellationEvaluationShader *pTessellationEvaluationShader, GeometryShader *pGeometryShader, FragmentShader *pFragmentShader) { // Create a program instance Program *pProgram = CreateProgram(); if (pProgram) { // Assign the given vertex, tessellation control, tessellation evaluation, geometry and fragment shaders to the program pProgram->SetVertexShader(pVertexShader); pProgram->SetTessellationControlShader(pTessellationControlShader); pProgram->SetTessellationEvaluationShader(pTessellationEvaluationShader); pProgram->SetGeometryShader(pGeometryShader); pProgram->SetFragmentShader(pFragmentShader); } // Return the created program instance return pProgram; }