mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 09:31:57 +02:00
Trying to fix the skinning issue
This commit is contained in:
parent
ac02746587
commit
48769928c5
4 changed files with 8 additions and 5 deletions
|
@ -201,7 +201,9 @@ void GLBackend::do_drawIndexed(Batch& batch, uint32 paramOffset) {
|
|||
uint32 numIndices = batch._params[paramOffset + 1]._uint;
|
||||
uint32 startIndex = batch._params[paramOffset + 0]._uint;
|
||||
|
||||
glDrawElements(mode, numIndices, GL_UNSIGNED_INT, (GLvoid*)(startIndex + _indexBufferOffset));
|
||||
GLenum glType = _elementTypeToGLType[_indexBufferType];
|
||||
|
||||
glDrawElements(mode, numIndices, glType, (GLvoid*)(startIndex + _indexBufferOffset));
|
||||
CHECK_GL_ERROR();
|
||||
}
|
||||
|
||||
|
@ -408,7 +410,7 @@ void GLBackend::updateInput() {
|
|||
|
||||
|
||||
void GLBackend::do_setIndexBuffer(Batch& batch, uint32 paramOffset) {
|
||||
GLenum type = _elementTypeToGLType[ batch._params[paramOffset + 2]._uint ];
|
||||
_indexBufferType = (Element::Type) batch._params[paramOffset + 2]._uint;
|
||||
BufferPtr indexBuffer = batch._buffers.get(batch._params[paramOffset + 1]._uint);
|
||||
_indexBufferOffset = batch._params[paramOffset + 0]._uint;
|
||||
_indexBuffer = indexBuffer;
|
||||
|
|
|
@ -63,6 +63,7 @@ protected:
|
|||
|
||||
BufferPtr _indexBuffer;
|
||||
Offset _indexBufferOffset;
|
||||
Element::Type _indexBufferType;
|
||||
|
||||
typedef std::bitset<MAX_NUM_ATTRIBUTES> InputActivationCache;
|
||||
InputActivationCache _inputAttributeActivation;
|
||||
|
|
|
@ -27,11 +27,11 @@ public:
|
|||
enum Slot {
|
||||
SLOT_POSITION = 0,
|
||||
SLOT_NORMAL,
|
||||
SLOT_TEXCOORD,
|
||||
SLOT_COLOR,
|
||||
SLOT_TEXCOORD,
|
||||
SLOT_TANGENT,
|
||||
SLOT_SKIN_CLUSTER_WEIGHT,
|
||||
SLOT_SKIN_CLUSTER_INDEX,
|
||||
SLOT_SKIN_CLUSTER_WEIGHT,
|
||||
|
||||
NUM_SLOTS,
|
||||
};
|
||||
|
|
|
@ -1939,7 +1939,7 @@ int Model::renderMeshes(gpu::Batch& batch, RenderMode mode, bool translucent, fl
|
|||
*/
|
||||
// _blendedVertexBuffers[i].bind();
|
||||
// GLBATCH(glBindBuffer)(GL_ARRAY_BUFFER, _blendedVertexBuffers[i].bufferId());
|
||||
GLBATCH(glBindBuffer)(GL_ARRAY_BUFFER, gpu::GLBackend::getBufferID(*_blendedVertexBuffers2[i]));
|
||||
// GLBATCH(glBindBuffer)(GL_ARRAY_BUFFER, gpu::GLBackend::getBufferID(*_blendedVertexBuffers2[i]));
|
||||
batch.setInputBuffer(0, _blendedVertexBuffers2[i], 0, 0);
|
||||
batch.setInputBuffer(1, _blendedVertexBuffers2[i], vertexCount * sizeof(glm::vec3), 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue