Add support for ushort2 vertex format.

Also fix some vertex format computations.
This commit is contained in:
Stephen White
2018-02-28 20:42:36 -05:00
committed by Corentin Wallez
parent ceec97978e
commit 0b1fbd9322
5 changed files with 13 additions and 1 deletions

View File

@@ -49,6 +49,8 @@ namespace backend { namespace opengl {
case nxt::VertexFormat::FloatR32G32:
case nxt::VertexFormat::FloatR32:
return GL_FLOAT;
case nxt::VertexFormat::UshortR16G16:
return GL_UNSIGNED_SHORT;
case nxt::VertexFormat::UnormR8G8B8A8:
case nxt::VertexFormat::UnormR8G8:
return GL_UNSIGNED_BYTE;
@@ -63,6 +65,7 @@ namespace backend { namespace opengl {
case nxt::VertexFormat::FloatR32G32B32:
case nxt::VertexFormat::FloatR32G32:
case nxt::VertexFormat::FloatR32:
case nxt::VertexFormat::UshortR16G16:
return GL_FALSE;
case nxt::VertexFormat::UnormR8G8B8A8:
case nxt::VertexFormat::UnormR8G8: