mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Cleanup thanks to review
This commit is contained in:
parent
4c2cdc8704
commit
f2f092e9c8
3 changed files with 2 additions and 10 deletions
|
@ -385,7 +385,7 @@ void GLBackend::do_drawInstanced(Batch& batch, size_t paramOffset) {
|
|||
|
||||
|
||||
if (isStereo()) {
|
||||
GLint trueNumInstances = (isStereo() ? 2 * numInstances : numInstances);
|
||||
GLint trueNumInstances = 2 * numInstances;
|
||||
|
||||
setupStereoSide(0);
|
||||
glDrawArraysInstancedARB(mode, startVertex, numVertices, numInstances);
|
||||
|
@ -428,7 +428,7 @@ void GLBackend::do_drawIndexedInstanced(Batch& batch, size_t paramOffset) {
|
|||
GLvoid* indexBufferByteOffset = reinterpret_cast<GLvoid*>(startIndex * typeByteSize + _input._indexBufferOffset);
|
||||
|
||||
if (isStereo()) {
|
||||
GLint trueNumInstances = (isStereo() ? 2 * numInstances : numInstances);
|
||||
GLint trueNumInstances = 2 * numInstances;
|
||||
|
||||
setupStereoSide(0);
|
||||
glbackend_glDrawElementsInstancedBaseVertexBaseInstance(mode, numIndices, glType, indexBufferByteOffset, numInstances, 0, startInstance);
|
||||
|
|
|
@ -120,11 +120,7 @@ void GLBackend::updateInput() {
|
|||
glVertexAttribFormat(slot + locNum, count, type, isNormalized, offset + locNum * perLocationSize);
|
||||
glVertexAttribBinding(slot + locNum, attrib._channel);
|
||||
}
|
||||
#ifdef GPU_STEREO_DRAWCALL_INSTANCED
|
||||
glVertexBindingDivisor(attrib._channel, attrib._frequency * (isStereo() ? 2 : 1));
|
||||
#else
|
||||
glVertexBindingDivisor(attrib._channel, attrib._frequency);
|
||||
#endif
|
||||
}
|
||||
(void) CHECK_GL_ERROR();
|
||||
}
|
||||
|
|
|
@ -85,11 +85,7 @@ void GLBackend::do_setPipeline(Batch& batch, size_t paramOffset) {
|
|||
|
||||
// check the program cache
|
||||
// pick the program version
|
||||
#ifdef GPU_STEREO_CAMERA_BUFFER
|
||||
GLuint glprogram = pipelineObject->_program->getProgram(isStereo());
|
||||
#else
|
||||
GLuint glprogram = pipelineObject->_program->getProgram();
|
||||
#endif
|
||||
|
||||
if (_pipeline._program != glprogram) {
|
||||
_pipeline._program = glprogram;
|
||||
|
|
Loading…
Reference in a new issue