Browse Source

ref: gl: alias: fix strict aliasing by converting it to use float_bits_t union

pull/2/head
Alibek Omarov 2 years ago
parent
commit
ef0b227967
  1. 4
      ref/gl/gl_alias.c

4
ref/gl/gl_alias.c

@ -292,8 +292,8 @@ void BuildTris( void )
t = (t + 0.5f) / m_pAliasHeader->skinheight; t = (t + 0.5f) / m_pAliasHeader->skinheight;
// Carmack use floats and Valve use shorts here... // Carmack use floats and Valve use shorts here...
*(float *)&g_commands[g_numcommands++] = s; g_commands[g_numcommands++] = FloatAsInt( s );
*(float *)&g_commands[g_numcommands++] = t; g_commands[g_numcommands++] = FloatAsInt( t );
} }
} }

Loading…
Cancel
Save