| Flutter Windows Embedder |

gl_proc_table.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_GL_PROC_TABLE_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_GL_PROC_TABLE_H_
7
8 #include <GLES2/gl2.h>
9 #include <GLES2/gl2ext.h>
10 #include <functional>
11 #include <memory>
12
13 #include "flutter/fml/macros.h"
14
15 namespace flutter {
16
17 // Lookup table for GLES functions.
18 class GlProcTable {
19 public:
20 static std::shared_ptr<GlProcTable> Create();
21
22 virtual ~GlProcTable();
23
24 virtual void GenTextures(GLsizei n, GLuint* textures) const;
25 virtual void DeleteTextures(GLsizei n, const GLuint* textures) const;
26 virtual void BindTexture(GLenum target, GLuint texture) const;
27 virtual void TexParameteri(GLenum target, GLenum pname, GLint param) const;
28 virtual void TexImage2D(GLenum target,
29 GLint level,
30 GLint internalformat,
31 GLsizei width,
32 GLsizei height,
33 GLint border,
34 GLenum format,
35 GLenum type,
36 const void* data) const;
37
38 protected:
39 GlProcTable();
40
41 private:
42 using GenTexturesProc = void(__stdcall*)(GLsizei n, GLuint* textures);
43 using DeleteTexturesProc = void(__stdcall*)(GLsizei n,
44 const GLuint* textures);
45 using BindTextureProc = void(__stdcall*)(GLenum target, GLuint texture);
46 using TexParameteriProc = void(__stdcall*)(GLenum target,
47 GLenum pname,
48 GLint param);
49 using TexImage2DProc = void(__stdcall*)(GLenum target,
50 GLint level,
51 GLint internalformat,
52 GLsizei width,
53 GLsizei height,
54 GLint border,
55 GLenum format,
56 GLenum type,
57 const void* data);
58
59 GenTexturesProc gen_textures_;
60 DeleteTexturesProc delete_textures_;
61 BindTextureProc bind_texture_;
62 TexParameteriProc tex_parameteri_;
63 TexImage2DProc tex_image_2d_;
64
65 FML_DISALLOW_COPY_AND_ASSIGN(GlProcTable);
66 };
67
68 } // namespace flutter
69
70 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_GL_PROC_TABLE_H_
flutter::GlProcTable::GenTextures
virtual void GenTextures(GLsizei n, GLuint *textures) const
Definition: gl_proc_table.cc:37
flutter::GlProcTable::DeleteTextures
virtual void DeleteTextures(GLsizei n, const GLuint *textures) const
Definition: gl_proc_table.cc:41
flutter::GlProcTable::GlProcTable
GlProcTable()
flutter::GlProcTable::TexParameteri
virtual void TexParameteri(GLenum target, GLenum pname, GLint param) const
Definition: gl_proc_table.cc:49
flutter::GlProcTable::~GlProcTable
virtual ~GlProcTable()
type
enum flutter::testing::@69::KeyboardChange::Type type
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::GlProcTable::Create
static std::shared_ptr< GlProcTable > Create()
Definition: gl_proc_table.cc:11
flutter::GlProcTable::BindTexture
virtual void BindTexture(GLenum target, GLuint texture) const
Definition: gl_proc_table.cc:45
flutter::GlProcTable::TexImage2D
virtual void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *data) const
Definition: gl_proc_table.cc:55
flutter::GlProcTable
Definition: gl_proc_table.h:18