Avoiding temp variable reference to appease mac and fixing a warning

This commit is contained in:
Sam Cake 2017-04-15 00:45:50 -07:00
parent 96960a505d
commit 038d01ce04
3 changed files with 6 additions and 5 deletions

View file

@ -17,9 +17,9 @@
namespace gl {
#ifdef SEPARATE_PROGRAM
bool compileShader(GLenum shaderDomain, const std::string& shaderSource, const std::string& defines, GLuint &shaderObject, GLuint &programObject, std::string& error = std::string());
bool compileShader(GLenum shaderDomain, const std::string& shaderSource, const std::string& defines, GLuint &shaderObject, GLuint &programObject, std::string& error);
#else
bool compileShader(GLenum shaderDomain, const std::string& shaderSource, const std::string& defines, GLuint &shaderObject, std::string& error = std::string());
bool compileShader(GLenum shaderDomain, const std::string& shaderSource, const std::string& defines, GLuint &shaderObject, std::string& error);
#endif
GLuint compileProgram(const std::vector<GLuint>& glshaders, std::string& error = std::string());

View file

@ -165,7 +165,7 @@ void DrawBounds::run(const SceneContextPointer& sceneContext, const RenderContex
const Inputs& items) {
RenderArgs* args = renderContext->args;
auto numItems = items.size();
uint32_t numItems = (uint32_t) items.size();
if (numItems == 0) {
return;
}

View file

@ -196,8 +196,9 @@ public:
std::string vsSource = HMD_REPROJECTION_VERT;
std::string fsSource = HMD_REPROJECTION_FRAG;
GLuint vertexShader { 0 }, fragmentShader { 0 };
::gl::compileShader(GL_VERTEX_SHADER, vsSource, "", vertexShader);
::gl::compileShader(GL_FRAGMENT_SHADER, fsSource, "", fragmentShader);
std::string error;
::gl::compileShader(GL_VERTEX_SHADER, vsSource, "", vertexShader, error);
::gl::compileShader(GL_FRAGMENT_SHADER, fsSource, "", fragmentShader, error);
_program = ::gl::compileProgram({ { vertexShader, fragmentShader } });
glDeleteShader(vertexShader);
glDeleteShader(fragmentShader);