compilation on MacOSX

This commit is contained in:
samcake 2015-03-18 16:28:42 -07:00
parent 414315b6e0
commit 0f22d64802
3 changed files with 97 additions and 90 deletions

View file

@ -510,7 +510,7 @@ int makeUniformSlots(GLuint glprogram, const Shader::BindingSet& slotBindings, S
GLint uniformsCount = 0;
#if (GPU_FEATURE_PROFILE == GPU_LEGACY)
GLuint currentProgram = 0;
GLint currentProgram = 0;
glGetIntegerv(GL_CURRENT_PROGRAM, &currentProgram);
glUseProgram(glprogram);
#endif

View file

@ -51,11 +51,18 @@ public:
Element _element = Element();
uint16 _resourceType = Resource::BUFFER;
Slot(const Slot& s) : _name(s._name), _location(s._location), _element(s._element), _resourceType(s._resourceType) {}
Slot(const Slot&& s) : _name(s._name), _location(s._location), _element(s._element), _resourceType(s._resourceType) {}
// Slot& operator&&(const Slot&& s) : _name(s._name), _location(s._location), _element(s._element), _resourceType(s._resourceType) {}
Slot(const std::string& name, int32 location, const Element& element, uint16 resourceType = Resource::BUFFER) :
_name(name), _location(location), _element(element), _resourceType(resourceType) {}
Slot(const std::string& name) : _name(name) {}
Slot& operator= (const Slot& s) {
_name = s._name;
_location = s._location;
_element = s._element;
_resourceType = s._resourceType;
return (*this); }
};
class Binding {

View file

@ -218,7 +218,7 @@ void Model::initProgram(gpu::ShaderPointer& program, Model::Locations& locations
#if (GPU_FEATURE_PROFILE == GPU_CORE)
locations.materialBufferUnit = program->getBuffers().findLocation("materialBuffer");
#else
locations.materialBuffer = program->getUniforms().findLocation("materialBuffer");
locations.materialBufferUnit = program->getUniforms().findLocation("materialBuffer");
#endif
}