mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
Avoiding temp variable reference to appease mac and fixing a warning
This commit is contained in:
parent
96960a505d
commit
038d01ce04
3 changed files with 6 additions and 5 deletions
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue