Commit fb78c669 authored by Robert Menzel's avatar Robert Menzel

removed explicit error checks

parent ce2d6f47
...@@ -127,7 +127,6 @@ public: ...@@ -127,7 +127,6 @@ public:
} else if (mpFrameBufferObject) { } else if (mpFrameBufferObject) {
glm::uvec3 size = mpFrameBufferObject->getSize(); glm::uvec3 size = mpFrameBufferObject->getSize();
glViewport( 0, 0, size.x, size.y ); glViewport( 0, 0, size.x, size.y );
openGLRareError();
} }
} }
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
public: public:
inline void use (void) const inline void use (void) const
{ {
glViewport(mOffsetX, mOffsetY, mWidth, mHeight); openGLRareError(); glViewport(mOffsetX, mOffsetY, mWidth, mHeight);
} }
inline void setOffset (GLint _offsetX, GLint _offsetY) inline void setOffset (GLint _offsetX, GLint _offsetY)
......
...@@ -44,12 +44,8 @@ class BufferObject { ...@@ -44,12 +44,8 @@ class BufferObject {
public: public:
BufferObject() BufferObject()
{ {
mObjectName = 0;
glGenBuffers(1, &mObjectName); glGenBuffers(1, &mObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate buffer!" << std::endl;
mObjectName = 0;
return;
}
} }
~BufferObject(void) ~BufferObject(void)
...@@ -178,14 +174,12 @@ public: ...@@ -178,14 +174,12 @@ public:
inline void bind( GLenum _target ) const inline void bind( GLenum _target ) const
{ {
glBindBuffer( _target, mBuffer->mObjectName ); glBindBuffer( _target, mBuffer->mObjectName );
openGLRareError();
} }
//! Bind this buffer to its target //! Bind this buffer to its target
inline void bind() const inline void bind() const
{ {
glBindBuffer( mTarget, mBuffer->mObjectName ); glBindBuffer( mTarget, mBuffer->mObjectName );
openGLRareError();
} }
//! Set data for this buffer. Use only to init the buffer! //! Set data for this buffer. Use only to init the buffer!
...@@ -194,7 +188,6 @@ public: ...@@ -194,7 +188,6 @@ public:
mSize = _sizeInBytes; mSize = _sizeInBytes;
bind( _target ); bind( _target );
glBufferData( _target, _sizeInBytes, _pData, _usage ); glBufferData( _target, _sizeInBytes, _pData, _usage );
openGLRareError();
} }
//! Set data for this buffer at the last used target. Use only to init the buffer! //! Set data for this buffer at the last used target. Use only to init the buffer!
...@@ -207,7 +200,6 @@ public: ...@@ -207,7 +200,6 @@ public:
GLsizeiptr _sizeInBytes, const GLvoid *_pData ) { GLsizeiptr _sizeInBytes, const GLvoid *_pData ) {
bind( _target ); bind( _target );
glBufferSubData( _target, _offset, _sizeInBytes, _pData ); glBufferSubData( _target, _offset, _sizeInBytes, _pData );
openGLRareError();
} }
//! Use this to modify the buffer //! Use this to modify the buffer
...@@ -228,7 +220,6 @@ public: ...@@ -228,7 +220,6 @@ public:
GLvoid *mapRange( GLenum _target, GLintptr _offset, GLsizeiptr _length, GLbitfield _access ) { GLvoid *mapRange( GLenum _target, GLintptr _offset, GLsizeiptr _length, GLbitfield _access ) {
bind( _target ); bind( _target );
GLvoid *ret = glMapBufferRange( _target, _offset, _length, _access ); GLvoid *ret = glMapBufferRange( _target, _offset, _length, _access );
openGLRareError();
return ret; return ret;
} }
...@@ -248,7 +239,6 @@ public: ...@@ -248,7 +239,6 @@ public:
void flushMappedRange( GLenum _target, GLsizeiptr _offset, GLsizeiptr _length ) { void flushMappedRange( GLenum _target, GLsizeiptr _offset, GLsizeiptr _length ) {
bind( _target ); bind( _target );
glFlushMappedBufferRange( _target, _offset, _length ); glFlushMappedBufferRange( _target, _offset, _length );
openGLRareError();
} }
inline void flushMappedRange( GLintptr _offset, GLsizeiptr _length ) { inline void flushMappedRange( GLintptr _offset, GLsizeiptr _length ) {
...@@ -286,7 +276,6 @@ public: ...@@ -286,7 +276,6 @@ public:
GLvoid *map( GLenum _target, GLenum _access ) { GLvoid *map( GLenum _target, GLenum _access ) {
bind( _target ); bind( _target );
GLvoid *ret = glMapBuffer( _target, _access ); GLvoid *ret = glMapBuffer( _target, _access );
openGLRareError();
return ret; return ret;
} }
inline GLvoid *map( GLenum _access ) { inline GLvoid *map( GLenum _access ) {
...@@ -296,7 +285,6 @@ public: ...@@ -296,7 +285,6 @@ public:
GLboolean unmap( GLenum _target ) { GLboolean unmap( GLenum _target ) {
bind( _target ); bind( _target );
GLboolean ret = glUnmapBuffer( _target ); GLboolean ret = glUnmapBuffer( _target );
openGLRareError();
return ret; return ret;
} }
......
...@@ -89,12 +89,8 @@ public: ...@@ -89,12 +89,8 @@ public:
mColorAttachments(), mColorAttachments(),
mDepthAttachment() mDepthAttachment()
{ {
mObjectName = 0;
glGenFramebuffers(1, &mObjectName); glGenFramebuffers(1, &mObjectName);
if (openGLCriticalErrorOccured() )
{
ACGL::Utils::error() << "could not generate FrameBufferObject!" << std::endl;
return;
}
mDepthAttachment.texture = ConstSharedTextureBase(); mDepthAttachment.texture = ConstSharedTextureBase();
mDepthAttachment.renderBuffer = ConstSharedRenderBuffer(); mDepthAttachment.renderBuffer = ConstSharedRenderBuffer();
mDepthAttachment.name = ""; // not useful here mDepthAttachment.name = ""; // not useful here
...@@ -130,7 +126,6 @@ public: ...@@ -130,7 +126,6 @@ public:
inline void bind(GLenum _type = GL_FRAMEBUFFER) const inline void bind(GLenum _type = GL_FRAMEBUFFER) const
{ {
glBindFramebuffer(_type, mObjectName); glBindFramebuffer(_type, mObjectName);
openGLRareError(); // glBindFramebuffer can only fail if the object name is no valid FBO which shouldn't happen using this framework
} }
//! let OpenGL validate the completeness //! let OpenGL validate the completeness
......
...@@ -51,7 +51,6 @@ public: ...@@ -51,7 +51,6 @@ public:
inline void bind() const inline void bind() const
{ {
glBindProgramPipeline( mObjectName ); glBindProgramPipeline( mObjectName );
openGLRareError();
} }
//! unbinds the ProgramPipeline (if there is one bound), after that, ShaderPrograms can be used again directly //! unbinds the ProgramPipeline (if there is one bound), after that, ShaderPrograms can be used again directly
......
...@@ -40,11 +40,8 @@ public: ...@@ -40,11 +40,8 @@ public:
mWidth(0), mWidth(0),
mHeight(0) mHeight(0)
{ {
mObjectName = 0;
glGenRenderbuffers(1, &mObjectName); glGenRenderbuffers(1, &mObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate renderbuffer!" << std::endl;
return;
}
} }
virtual ~RenderBuffer(void) virtual ~RenderBuffer(void)
......
...@@ -56,7 +56,6 @@ public: ...@@ -56,7 +56,6 @@ public:
inline void bind(GLuint _textureUnit) const inline void bind(GLuint _textureUnit) const
{ {
glBindSampler( _textureUnit, mObjectName ); // yes, no adding of GL_TEXTURE0 ! glBindSampler( _textureUnit, mObjectName ); // yes, no adding of GL_TEXTURE0 !
openGLRareError();
} }
//! unbinds the texture sampler (if there is one bound) from _textureUnit //! unbinds the texture sampler (if there is one bound) from _textureUnit
......
...@@ -45,7 +45,6 @@ public: ...@@ -45,7 +45,6 @@ public:
{ {
mObjectName = glCreateShader(mType); mObjectName = glCreateShader(mType);
if (mObjectName == 0) { if (mObjectName == 0) {
openGLRareError();
ACGL::Utils::error() << "couldn't create Shader object! Requested type = " << (unsigned int) mType << std::endl; ACGL::Utils::error() << "couldn't create Shader object! Requested type = " << (unsigned int) mType << std::endl;
} }
} }
......
...@@ -130,7 +130,6 @@ public: ...@@ -130,7 +130,6 @@ public:
inline void setUniformBlockBinding( const std::string& _blockName, GLuint _bindingPoint ) const { inline void setUniformBlockBinding( const std::string& _blockName, GLuint _bindingPoint ) const {
GLuint blockIndex = getUniformBlockIndex(_blockName); GLuint blockIndex = getUniformBlockIndex(_blockName);
if (blockIndex != GL_INVALID_INDEX) glUniformBlockBinding( mObjectName, blockIndex, _bindingPoint ); if (blockIndex != GL_INVALID_INDEX) glUniformBlockBinding( mObjectName, blockIndex, _bindingPoint );
openGLCommonError();
} }
GLint getUniformBlockBinding( const std::string& _blockName ) const { return getUniformBlockBinding( getUniformBlockIndex(_blockName)); } GLint getUniformBlockBinding( const std::string& _blockName ) const { return getUniformBlockBinding( getUniformBlockIndex(_blockName)); }
......
...@@ -73,9 +73,6 @@ public: ...@@ -73,9 +73,6 @@ public:
mInternalFormat(GL_RGBA) mInternalFormat(GL_RGBA)
{ {
glGenTextures(1, &mObjectName); glGenTextures(1, &mObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate texture!" << std::endl;
}
} }
TextureBase(GLenum _target, GLenum _internalFormat) TextureBase(GLenum _target, GLenum _internalFormat)
...@@ -87,9 +84,6 @@ public: ...@@ -87,9 +84,6 @@ public:
mInternalFormat(_internalFormat) mInternalFormat(_internalFormat)
{ {
glGenTextures(1, &mObjectName); glGenTextures(1, &mObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate texture!" << std::endl;
}
} }
virtual ~TextureBase(void) virtual ~TextureBase(void)
...@@ -134,14 +128,12 @@ public: ...@@ -134,14 +128,12 @@ public:
{ {
glActiveTexture(GL_TEXTURE0 + _textureUnit); glActiveTexture(GL_TEXTURE0 + _textureUnit);
glBindTexture(mTarget, mObjectName); glBindTexture(mTarget, mObjectName);
openGLRareError();
} }
//! Bind this texture to the currently active texture unit. //! Bind this texture to the currently active texture unit.
inline void bind(void) const inline void bind(void) const
{ {
glBindTexture(mTarget, mObjectName); glBindTexture(mTarget, mObjectName);
openGLRareError();
} }
//! sets the minification filter //! sets the minification filter
......
...@@ -36,10 +36,8 @@ class TextureBuffer : public Buffer ...@@ -36,10 +36,8 @@ class TextureBuffer : public Buffer
public: public:
// create a new BufferObject with _reservedMemory space (in bytes!) // create a new BufferObject with _reservedMemory space (in bytes!)
TextureBuffer( GLenum _dataType, size_t _reservedMemory = 1 ) : Buffer(GL_TEXTURE_BUFFER) { TextureBuffer( GLenum _dataType, size_t _reservedMemory = 1 ) : Buffer(GL_TEXTURE_BUFFER) {
mTextureObjectName = 0;
glGenTextures(1, &mTextureObjectName); glGenTextures(1, &mTextureObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate texture object for texture buffer!" << std::endl;
}
mDataType = _dataType; mDataType = _dataType;
Buffer::setData( _reservedMemory ); Buffer::setData( _reservedMemory );
attachBufferToTexture(); attachBufferToTexture();
...@@ -47,10 +45,8 @@ public: ...@@ -47,10 +45,8 @@ public:
// use an existing BufferObject // use an existing BufferObject
TextureBuffer( GLenum _dataType, SharedBufferObject _pBuffer ) : Buffer(_pBuffer, GL_TEXTURE_BUFFER) { TextureBuffer( GLenum _dataType, SharedBufferObject _pBuffer ) : Buffer(_pBuffer, GL_TEXTURE_BUFFER) {
mTextureObjectName = 0;
glGenTextures(1, &mTextureObjectName); glGenTextures(1, &mTextureObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate texture object for texture buffer!" << std::endl;
}
mDataType = _dataType; mDataType = _dataType;
attachBufferToTexture(); attachBufferToTexture();
} }
...@@ -75,7 +71,6 @@ public: ...@@ -75,7 +71,6 @@ public:
void bindTexture(GLuint _textureUnit = 0) const { void bindTexture(GLuint _textureUnit = 0) const {
glActiveTexture(GL_TEXTURE0 + _textureUnit); glActiveTexture(GL_TEXTURE0 + _textureUnit);
glBindTexture(GL_TEXTURE_BUFFER, mTextureObjectName); glBindTexture(GL_TEXTURE_BUFFER, mTextureObjectName);
openGLRareError();
} }
//! Bind the buffer part to change the data //! Bind the buffer part to change the data
...@@ -101,7 +96,6 @@ private: ...@@ -101,7 +96,6 @@ private:
bindTexture(); bindTexture();
glTexBuffer( GL_TEXTURE_BUFFER, mDataType, Buffer::getObjectName() ); glTexBuffer( GL_TEXTURE_BUFFER, mDataType, Buffer::getObjectName() );
} }
openGLCriticalErrorOccured();
} }
GLenum mDataType; GLenum mDataType;
......
...@@ -219,12 +219,11 @@ public: ...@@ -219,12 +219,11 @@ public:
//! Will select the matching draw call. Remember to bind() first! //! Will select the matching draw call. Remember to bind() first!
void draw( GLsizei _primcount = 1 ) const void draw( GLsizei _primcount = 1 ) const
{ {
if(mpElementArrayBuffer) if (mpElementArrayBuffer) {
drawElements( _primcount ); drawElements( _primcount );
else } else {
drawArrays( _primcount ); drawArrays( _primcount );
}
openGLRareError();
} }
// ===================================================================================================== \/ // ===================================================================================================== \/
......
...@@ -97,7 +97,7 @@ SharedShaderProgram ShaderProgramCreator::create() ...@@ -97,7 +97,7 @@ SharedShaderProgram ShaderProgramCreator::create()
if (!setBindings( shaderProgram )) { if (!setBindings( shaderProgram )) {
return SharedShaderProgram(); // e.g. linking failed return SharedShaderProgram(); // e.g. linking failed
} }
openGLCommonError();
updateFileModificationTimes(); updateFileModificationTimes();
return shaderProgram; return shaderProgram;
} }
...@@ -105,18 +105,14 @@ SharedShaderProgram ShaderProgramCreator::create() ...@@ -105,18 +105,14 @@ SharedShaderProgram ShaderProgramCreator::create()
// will get called from the create and update functions: // will get called from the create and update functions:
bool ShaderProgramCreator::setBindings(SharedShaderProgram &_shaderProgram) bool ShaderProgramCreator::setBindings(SharedShaderProgram &_shaderProgram)
{ {
openGLRareError();
_shaderProgram->link(); _shaderProgram->link();
# if (ACGL_OPENGL_VERSION >= 30) # if (ACGL_OPENGL_VERSION >= 30)
_shaderProgram->setFragmentDataLocations( mFragmentDataLocations ); // might relink on it's own _shaderProgram->setFragmentDataLocations( mFragmentDataLocations ); // might relink on it's own
openGLRareError();
SharedLocationMappings oldAttributeMap = _shaderProgram->getAttributeLocations(); SharedLocationMappings oldAttributeMap = _shaderProgram->getAttributeLocations();
mAttributeLocations->addLocations( oldAttributeMap ); // add as many old locations as possible without destoying the location map mAttributeLocations->addLocations( oldAttributeMap ); // add as many old locations as possible without destoying the location map
_shaderProgram->setAttributeLocations( mAttributeLocations ); // might relink on it's own _shaderProgram->setAttributeLocations( mAttributeLocations ); // might relink on it's own
openGLRareError();
# else # else
if ( (mAttributeLocations->getSize() > 0) && (mFragmentDataLocations->getSize() > 0) ) { if ( (mAttributeLocations->getSize() > 0) && (mFragmentDataLocations->getSize() > 0) ) {
Utils::error() << "can't set explicit attribute/fragdata locations on OpenGL < 3.0" << std::endl; Utils::error() << "can't set explicit attribute/fragdata locations on OpenGL < 3.0" << std::endl;
......
...@@ -27,7 +27,6 @@ void RenderObject::updateMappings() ...@@ -27,7 +27,6 @@ void RenderObject::updateMappings()
} }
mpVertexArrayObject->setAttributeLocations( mpShaderProgramObject->getShaderProgram()->getAttributeLocations() ); mpVertexArrayObject->setAttributeLocations( mpShaderProgramObject->getShaderProgram()->getAttributeLocations() );
openGLRareError();
*/ */
} }
...@@ -43,13 +42,11 @@ void RenderObject::enableFrameBufferObject() const ...@@ -43,13 +42,11 @@ void RenderObject::enableFrameBufferObject() const
{ {
glBindFramebuffer( GL_FRAMEBUFFER, 0 ); glBindFramebuffer( GL_FRAMEBUFFER, 0 );
} }
openGLRareError();
} }
void RenderObject::disableFrameBufferObject() const void RenderObject::disableFrameBufferObject() const
{ {
glBindFramebuffer( GL_FRAMEBUFFER, mLastFBO ); glBindFramebuffer( GL_FRAMEBUFFER, mLastFBO );
openGLRareError();
} }
...@@ -57,13 +54,11 @@ void RenderObject::enableShaderProgramObject() const ...@@ -57,13 +54,11 @@ void RenderObject::enableShaderProgramObject() const
{ {
glGetIntegerv( GL_CURRENT_PROGRAM, &mLastShaderProgram ); glGetIntegerv( GL_CURRENT_PROGRAM, &mLastShaderProgram );
mpShaderProgramObject->use(); mpShaderProgramObject->use();
openGLRareError();
} }
void RenderObject::disableShaderProgramObject() const void RenderObject::disableShaderProgramObject() const
{ {
glUseProgram( mLastShaderProgram ); glUseProgram( mLastShaderProgram );
openGLRareError();
} }
void RenderObject::enableVertexArrayObject() const void RenderObject::enableVertexArrayObject() const
...@@ -72,13 +67,11 @@ void RenderObject::enableVertexArrayObject() const ...@@ -72,13 +67,11 @@ void RenderObject::enableVertexArrayObject() const
glGetIntegerv( GL_VERTEX_ARRAY_BINDING, &mLastVAO ); glGetIntegerv( GL_VERTEX_ARRAY_BINDING, &mLastVAO );
mpVertexArrayObject->bind(); mpVertexArrayObject->bind();
openGLRareError();
} }
void RenderObject::disableVertexArrayObject() const void RenderObject::disableVertexArrayObject() const
{ {
glBindVertexArray( mLastVAO ); glBindVertexArray( mLastVAO );
openGLRareError();
} }
void RenderObject::enableViewport() const void RenderObject::enableViewport() const
...@@ -91,7 +84,6 @@ void RenderObject::enableViewport() const ...@@ -91,7 +84,6 @@ void RenderObject::enableViewport() const
} else if (mpFrameBufferObject) { } else if (mpFrameBufferObject) {
glm::uvec3 size = mpFrameBufferObject->getSize(); glm::uvec3 size = mpFrameBufferObject->getSize();
glViewport( 0, 0, size.x, size.y ); glViewport( 0, 0, size.x, size.y );
openGLRareError();
} }
} }
......
...@@ -124,7 +124,6 @@ bool FrameBufferObject::attachColorAttachment( const Attachment &_attachment ) ...@@ -124,7 +124,6 @@ bool FrameBufferObject::attachColorAttachment( const Attachment &_attachment )
// attach it to the OpenGL object: // attach it to the OpenGL object:
bind(); bind();
openGLCriticalError();
if (_attachment.renderBuffer) { if (_attachment.renderBuffer) {
// it's a renderBuffer // it's a renderBuffer
glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + realLocation, GL_RENDERBUFFER, _attachment.renderBuffer->getObjectName() ); glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + realLocation, GL_RENDERBUFFER, _attachment.renderBuffer->getObjectName() );
...@@ -182,11 +181,6 @@ bool FrameBufferObject::attachColorAttachment( const Attachment &_attachment ) ...@@ -182,11 +181,6 @@ bool FrameBufferObject::attachColorAttachment( const Attachment &_attachment )
//Utils::debug() << "glFramebufferTexture2D( " << _attachment.name << " to " << realLocation <<" )" << std::endl; //Utils::debug() << "glFramebufferTexture2D( " << _attachment.name << " to " << realLocation <<" )" << std::endl;
} }
if (openGLCommonErrorOccured())
{
Utils::error() << "Attaching of render target to the FBO failed" << std::endl;
return false;
}
remapAttachments(); remapAttachments();
return true; return true;
...@@ -317,8 +311,6 @@ SharedTextureData FrameBufferObject::getImageData(GLsizei _width, GLsizei _heigh ...@@ -317,8 +311,6 @@ SharedTextureData FrameBufferObject::getImageData(GLsizei _width, GLsizei _heigh
texData->setData(frameBufferData); // frameBufferData memory will be managed by texData texData->setData(frameBufferData); // frameBufferData memory will be managed by texData
texData->setPadding(paddingPerRow); texData->setPadding(paddingPerRow);
openGLRareError();
return texData; return texData;
} }
......
...@@ -12,12 +12,8 @@ using namespace ACGL::OpenGL; ...@@ -12,12 +12,8 @@ using namespace ACGL::OpenGL;
ProgramPipeline::ProgramPipeline() ProgramPipeline::ProgramPipeline()
{ {
mObjectName = 0;
glGenProgramPipelines(1, &mObjectName); glGenProgramPipelines(1, &mObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate ProgramPipeline!" << std::endl;
mObjectName = 0;
return;
}
} }
ProgramPipeline::~ProgramPipeline(void) ProgramPipeline::~ProgramPipeline(void)
......
...@@ -13,12 +13,8 @@ using namespace ACGL::OpenGL; ...@@ -13,12 +13,8 @@ using namespace ACGL::OpenGL;
Sampler::Sampler() Sampler::Sampler()
{ {
mObjectName = 0;
glGenSamplers(1, &mObjectName); glGenSamplers(1, &mObjectName);
if (openGLCriticalErrorOccured() ) {
ACGL::Utils::error() << "could not generate sampler!" << std::endl;
mObjectName = 0;
return;
}
} }
Sampler::~Sampler(void) Sampler::~Sampler(void)
...@@ -34,7 +30,6 @@ void Sampler::setMaxAnisotropy( GLfloat _sampleCount ) ...@@ -34,7 +30,6 @@ void Sampler::setMaxAnisotropy( GLfloat _sampleCount )
_sampleCount = std::max( _sampleCount, 1.0f ); _sampleCount = std::max( _sampleCount, 1.0f );
_sampleCount = std::min( _sampleCount, ACGL_MAX_TEXTURE_MAX_ANISOTROPY ); _sampleCount = std::min( _sampleCount, ACGL_MAX_TEXTURE_MAX_ANISOTROPY );
glSamplerParameterf( mObjectName, GL_TEXTURE_MAX_ANISOTROPY_EXT, _sampleCount ); glSamplerParameterf( mObjectName, GL_TEXTURE_MAX_ANISOTROPY_EXT, _sampleCount );
openGLRareError();
} else } else
{ {
if (_sampleCount != 1.0f ) { if (_sampleCount != 1.0f ) {
......
...@@ -129,17 +129,6 @@ bool Shader::setSources(const std::vector<std::string> &_sources, bool _checkFor ...@@ -129,17 +129,6 @@ bool Shader::setSources(const std::vector<std::string> &_sources, bool _checkFor
bool Shader::compile() const bool Shader::compile() const
{