Combining with new cursor render code

This commit is contained in:
Brad Davis 2015-06-11 16:55:23 -07:00
parent 9148b866bb
commit 09cfe004a1
2 changed files with 9 additions and 9 deletions

View file

@ -210,7 +210,7 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) {
overlays.renderHUD(renderArgs); overlays.renderHUD(renderArgs);
//renderPointers(); renderPointers();
renderDomainConnectionStatusBorder(); renderDomainConnectionStatusBorder();
if (_newUiTexture) { if (_newUiTexture) {
@ -268,7 +268,7 @@ void ApplicationOverlay::bindCursorTexture(gpu::Batch& batch, uint8_t cursorInde
_cursors[iconId] = DependencyManager::get<TextureCache>()-> _cursors[iconId] = DependencyManager::get<TextureCache>()->
getImageTexture(iconPath); getImageTexture(iconPath);
} }
glBindTexture(GL_TEXTURE_2D, gpu::GLBackend::getTextureID(_cursors[iconId])); batch.setUniformTexture(0, _cursors[iconId]);
} }
#define CURSOR_PIXEL_SIZE 32.0f #define CURSOR_PIXEL_SIZE 32.0f
@ -471,11 +471,11 @@ bool ApplicationOverlay::calculateRayUICollisionPoint(const glm::vec3& position,
//Renders optional pointers //Renders optional pointers
void ApplicationOverlay::renderPointers() { void ApplicationOverlay::renderPointers() {
glEnable(GL_TEXTURE_2D); //glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND); //glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glActiveTexture(GL_TEXTURE0); //glActiveTexture(GL_TEXTURE0);
//bindCursorTexture(); //bindCursorTexture();
if (qApp->isHMDMode() && !qApp->getLastMouseMoveWasSimulated() && !qApp->isMouseHidden()) { if (qApp->isHMDMode() && !qApp->getLastMouseMoveWasSimulated() && !qApp->isMouseHidden()) {
@ -521,8 +521,8 @@ void ApplicationOverlay::renderPointers() {
_magActive[MOUSE] = false; _magActive[MOUSE] = false;
renderControllerPointers(); renderControllerPointers();
} }
glBindTexture(GL_TEXTURE_2D, 0); //glBindTexture(GL_TEXTURE_2D, 0);
glDisable(GL_TEXTURE_2D); //glDisable(GL_TEXTURE_2D);
} }
void ApplicationOverlay::renderControllerPointers() { void ApplicationOverlay::renderControllerPointers() {

View file

@ -49,7 +49,7 @@ namespace Cursor {
static uint16_t _customIconId = Icon::USER_BASE; static uint16_t _customIconId = Icon::USER_BASE;
Manager::Manager() { 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"; ICONS[Icon::LINK] = PathUtils::resourcesPath() + "images/reticleLink.png";
} }