OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 |
| 10 namespace gpu { |
| 11 namespace gles2 { |
| 12 |
| 13 class GLES2Implementation; |
| 14 |
| 15 // Manages info about OpenGL ES Programs. |
| 16 class ProgramInfoManager { |
| 17 public: |
| 18 virtual ~ProgramInfoManager(); |
| 19 |
| 20 static ProgramInfoManager* Create(bool shared_resources); |
| 21 |
| 22 virtual void CreateInfo(GLuint program) = 0; |
| 23 |
| 24 virtual void DeleteInfo(GLuint program) = 0; |
| 25 |
| 26 virtual bool GetProgramiv( |
| 27 GLES2Implementation* gl, GLuint program, GLenum pname, GLint* params) = 0; |
| 28 |
| 29 virtual GLint GetAttribLocation( |
| 30 GLES2Implementation* gl, GLuint program, const char* name) = 0; |
| 31 |
| 32 virtual GLint GetUniformLocation( |
| 33 GLES2Implementation* gl, GLuint program, const char* name) = 0; |
| 34 |
| 35 virtual bool GetActiveAttrib( |
| 36 GLES2Implementation* gl, |
| 37 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, |
| 38 GLint* size, GLenum* type, char* name) = 0; |
| 39 |
| 40 virtual bool GetActiveUniform( |
| 41 GLES2Implementation* gl, |
| 42 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, |
| 43 GLint* size, GLenum* type, char* name) = 0; |
| 44 |
| 45 protected: |
| 46 ProgramInfoManager(); |
| 47 }; |
| 48 |
| 49 } // namespace gles2 |
| 50 } // namespace gpu |
| 51 |
| 52 #endif // GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_ |
OLD | NEW |