Quellcode durchsuchen

gpu: fix a 6-year old bug in vertex declaration unbinding.

legacy
Sam Hocevar vor 5 Jahren
Ursprung
Commit
361d1a0e80
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. +4
    -4
      src/gpu/vertexbuffer.cpp

+ 4
- 4
src/gpu/vertexbuffer.cpp Datei anzeigen

@@ -206,14 +206,14 @@ void VertexDeclaration::SetStream(VertexBuffer *vb, ShaderAttrib attribs[])
for (int i = 0; i < m_count; i++)
if (m_streams[i].index == m_streams[attr_index].index)
{
/* Remember the register used for this stream */
m_streams[i].reg = reg;

stride += m_streams[i].size;
if (i < attr_index)
offset += m_streams[i].size;
}

/* Remember the register used for this stream */
m_streams[attr_index].reg = reg;

/* Finally, we need to retrieve the type of the data */
#if !defined GL_DOUBLE
# define GL_DOUBLE 0
@@ -247,7 +247,7 @@ void VertexDeclaration::SetStream(VertexBuffer *vb, ShaderAttrib attribs[])
type_index = 0;


if (reg != 0xffffffff)
if (reg != 0xffffffffu)
{
if (tlut[type_index].type == GL_FLOAT
|| tlut[type_index].type == GL_DOUBLE


Laden…
Abbrechen
Speichern