Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Hardware/Video/OpenGL/GLStates.cpp

Diff revisions: vs.
  @@ -195,7 +195,7 @@
195 195 return true;
196 196 }
197 197
198 - /// Bind a texture specified by a GL handle and GL type to the specified unit using the desired sampler object defined by hash value
198 + /// Bind a texture specified by a GL handle and GL type to the specified unit using the sampler object defined by hash value
199 199 bool GL_API::bindTexture(GLuint unit, GLuint handle, GLenum type, size_t samplerHash) {
200 200 // Fail if we specified an invalid unit. Assert instead of returning false because this might be related to a bad algorithm
201 201 DIVIDE_ASSERT(unit < static_cast<GLuint>(ParamHandler::getInstance().getParam<I32>("rendering.maxTextureSlots", 16)),
  @@ -239,7 +239,8 @@
239 239 // Bind the requested buffer to the appropriate target
240 240 switch ( usage ) {
241 241 case Framebuffer::FB_READ_WRITE: {
242 - // According to documentation this is equivalent to independent calls to bindFramebuffer(read, id) and bindFramebuffer(write, id)
242 + // According to documentation this is equivalent to independent calls to
243 + // bindFramebuffer(read, id) and bindFramebuffer(write, id)
243 244 glBindFramebuffer( GL_FRAMEBUFFER, id );
244 245 // This also overrides the read and write bindings
245 246 _activeFBId[Framebuffer::FB_READ_ONLY] = id;
  @@ -317,7 +318,8 @@
317 318 bool GL_API::setActiveProgram(glShaderProgram* const program) {
318 319 // Check if we are binding a new program or unbinding all shaders
319 320 GLuint newProgramId = (program != nullptr) ? program->getId() : 0;
320 - // Get the previous program's handle to compare against. The active program is stored in the GFXDevice object, so indirects are unavoidable
321 + // Get the previous program's handle to compare against. The active program is stored in the GFXDevice object,
322 + // so indirects are unavoidable
321 323 ShaderProgram* previousProgram = GFX_DEVICE.activeShaderProgram();
322 324 GLuint oldProgramId = (previousProgram != nullptr) ? previousProgram->getId() : 0;
323 325 // Prevent double bind
  @@ -338,7 +340,8 @@
338 340
339 341 /// Change the clear color
340 342 void GL_API::clearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
341 - DIVIDE_ASSERT(0 < Config::MAX_RENDER_TARGETS, "GLStates error: invalid render target ID. Increase Config::MAX_RENDER_TARGETS!");
343 + DIVIDE_ASSERT(0 < Config::MAX_RENDER_TARGETS,
344 + "GLStates error: invalid render target ID. Increase Config::MAX_RENDER_TARGETS!");
342 345 // Prevent setting the clear color to the exact same value again
343 346 if ( _prevClearColor != vec4<F32>( r, g, b, a ) ) {
344 347 // Remember the current clear color for this target for future reference
  @@ -367,7 +370,8 @@
367 370 #define TOGGLE_WITH_CHECK(state, enumValue) if(SHOULD_TOGGLE(state)) TOGGLE_NO_CHECK(state, enumValue);
368 371 #endif
369 372
370 - /// A state block should contain all rendering state changes needed for the next draw call. Some may be redundant, so we check each one individually
373 + /// A state block should contain all rendering state changes needed for the next draw call.
374 + /// Some may be redundant, so we check each one individually
371 375 void GL_API::activateStateBlock(const RenderStateBlock& newBlock, RenderStateBlock* const oldBlock) const {
372 376 // Get the new block's descriptor
373 377 const RenderStateBlockDescriptor& newDescriptor = newBlock.getDescriptor();
  @@ -407,7 +411,9 @@
407 411 }
408 412 // Stencil function is dependent on 3 state parameters set together
409 413 if ( SHOULD_TOGGLE_3( _stencilFunc, _stencilRef, _stencilMask ) ) {
410 - glStencilFunc( GLUtil::GL_ENUM_TABLE::glCompareFuncTable[newDescriptor._stencilFunc], newDescriptor._stencilRef, newDescriptor._stencilMask );
414 + glStencilFunc(GLUtil::GL_ENUM_TABLE::glCompareFuncTable[newDescriptor._stencilFunc],
415 + newDescriptor._stencilRef,
416 + newDescriptor._stencilMask );
411 417 }
412 418 // Stencil operation is also dependent on 3 state parameters set together
413 419 if ( SHOULD_TOGGLE_3( _stencilFailOp, _stencilZFailOp, _stencilPassOp ) ) {