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