瀏覽代碼

gpu: do not convert u8vec4 to integers when set as array buffers, since we

want to normalise them to floats.
legacy
Sam Hocevar sam 12 年之前
父節點
當前提交
27d22a9778
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. +4
    -1
      src/gpu/vertexbuffer.cpp

+ 4
- 1
src/gpu/vertexbuffer.cpp 查看文件

@@ -360,7 +360,10 @@ void VertexDeclaration::SetStream(VertexBuffer *vb, ShaderAttrib attr1,


# if !defined __CELLOS_LV2__
if (type_index <= 12)
if (tlut[type_index].type == GL_FLOAT
|| tlut[type_index].type == GL_DOUBLE
|| tlut[type_index].type == GL_BYTE
|| tlut[type_index].type == GL_UNSIGNED_BYTE)
{
/* Normalize unsigned bytes by default, because it's usually
* some color information. */


Loading…
取消
儲存