mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fix index buffer bindig for normal quads(fixes startup crashes) and
initialize non mipmap textures as linear(texture completness)
This commit is contained in:
parent
f15f41e654
commit
c22af4bb4d
|
@ -763,7 +763,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand
|
|||
|
||||
glGenBuffers(1, &m_QuadDrawIndexBufferID);
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_QuadDrawIndexBufferID);
|
||||
m_LastIndexBufferBound = m_QuadDrawIndexBufferID;
|
||||
m_LastIndexBufferBound = 0;
|
||||
|
||||
unsigned int Indices[CCommandBuffer::MAX_VERTICES/4 * 6];
|
||||
int Primq = 0;
|
||||
|
@ -927,6 +927,8 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Texture_Create(const CCommandBuffe
|
|||
|
||||
if(pCommand->m_Flags&CCommandBuffer::TEXFLAG_NOMIPMAPS)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glSamplerParameteri(m_aTextures[pCommand->m_Slot].m_Sampler, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glSamplerParameteri(m_aTextures[pCommand->m_Slot].m_Sampler, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, StoreOglformat, Width, Height, 0, Oglformat, GL_UNSIGNED_BYTE, pTexData);
|
||||
|
|
Loading…
Reference in a new issue