Real/src/platform/OpenGL/OpenGLShader.cpp
//pixelSrc is in OpenGL terms fragmentSrc. Yep, fragment shader.
pixelSrc is in OpenGL terms fragmentSrc. Yep, fragment shader.
pixelSrc is in OpenGL terms fragmentSrc . Yep fragment shader .
OpenGLShader::OpenGLShader(
		const std::string& name, 
	    const std::string& vertexSrc, 
		const std::string& pixelSrc)
		        : rendererId(-1), name(name) { 
		std::unordered_map<GLenum, std::string> sources;
		sources[GL_VERTEX_SHADER] = vertexSrc;
		sources[GL_FRAGMENT_SHADER] = pixelSrc;
		compile(sources);
		RE_CORE_ASSERT(rendererId != static_cast<unsigned int>(-1), "Error while initializing shader")
		glObjectLabel(GL_SHADER, rendererId, static_cast<GLsizei>(name.length()), name.c_str());
	}
OpenGLShader :: OpenGLShader ( const std :: string & name , const std :: string & vertexSrc , const std :: string & pixelSrc ) : rendererId ( -1 ) , name ( name ) { std :: unordered_map < GLenum , std :: string > sources ; sources [ GL_VERTEX_SHADER ] = vertexSrc ; sources [ GL_FRAGMENT_SHADER ] = pixelSrc ; compile ( sources ) ; RE_CORE_ASSERT ( rendererId != static_cast < unsigned int > ( -1 ) , " " ) glObjectLabel ( GL_SHADER , rendererId , static_cast < GLsizei > ( name . length ( ) ) , name . c_str ( ) ) ; }
pixelSrc is in OpenGL terms fragmentSrc.
pixelSrc is in OpenGL terms fragmentSrc .
// -1 in rendererId is a sign of an error //For OpenGL debugging programs