- ImmRenderBuffer is not needed anymore.

This commit is contained in:
Christoph Oelckers 2016-08-06 14:29:21 +02:00
parent 6a66d0255d
commit 8f0629932d
2 changed files with 0 additions and 36 deletions

View file

@ -141,40 +141,6 @@ void FFlatVertexBuffer::BindVBO()
}
}
//==========================================================================
//
// immediate mode fallback for drivers without GL_ARB_buffer_storage
//
// No single core method is performant enough to handle this adequately
// so we have to resort to immediate mode instead...
//
//==========================================================================
void FFlatVertexBuffer::ImmRenderBuffer(unsigned int primtype, unsigned int offset, unsigned int count)
{
// this will only get called if we can't acquire a persistently mapped buffer.
#ifndef CORE_PROFILE
glBegin(primtype);
if (gl.glslversion > 0)
{
for (unsigned int i = 0; i < count; i++)
{
glVertexAttrib2fv(VATTR_TEXCOORD, &map[offset + i].u);
glVertexAttrib3fv(VATTR_VERTEX, &map[offset + i].x);
}
}
else // no shader means no vertex attributes, so use the old stuff instead.
{
for (unsigned int i = 0; i < count; i++)
{
glTexCoord2fv(&map[offset + i].u);
glVertex3fv(&map[offset + i].x);
}
}
glEnd();
#endif
}
//==========================================================================
//
// Initialize a single vertex

View file

@ -54,8 +54,6 @@ class FFlatVertexBuffer : public FVertexBuffer
static const unsigned int BUFFER_SIZE = 2000000;
static const unsigned int BUFFER_SIZE_TO_USE = 1999500;
void ImmRenderBuffer(unsigned int primtype, unsigned int offset, unsigned int count);
public:
TArray<FFlatVertex> vbo_shadowdata; // this is kept around for updating the actual (non-readable) buffer and as stand-in for pre GL 4.x