OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // DO NOT EDIT! | 7 // DO NOT EDIT! |
8 | 8 |
9 #include "ppapi/shared_impl/ppb_opengles2_shared.h" | 9 #include "ppapi/shared_impl/ppb_opengles2_shared.h" |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 GetGLES( | 736 GetGLES( |
737 context_id)->VertexAttribPointer( | 737 context_id)->VertexAttribPointer( |
738 indx, size, type, normalized, stride, ptr); | 738 indx, size, type, normalized, stride, ptr); |
739 } | 739 } |
740 | 740 |
741 void Viewport( | 741 void Viewport( |
742 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { | 742 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) { |
743 GetGLES(context_id)->Viewport(x, y, width, height); | 743 GetGLES(context_id)->Viewport(x, y, width, height); |
744 } | 744 } |
745 | 745 |
| 746 void BlitFramebufferEXT( |
| 747 PP_Resource context_id, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, |
| 748 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, |
| 749 GLenum filter) { |
| 750 GetGLES( |
| 751 context_id)->BlitFramebufferEXT( |
| 752 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, |
| 753 filter); |
| 754 } |
746 | 755 |
747 const struct PPB_OpenGLES2 ppb_opengles2 = { | 756 void RenderbufferStorageMultisampleEXT( |
| 757 PP_Resource context_id, GLenum target, GLsizei samples, |
| 758 GLenum internalformat, GLsizei width, GLsizei height) { |
| 759 GetGLES( |
| 760 context_id)->RenderbufferStorageMultisampleEXT( |
| 761 target, samples, internalformat, width, height); |
| 762 } |
| 763 |
| 764 GLboolean EnableFeatureCHROMIUM(PP_Resource context_id, const char* feature) { |
| 765 return GetGLES(context_id)->EnableFeatureCHROMIUM(feature); |
| 766 } |
| 767 |
| 768 void* MapBufferSubDataCHROMIUM( |
| 769 PP_Resource context_id, GLuint target, GLintptr offset, GLsizeiptr size, |
| 770 GLenum access) { |
| 771 return GetGLES( |
| 772 context_id)->MapBufferSubDataCHROMIUM(target, offset, size, access); |
| 773 } |
| 774 |
| 775 void UnmapBufferSubDataCHROMIUM(PP_Resource context_id, const void* mem) { |
| 776 GetGLES(context_id)->UnmapBufferSubDataCHROMIUM(mem); |
| 777 } |
| 778 |
| 779 void* MapTexSubImage2DCHROMIUM( |
| 780 PP_Resource context_id, GLenum target, GLint level, GLint xoffset, |
| 781 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, |
| 782 GLenum access) { |
| 783 return GetGLES( |
| 784 context_id)->MapTexSubImage2DCHROMIUM( |
| 785 target, level, xoffset, yoffset, width, height, format, type, |
| 786 access); |
| 787 } |
| 788 |
| 789 void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) { |
| 790 GetGLES(context_id)->UnmapTexSubImage2DCHROMIUM(mem); |
| 791 } |
| 792 |
| 793 void DrawArraysInstancedANGLE( |
| 794 PP_Resource context_id, GLenum mode, GLint first, GLsizei count, |
| 795 GLsizei primcount) { |
| 796 GetGLES(context_id)->DrawArraysInstancedANGLE(mode, first, count, primcount); |
| 797 } |
| 798 |
| 799 void DrawElementsInstancedANGLE( |
| 800 PP_Resource context_id, GLenum mode, GLsizei count, GLenum type, |
| 801 const void* indices, GLsizei primcount) { |
| 802 GetGLES( |
| 803 context_id)->DrawElementsInstancedANGLE( |
| 804 mode, count, type, indices, primcount); |
| 805 } |
| 806 |
| 807 void VertexAttribDivisorANGLE( |
| 808 PP_Resource context_id, GLuint index, GLuint divisor) { |
| 809 GetGLES(context_id)->VertexAttribDivisorANGLE(index, divisor); |
| 810 } |
| 811 |
| 812 |
| 813 const struct PPB_OpenGLES2 ppb_opengles2_ = { |
748 &ActiveTexture, | 814 &ActiveTexture, |
749 &AttachShader, | 815 &AttachShader, |
750 &BindAttribLocation, | 816 &BindAttribLocation, |
751 &BindBuffer, | 817 &BindBuffer, |
752 &BindFramebuffer, | 818 &BindFramebuffer, |
753 &BindRenderbuffer, | 819 &BindRenderbuffer, |
754 &BindTexture, | 820 &BindTexture, |
755 &BlendColor, | 821 &BlendColor, |
756 &BlendEquation, | 822 &BlendEquation, |
757 &BlendEquationSeparate, | 823 &BlendEquationSeparate, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 &VertexAttrib2f, | 948 &VertexAttrib2f, |
883 &VertexAttrib2fv, | 949 &VertexAttrib2fv, |
884 &VertexAttrib3f, | 950 &VertexAttrib3f, |
885 &VertexAttrib3fv, | 951 &VertexAttrib3fv, |
886 &VertexAttrib4f, | 952 &VertexAttrib4f, |
887 &VertexAttrib4fv, | 953 &VertexAttrib4fv, |
888 &VertexAttribPointer, | 954 &VertexAttribPointer, |
889 &Viewport | 955 &Viewport |
890 }; | 956 }; |
891 | 957 |
| 958 |
| 959 const struct PPB_OpenGLES2InstancedArrays ppb_opengles2_instancedarrays = { |
| 960 &DrawArraysInstancedANGLE, |
| 961 &DrawElementsInstancedANGLE, |
| 962 &VertexAttribDivisorANGLE |
| 963 }; |
| 964 |
| 965 |
| 966 const struct PPB_OpenGLES2FramebufferBlit ppb_opengles2_framebufferblit = { |
| 967 &BlitFramebufferEXT |
| 968 }; |
| 969 |
| 970 |
| 971 const struct PPB_OpenGLES2FramebufferMultisample |
| 972 ppb_opengles2_framebuffermultisample = { |
| 973 &RenderbufferStorageMultisampleEXT |
| 974 }; |
| 975 |
| 976 |
| 977 const struct PPB_OpenGLES2ChromiumEnableFeature |
| 978 ppb_opengles2_chromiumenablefeature = { |
| 979 &EnableFeatureCHROMIUM |
| 980 }; |
| 981 |
| 982 |
| 983 const struct PPB_OpenGLES2ChromiumMapSub ppb_opengles2_chromiummapsub = { |
| 984 &MapBufferSubDataCHROMIUM, |
| 985 &UnmapBufferSubDataCHROMIUM, |
| 986 &MapTexSubImage2DCHROMIUM, |
| 987 &UnmapTexSubImage2DCHROMIUM |
| 988 }; |
| 989 |
892 } // namespace | 990 } // namespace |
893 | 991 |
894 const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() { | 992 const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() { |
895 return &ppb_opengles2; | 993 return &ppb_opengles2_; |
| 994 } |
| 995 |
| 996 |
| 997 const PPB_OpenGLES2InstancedArrays* |
| 998 PPB_OpenGLES2_Shared::GetInstancedArraysInterface() { |
| 999 return &ppb_opengles2_instancedarrays; |
| 1000 } |
| 1001 |
| 1002 |
| 1003 const PPB_OpenGLES2FramebufferBlit* |
| 1004 PPB_OpenGLES2_Shared::GetFramebufferBlitInterface() { |
| 1005 return &ppb_opengles2_framebufferblit; |
| 1006 } |
| 1007 |
| 1008 |
| 1009 const PPB_OpenGLES2FramebufferMultisample* |
| 1010 PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface() { |
| 1011 return &ppb_opengles2_framebuffermultisample; |
| 1012 } |
| 1013 |
| 1014 |
| 1015 const PPB_OpenGLES2ChromiumEnableFeature* |
| 1016 PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface() { |
| 1017 return &ppb_opengles2_chromiumenablefeature; |
| 1018 } |
| 1019 |
| 1020 |
| 1021 const PPB_OpenGLES2ChromiumMapSub* |
| 1022 PPB_OpenGLES2_Shared::GetChromiumMapSubInterface() { |
| 1023 return &ppb_opengles2_chromiummapsub; |
896 } | 1024 } |
897 | 1025 |
898 } // namespace ppapi | 1026 } // namespace ppapi |
OLD | NEW |