OpenGL: Apply vertex/index buffers just before draw.

Previously we would modify the GL state as soon as we saw
SetIndex/VertexBuffers. This GL state is owned by the VAOs in the
InputState and was disappearing on a Pipeline change. Fix this by
applying the index / vertex buffers lazily.
This commit is contained in:
Corentin Wallez
2017-11-20 15:47:08 -05:00
committed by Corentin Wallez
parent 6d9a3b82c6
commit 33f7bfe322
9 changed files with 224 additions and 106 deletions

View File

@@ -18,6 +18,7 @@
#include "backend/opengl/CommandBufferGL.h"
#include "backend/opengl/ComputePipelineGL.h"
#include "backend/opengl/DepthStencilStateGL.h"
#include "backend/opengl/InputStateGL.h"
#include "backend/opengl/PersistentPipelineStateGL.h"
#include "backend/opengl/PipelineLayoutGL.h"
#include "backend/opengl/RenderPipelineGL.h"