• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium 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 GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_
7 
8 #include <GLES2/gl2.h>
9 #include "gles2_impl_export.h"
10 
11 namespace gpu {
12 namespace gles2 {
13 
14 class GLES2Implementation;
15 
16 // Manages info about OpenGL ES Programs.
17 class GLES2_IMPL_EXPORT ProgramInfoManager {
18  public:
19   virtual ~ProgramInfoManager();
20 
21   static ProgramInfoManager* Create(bool shared_resources_across_processes);
22 
23   virtual void CreateInfo(GLuint program) = 0;
24 
25   virtual void DeleteInfo(GLuint program) = 0;
26 
27   virtual bool GetProgramiv(
28       GLES2Implementation* gl, GLuint program, GLenum pname, GLint* params) = 0;
29 
30   virtual GLint GetAttribLocation(
31       GLES2Implementation* gl, GLuint program, const char* name) = 0;
32 
33   virtual GLint GetUniformLocation(
34       GLES2Implementation* gl, GLuint program, const char* name) = 0;
35 
36   virtual bool GetActiveAttrib(
37       GLES2Implementation* gl,
38       GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
39       GLint* size, GLenum* type, char* name) = 0;
40 
41   virtual bool GetActiveUniform(
42       GLES2Implementation* gl,
43       GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
44       GLint* size, GLenum* type, char* name) = 0;
45 
46  protected:
47   ProgramInfoManager();
48 };
49 
50 }  // namespace gles2
51 }  // namespace gpu
52 
53 #endif  // GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_
54