mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:10:40 +02:00
compilation on MacOSX
This commit is contained in:
parent
414315b6e0
commit
0f22d64802
3 changed files with 97 additions and 90 deletions
|
@ -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, ¤tProgram);
|
||||
glUseProgram(glprogram);
|
||||
#endif
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue