Fix build errors

This commit is contained in:
Brad Davis 2016-11-29 14:02:11 -08:00
parent 3b07e31eab
commit a98e49c892
3 changed files with 30 additions and 7 deletions

View file

@ -126,7 +126,7 @@ bool Context::makeProgram(Shader& shader, const Shader::BindingSet& bindings) {
// FIXME find a way to do this without reliance on Qt app properties
if (!_makeProgramCallback) {
void* rawCallback = qApp->property(hifi::properties::gl::MAKE_PROGRAM_CALLBACK).value<void*>();
_makeProgramCallback = static_cast<Context::MakeProgram>(rawCallback);
_makeProgramCallback = reinterpret_cast<Context::MakeProgram>(rawCallback);
}
if (shader.isProgram() && _makeProgramCallback) {
return _makeProgramCallback(shader, bindings);

View file

@ -0,0 +1,23 @@
//
// Created by Bradley Austin Davis on 2016/11/29
// Copyright 2013-2016 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "GlobalAppProperties.h"
namespace hifi { namespace properties {
const char* CRASHED = "com.highfidelity.crashed";
const char* STEAM = "com.highfidelity.launchedFromSteam";
const char* LOGGER = "com.highfidelity.logger";
namespace gl {
const char* BACKEND = "com.highfidelity.gl.backend";
const char* MAKE_PROGRAM_CALLBACK = "com.highfidelity.gl.makeProgram";
const char* PRIMARY_CONTEXT = "com.highfidelity.gl.primaryContext";
}
} }

View file

@ -12,14 +12,14 @@
namespace hifi { namespace properties {
static const char* CRASHED = "com.highfidelity.crashed";
static const char* STEAM = "com.highfidelity.launchedFromSteam";
static const char* LOGGER = "com.highfidelity.logger";
extern const char* CRASHED;
extern const char* STEAM;
extern const char* LOGGER;
namespace gl {
static const char* BACKEND = "com.highfidelity.gl.backend";
static const char* MAKE_PROGRAM_CALLBACK = "com.highfidelity.gl.makeProgram";
static const char* PRIMARY_CONTEXT = "com.highfidelity.gl.primaryContext";
extern const char* BACKEND;
extern const char* MAKE_PROGRAM_CALLBACK;
extern const char* PRIMARY_CONTEXT;
}
} }