mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 13:53:14 +01:00
Cleanup.
This commit is contained in:
@@ -209,27 +209,27 @@ namespace bgfx
|
||||
|
||||
case AttribType::Int16:
|
||||
{
|
||||
uint16_t* packed = (uint16_t*)data;
|
||||
int16_t* packed = (int16_t*)data;
|
||||
if (_inputNormalized)
|
||||
{
|
||||
if (asInt)
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
default: *packed++ = uint16_t(*_input++ * 32767.0f);
|
||||
case 3: *packed++ = uint16_t(*_input++ * 32767.0f);
|
||||
case 2: *packed++ = uint16_t(*_input++ * 32767.0f);
|
||||
case 1: *packed++ = uint16_t(*_input++ * 32767.0f);
|
||||
default: *packed++ = int16_t(*_input++ * 32767.0f);
|
||||
case 3: *packed++ = int16_t(*_input++ * 32767.0f);
|
||||
case 2: *packed++ = int16_t(*_input++ * 32767.0f);
|
||||
case 1: *packed++ = int16_t(*_input++ * 32767.0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
default: *packed++ = uint16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
case 3: *packed++ = uint16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
case 2: *packed++ = uint16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
case 1: *packed++ = uint16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
default: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
case 3: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
case 2: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
case 1: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,10 +237,10 @@ namespace bgfx
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
default: *packed++ = uint16_t(*_input++);
|
||||
case 3: *packed++ = uint16_t(*_input++);
|
||||
case 2: *packed++ = uint16_t(*_input++);
|
||||
case 1: *packed++ = uint16_t(*_input++);
|
||||
default: *packed++ = int16_t(*_input++);
|
||||
case 3: *packed++ = int16_t(*_input++);
|
||||
case 2: *packed++ = int16_t(*_input++);
|
||||
case 1: *packed++ = int16_t(*_input++);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -313,7 +313,7 @@ namespace bgfx
|
||||
|
||||
case AttribType::Int16:
|
||||
{
|
||||
uint16_t* packed = (uint16_t*)data;
|
||||
int16_t* packed = (int16_t*)data;
|
||||
if (asInt)
|
||||
{
|
||||
switch (num)
|
||||
|
||||
Reference in New Issue
Block a user