mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 20:26:55 +02:00
Fixing the bad rendering of the instanced primitives on 4.1
This commit is contained in:
parent
3c62826ef9
commit
c3c73b209a
4 changed files with 14 additions and 1 deletions
|
@ -571,10 +571,15 @@ void OpenGLDisplayPlugin::compositeLayers() {
|
||||||
compositeScene();
|
compositeScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HIFI_ENABLE_NSIGHT_DEBUG
|
||||||
|
if (false) // do not compositeoverlay if running nsight debug
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
PROFILE_RANGE_EX(render_detail, "compositeOverlay", 0xff0077ff, (uint64_t)presentCount())
|
PROFILE_RANGE_EX(render_detail, "compositeOverlay", 0xff0077ff, (uint64_t)presentCount())
|
||||||
compositeOverlay();
|
compositeOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compositorHelper = DependencyManager::get<CompositorHelper>();
|
auto compositorHelper = DependencyManager::get<CompositorHelper>();
|
||||||
if (compositorHelper->getReticleVisible()) {
|
if (compositorHelper->getReticleVisible()) {
|
||||||
PROFILE_RANGE_EX(render_detail, "compositePointer", 0xff0077ff, (uint64_t)presentCount())
|
PROFILE_RANGE_EX(render_detail, "compositePointer", 0xff0077ff, (uint64_t)presentCount())
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
|
|
||||||
#include <GL/wglew.h>
|
#include <GL/wglew.h>
|
||||||
|
|
||||||
|
// Uncomment this define and recompile to be able to avoid code path preventing to be able to run nsight graphics debug
|
||||||
|
//#define HIFI_ENABLE_NSIGHT_DEBUG 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // hifi_gpu_GPUConfig_h
|
#endif // hifi_gpu_GPUConfig_h
|
||||||
|
|
|
@ -278,6 +278,11 @@ void OffscreenQmlSurface::cleanup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenQmlSurface::render() {
|
void OffscreenQmlSurface::render() {
|
||||||
|
|
||||||
|
#ifdef HIFI_ENABLE_NSIGHT_DEBUG
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (_paused) {
|
if (_paused) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,6 @@ void GL41Backend::updateTransform(const Batch& batch) {
|
||||||
} else {
|
} else {
|
||||||
if (!_transform._enabledDrawcallInfoBuffer) {
|
if (!_transform._enabledDrawcallInfoBuffer) {
|
||||||
glEnableVertexAttribArray(gpu::Stream::DRAW_CALL_INFO); // Make sure attrib array is enabled
|
glEnableVertexAttribArray(gpu::Stream::DRAW_CALL_INFO); // Make sure attrib array is enabled
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, _transform._drawCallInfoBuffer);
|
|
||||||
#ifdef GPU_STEREO_DRAWCALL_INSTANCED
|
#ifdef GPU_STEREO_DRAWCALL_INSTANCED
|
||||||
glVertexAttribDivisor(gpu::Stream::DRAW_CALL_INFO, (isStereo() ? 2 : 1));
|
glVertexAttribDivisor(gpu::Stream::DRAW_CALL_INFO, (isStereo() ? 2 : 1));
|
||||||
#else
|
#else
|
||||||
|
@ -103,6 +102,7 @@ void GL41Backend::updateTransform(const Batch& batch) {
|
||||||
#endif
|
#endif
|
||||||
_transform._enabledDrawcallInfoBuffer = true;
|
_transform._enabledDrawcallInfoBuffer = true;
|
||||||
}
|
}
|
||||||
|
glBindBuffer(GL_ARRAY_BUFFER, _transform._drawCallInfoBuffer);
|
||||||
glVertexAttribIPointer(gpu::Stream::DRAW_CALL_INFO, 2, GL_UNSIGNED_SHORT, 0, _transform._drawCallInfoOffsets[batch._currentNamedCall]);
|
glVertexAttribIPointer(gpu::Stream::DRAW_CALL_INFO, 2, GL_UNSIGNED_SHORT, 0, _transform._drawCallInfoOffsets[batch._currentNamedCall]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue