diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-01-16 16:43:43 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-22 22:16:07 +0100 |
commit | ae7c63cc35362932500f42f4a11ae2160566b718 (patch) | |
tree | c4044e67350f295e58161cdb25a0d56ae0dfefcc /src/video/opengl.h | |
parent | 200be7d20cf736db309c70f7eae35268d812f706 (diff) | |
download | openttd-ae7c63cc35362932500f42f4a11ae2160566b718.tar.xz |
Codechange: [OpenGL] Use persistently mapped pixel buffers when supported.
Diffstat (limited to 'src/video/opengl.h')
-rw-r--r-- | src/video/opengl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video/opengl.h b/src/video/opengl.h index a0fd2d2f3..d910ca3bf 100644 --- a/src/video/opengl.h +++ b/src/video/opengl.h @@ -31,6 +31,11 @@ class OpenGLBackend : public ZeroedMemoryAllocator, SpriteEncoder { private: static OpenGLBackend *instance; ///< Singleton instance pointer. + bool persistent_mapping_supported; ///< Persistent pixel buffer mapping supported. + GLsync sync_vid_mapping; ///< Sync object for the persistently mapped video buffer. + GLsync sync_anim_mapping; ///< Sync object for the persistently mapped animation buffer. + + void *vid_buffer; ///< Pointer to the mapped video buffer. GLuint vid_pbo; ///< Pixel buffer object storing the memory used for the video driver to draw to. GLuint vid_texture; ///< Texture handle for the video buffer texture. GLuint vid_program; ///< Shader program for rendering a RGBA video buffer. @@ -39,6 +44,7 @@ private: GLuint vbo_quad; ///< Vertex buffer with a fullscreen quad. GLuint pal_texture; ///< Palette lookup texture. + void *anim_buffer; ///< Pointer to the mapped animation buffer. GLuint anim_pbo; ///< Pixel buffer object storing the memory used for the animation buffer. GLuint anim_texture; ///< Texture handle for the animation buffer texture. |