From 09cfe004a18ab8c9b5622eb6d33dc22a41b7cf36 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 11 Jun 2015 16:55:23 -0700 Subject: [PATCH] Combining with new cursor render code --- interface/src/ui/ApplicationOverlay.cpp | 16 ++++++++-------- libraries/ui/src/CursorManager.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 971958ae61..ba0d3a60a9 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -210,7 +210,7 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) { overlays.renderHUD(renderArgs); - //renderPointers(); + renderPointers(); renderDomainConnectionStatusBorder(); if (_newUiTexture) { @@ -268,7 +268,7 @@ void ApplicationOverlay::bindCursorTexture(gpu::Batch& batch, uint8_t cursorInde _cursors[iconId] = DependencyManager::get()-> getImageTexture(iconPath); } - glBindTexture(GL_TEXTURE_2D, gpu::GLBackend::getTextureID(_cursors[iconId])); + batch.setUniformTexture(0, _cursors[iconId]); } #define CURSOR_PIXEL_SIZE 32.0f @@ -471,11 +471,11 @@ bool ApplicationOverlay::calculateRayUICollisionPoint(const glm::vec3& position, //Renders optional pointers void ApplicationOverlay::renderPointers() { - glEnable(GL_TEXTURE_2D); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + //glEnable(GL_TEXTURE_2D); + //glEnable(GL_BLEND); + //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glActiveTexture(GL_TEXTURE0); + //glActiveTexture(GL_TEXTURE0); //bindCursorTexture(); if (qApp->isHMDMode() && !qApp->getLastMouseMoveWasSimulated() && !qApp->isMouseHidden()) { @@ -521,8 +521,8 @@ void ApplicationOverlay::renderPointers() { _magActive[MOUSE] = false; renderControllerPointers(); } - glBindTexture(GL_TEXTURE_2D, 0); - glDisable(GL_TEXTURE_2D); + //glBindTexture(GL_TEXTURE_2D, 0); + //glDisable(GL_TEXTURE_2D); } void ApplicationOverlay::renderControllerPointers() { diff --git a/libraries/ui/src/CursorManager.cpp b/libraries/ui/src/CursorManager.cpp index efadd09142..38c746994d 100644 --- a/libraries/ui/src/CursorManager.cpp +++ b/libraries/ui/src/CursorManager.cpp @@ -49,7 +49,7 @@ namespace Cursor { static uint16_t _customIconId = Icon::USER_BASE; Manager::Manager() { - ICONS[Icon::DEFAULT] = PathUtils::resourcesPath() + "images/sixense-reticle.png"; + ICONS[Icon::DEFAULT] = PathUtils::resourcesPath() + "images/arrow.png"; ICONS[Icon::LINK] = PathUtils::resourcesPath() + "images/reticleLink.png"; }