- some cleanup on the OpenGL interface and its flags.
Most importantly, the separate command line options for switching on the legacy buffer handling have been removed. There's really no need for them anymore, because unlike in earlier versions many of the implementation differences no longer exist - with the exception of where the light and vertex buffer contents are generated. For testing this, -glversion 3 is sufficient.
This commit is contained in:
parent
9253118bdc
commit
5f838d52b9
19 changed files with 39 additions and 62 deletions
|
|
@ -99,9 +99,10 @@ void FSimpleVertexBuffer::set(FSimpleVertex *verts, int count)
|
|||
FFlatVertexBuffer::FFlatVertexBuffer(int width, int height)
|
||||
: FVertexBuffer(true), FFlatVertexGenerator(width, height)
|
||||
{
|
||||
mPersistent = screen->BuffersArePersistent();
|
||||
ibo_id = 0;
|
||||
glGenBuffers(1, &ibo_id);
|
||||
if (gl.buffermethod == BM_PERSISTENT)
|
||||
if (mPersistent)
|
||||
{
|
||||
unsigned int bytesize = BUFFER_SIZE * sizeof(FFlatVertex);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
|
||||
|
|
@ -165,7 +166,7 @@ void FFlatVertexBuffer::BindVBO()
|
|||
|
||||
void FFlatVertexBuffer::Map()
|
||||
{
|
||||
if (gl.buffermethod == BM_DEFERRED)
|
||||
if (!mPersistent)
|
||||
{
|
||||
unsigned int bytesize = BUFFER_SIZE * sizeof(FFlatVertex);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
|
||||
|
|
@ -176,7 +177,7 @@ void FFlatVertexBuffer::Map()
|
|||
|
||||
void FFlatVertexBuffer::Unmap()
|
||||
{
|
||||
if (gl.buffermethod == BM_DEFERRED)
|
||||
if (!mPersistent)
|
||||
{
|
||||
unsigned int bytesize = BUFFER_SIZE * sizeof(FFlatVertex);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue