diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp index 70879ee586..35abfa8b3c 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp @@ -157,13 +157,13 @@ void LOADERDECL TexMtx_Write_Float2() VertexManager::s_pCurBufferPointer += 8; } -void LOADERDECL TexMtx_Write_Short4() +void LOADERDECL TexMtx_Write_Float4() { - ((s16*)VertexManager::s_pCurBufferPointer)[0] = 0; - ((s16*)VertexManager::s_pCurBufferPointer)[1] = 0; - ((s16*)VertexManager::s_pCurBufferPointer)[2] = s_curtexmtx[s_texmtxwrite++]; - ((s16*)VertexManager::s_pCurBufferPointer)[3] = 0; // Just to fill out with 0. - VertexManager::s_pCurBufferPointer += 8; + ((float*)VertexManager::s_pCurBufferPointer)[0] = 0; + ((float*)VertexManager::s_pCurBufferPointer)[1] = 0; + ((float*)VertexManager::s_pCurBufferPointer)[2] = s_curtexmtx[s_texmtxwrite++]; + ((float*)VertexManager::s_pCurBufferPointer)[3] = 0; // Just to fill out with 0. + VertexManager::s_pCurBufferPointer += 16; } VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr) @@ -498,10 +498,10 @@ void VertexLoader::CompileVertexTranslator() else { m_NativeFmt->m_components |= VB_HAS_UV0 << i; // have to include since using now vtx_decl.texcoord_offset[i] = nat_offset; - vtx_decl.texcoord_gl_type[i] = VAR_SHORT; + vtx_decl.texcoord_gl_type[i] = VAR_FLOAT; vtx_decl.texcoord_size[i] = 4; - nat_offset += 8; // still include the texture coordinate, but this time as 6 + 2 bytes - WriteCall(TexMtx_Write_Short4); + nat_offset += 16; // still include the texture coordinate, but this time as 6 + 2 bytes + WriteCall(TexMtx_Write_Float4); } } else { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp index 09f279fb69..41b15b40b0 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp @@ -92,7 +92,9 @@ GLVertexFormat::~GLVertexFormat() inline GLuint VarToGL(VarType t) { - static const GLuint lookup[5] = {GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_FLOAT}; + static const GLuint lookup[5] = { + GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_FLOAT + }; return lookup[t]; }