diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-01-16 16:43:25 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-22 22:16:07 +0100 |
commit | e8fc050b6eebddaadf10563c3764ee455687559d (patch) | |
tree | d55490546e66f56ac85fcc7ce64842d8c93b9def /src/video/opengl.h | |
parent | 320072c8dc03d651f8278a41fc09346c8ed5a174 (diff) | |
download | openttd-e8fc050b6eebddaadf10563c3764ee455687559d.tar.xz |
Add: [OpenGL] Support for 8bpp blitters.
Diffstat (limited to 'src/video/opengl.h')
-rw-r--r-- | src/video/opengl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video/opengl.h b/src/video/opengl.h index 4a392c280..59f61db1d 100644 --- a/src/video/opengl.h +++ b/src/video/opengl.h @@ -14,6 +14,7 @@ #include "../core/alloc_type.hpp" #include "../core/geometry_type.hpp" +#include "../gfx_type.h" typedef void (*OGLProc)(); typedef OGLProc (*GetOGLProcAddressProc)(const char *proc); @@ -28,9 +29,11 @@ private: 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 the video buffer. + GLuint vid_program; ///< Shader program for rendering a RGBA video buffer. + GLuint pal_program; ///< Shader program for rendering a paletted video buffer. GLuint vao_quad; ///< Vertex array object storing the rendering state for the fullscreen quad. GLuint vbo_quad; ///< Vertex buffer with a fullscreen quad. + GLuint pal_texture; ///< Palette lookup texture. OpenGLBackend(); ~OpenGLBackend(); @@ -47,6 +50,7 @@ public: static const char *Create(GetOGLProcAddressProc get_proc); static void Destroy(); + void UpdatePalette(const Colour *pal, uint first, uint length); bool Resize(int w, int h, bool force = false); void Paint(); |