Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp

Issue 216313006: Change if/else to if in two GrGLInterface factories (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gl/GrGLExtensions.h" 9 #include "gl/GrGLExtensions.h"
10 #include "gl/GrGLInterface.h" 10 #include "gl/GrGLInterface.h"
11 #include "../GrGLUtil.h" 11 #include "../GrGLUtil.h"
12 12
13 #define GL_GLEXT_PROTOTYPES 13 #define GL_GLEXT_PROTOTYPES
14 #include "osmesa_wrapper.h" 14 #include "osmesa_wrapper.h"
15 15
16 #define GR_GL_GET_PROC(F) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \ 16 #define GR_GL_GET_PROC(F) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
17 OSMesaGetProcAddress("gl" #F); 17 OSMesaGetProcAddress("gl" #F);
18 #define GR_GL_GET_PROC_SUFFIX(F, S) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \ 18 #define GR_GL_GET_PROC_SUFFIX(F, S) interface->fFunctions.f ## F = (GrGL ## F ## Proc) \
19 OSMesaGetProcAddress("gl" #F #S); 19 OSMesaGetProcAddress("gl" #F #S);
20 20
21 // We use OSMesaGetProcAddress for every gl function to avoid accidentally using 21 // We use OSMesaGetProcAddress for every gl function to avoid accidentally using
22 // non-Mesa gl functions. 22 // non-Mesa gl functions.
23 23
24 const GrGLInterface* GrGLCreateMesaInterface() { 24 const GrGLInterface* GrGLCreateMesaInterface() {
25 if (NULL != OSMesaGetCurrentContext()) { 25 if (NULL == OSMesaGetCurrentContext()) {
bsalomon 2014/03/28 21:32:55 Rietveld is making the diff appear complex. All I
26 26 return NULL;
27 GrGLGetStringProc getString = (GrGLGetStringProc) OSMesaGetProcAddress(" glGetString"); 27 }
28 GrGLGetStringiProc getStringi = (GrGLGetStringiProc) OSMesaGetProcAddres s("glGetStringi"); 28
29 GrGLGetIntegervProc getIntegerv = 29 GrGLGetStringProc getString = (GrGLGetStringProc) OSMesaGetProcAddress("glGe tString");
30 (GrGLGetIntegervProc) OSMesaGetProcAddress("glGetIntegerv"); 30 GrGLGetStringiProc getStringi = (GrGLGetStringiProc) OSMesaGetProcAddress("g lGetStringi");
31 31 GrGLGetIntegervProc getIntegerv =
32 GrGLExtensions extensions; 32 (GrGLGetIntegervProc) OSMesaGetProcAddress("glGetIntegerv");
33 if (!extensions.init(kGL_GrGLStandard, getString, getStringi, getInteger v)) { 33
34 return NULL; 34 GrGLExtensions extensions;
35 if (!extensions.init(kGL_GrGLStandard, getString, getStringi, getIntegerv)) {
36 return NULL;
37 }
38
39 const char* versionString = (const char*) getString(GL_VERSION);
40 GrGLVersion glVer = GrGLGetVersionFromString(versionString);
41
42 if (glVer < GR_GL_VER(1,5)) {
43 // We must have array and element_array buffer objects.
44 return NULL;
45 }
46 GrGLInterface* interface = SkNEW(GrGLInterface());
47
48 GR_GL_GET_PROC(ActiveTexture);
49 GR_GL_GET_PROC(BeginQuery);
50 GR_GL_GET_PROC(AttachShader);
51 GR_GL_GET_PROC(BindAttribLocation);
52 GR_GL_GET_PROC(BindBuffer);
53 GR_GL_GET_PROC(BindFragDataLocation);
54 GR_GL_GET_PROC(BindTexture);
55 GR_GL_GET_PROC(BlendFunc);
56
57 if (glVer >= GR_GL_VER(1,4) ||
58 extensions.has("GL_ARB_imaging") ||
59 extensions.has("GL_EXT_blend_color")) {
60 GR_GL_GET_PROC(BlendColor);
61 }
62
63 GR_GL_GET_PROC(BufferData);
64 GR_GL_GET_PROC(BufferSubData);
65 GR_GL_GET_PROC(Clear);
66 GR_GL_GET_PROC(ClearColor);
67 GR_GL_GET_PROC(ClearStencil);
68 GR_GL_GET_PROC(ColorMask);
69 GR_GL_GET_PROC(CompileShader);
70 GR_GL_GET_PROC(CompressedTexImage2D);
71 GR_GL_GET_PROC(CopyTexSubImage2D);
72 GR_GL_GET_PROC(CreateProgram);
73 GR_GL_GET_PROC(CreateShader);
74 GR_GL_GET_PROC(CullFace);
75 GR_GL_GET_PROC(DeleteBuffers);
76 GR_GL_GET_PROC(DeleteProgram);
77 GR_GL_GET_PROC(DeleteQueries);
78 GR_GL_GET_PROC(DeleteShader);
79 GR_GL_GET_PROC(DeleteTextures);
80 GR_GL_GET_PROC(DepthMask);
81 GR_GL_GET_PROC(Disable);
82 GR_GL_GET_PROC(DisableVertexAttribArray);
83 GR_GL_GET_PROC(DrawArrays);
84 GR_GL_GET_PROC(DrawBuffer);
85 GR_GL_GET_PROC(DrawBuffers);
86 GR_GL_GET_PROC(DrawElements);
87 GR_GL_GET_PROC(Enable);
88 GR_GL_GET_PROC(EnableVertexAttribArray);
89 GR_GL_GET_PROC(EndQuery);
90 GR_GL_GET_PROC(Finish);
91 GR_GL_GET_PROC(Flush);
92 GR_GL_GET_PROC(FrontFace);
93 GR_GL_GET_PROC(GenBuffers);
94 GR_GL_GET_PROC(GenerateMipmap);
95 GR_GL_GET_PROC(GenQueries);
96 GR_GL_GET_PROC(GetBufferParameteriv);
97 GR_GL_GET_PROC(GetError);
98 GR_GL_GET_PROC(GetIntegerv);
99 GR_GL_GET_PROC(GetProgramInfoLog);
100 GR_GL_GET_PROC(GetProgramiv);
101 if (glVer >= GR_GL_VER(3,3) || extensions.has("GL_ARB_timer_query")) {
102 GR_GL_GET_PROC(GetQueryObjecti64v);
103 GR_GL_GET_PROC(GetQueryObjectui64v)
104 GR_GL_GET_PROC(QueryCounter);
105 } else if (extensions.has("GL_EXT_timer_query")) {
106 GR_GL_GET_PROC_SUFFIX(GetQueryObjecti64v, EXT);
107 GR_GL_GET_PROC_SUFFIX(GetQueryObjectui64v, EXT);
108 }
109 GR_GL_GET_PROC(GetQueryObjectiv);
110 GR_GL_GET_PROC(GetQueryObjectuiv);
111 GR_GL_GET_PROC(GetQueryiv);
112 GR_GL_GET_PROC(GetShaderInfoLog);
113 GR_GL_GET_PROC(GetShaderiv);
114 GR_GL_GET_PROC(GetString);
115 GR_GL_GET_PROC(GetStringi);
116 GR_GL_GET_PROC(GetTexLevelParameteriv);
117 GR_GL_GET_PROC(GenTextures);
118 GR_GL_GET_PROC(GetUniformLocation);
119 GR_GL_GET_PROC(LineWidth);
120 GR_GL_GET_PROC(LinkProgram);
121 GR_GL_GET_PROC(LoadIdentity);
122 GR_GL_GET_PROC(LoadMatrixf);
123 GR_GL_GET_PROC(MatrixMode);
124 GR_GL_GET_PROC(MapBuffer);
125 GR_GL_GET_PROC(PixelStorei);
126 GR_GL_GET_PROC(ReadBuffer);
127 GR_GL_GET_PROC(ReadPixels);
128 GR_GL_GET_PROC(Scissor);
129 GR_GL_GET_PROC(ShaderSource);
130 GR_GL_GET_PROC(StencilFunc);
131 GR_GL_GET_PROC(StencilFuncSeparate);
132 GR_GL_GET_PROC(StencilMask);
133 GR_GL_GET_PROC(StencilMaskSeparate);
134 GR_GL_GET_PROC(StencilOp);
135 GR_GL_GET_PROC(StencilOpSeparate);
136 GR_GL_GET_PROC(TexGenfv);
137 GR_GL_GET_PROC(TexGeni);
138 GR_GL_GET_PROC(TexImage2D)
139 GR_GL_GET_PROC(TexParameteri);
140 GR_GL_GET_PROC(TexParameteriv);
141 GR_GL_GET_PROC(TexStorage2D);
142 if (NULL == interface->fFunctions.fTexStorage2D) {
143 GR_GL_GET_PROC_SUFFIX(TexStorage2D, EXT);
144 }
145 GR_GL_GET_PROC(TexSubImage2D);
146 GR_GL_GET_PROC(Uniform1f);
147 GR_GL_GET_PROC(Uniform1i);
148 GR_GL_GET_PROC(Uniform1fv);
149 GR_GL_GET_PROC(Uniform1iv);
150 GR_GL_GET_PROC(Uniform2f);
151 GR_GL_GET_PROC(Uniform2i);
152 GR_GL_GET_PROC(Uniform2fv);
153 GR_GL_GET_PROC(Uniform2iv);
154 GR_GL_GET_PROC(Uniform3f);
155 GR_GL_GET_PROC(Uniform3i);
156 GR_GL_GET_PROC(Uniform3fv);
157 GR_GL_GET_PROC(Uniform3iv);
158 GR_GL_GET_PROC(Uniform4f);
159 GR_GL_GET_PROC(Uniform4i);
160 GR_GL_GET_PROC(Uniform4fv);
161 GR_GL_GET_PROC(Uniform4iv);
162 GR_GL_GET_PROC(UniformMatrix2fv);
163 GR_GL_GET_PROC(UniformMatrix3fv);
164 GR_GL_GET_PROC(UniformMatrix4fv);
165 GR_GL_GET_PROC(UnmapBuffer);
166 GR_GL_GET_PROC(UseProgram);
167 GR_GL_GET_PROC(VertexAttrib4fv);
168 GR_GL_GET_PROC(VertexAttribPointer);
169 GR_GL_GET_PROC(Viewport);
170
171 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_object")) {
172 // no ARB suffix for GL_ARB_vertex_array_object
173 GR_GL_GET_PROC(BindVertexArray);
174 GR_GL_GET_PROC(DeleteVertexArrays);
175 GR_GL_GET_PROC(GenVertexArrays);
176 }
177
178 // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since
179 // GL_ARB_framebuffer_object doesn't use ARB suffix.)
180 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object")) {
181 GR_GL_GET_PROC(GenFramebuffers);
182 GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv);
183 GR_GL_GET_PROC(GetRenderbufferParameteriv);
184 GR_GL_GET_PROC(BindFramebuffer);
185 GR_GL_GET_PROC(FramebufferTexture2D);
186 GR_GL_GET_PROC(CheckFramebufferStatus);
187 GR_GL_GET_PROC(DeleteFramebuffers);
188 GR_GL_GET_PROC(RenderbufferStorage);
189 GR_GL_GET_PROC(GenRenderbuffers);
190 GR_GL_GET_PROC(DeleteRenderbuffers);
191 GR_GL_GET_PROC(FramebufferRenderbuffer);
192 GR_GL_GET_PROC(BindRenderbuffer);
193 GR_GL_GET_PROC(RenderbufferStorageMultisample);
194 GR_GL_GET_PROC(BlitFramebuffer);
195 } else if (extensions.has("GL_EXT_framebuffer_object")) {
196 GR_GL_GET_PROC_SUFFIX(GenFramebuffers, EXT);
197 GR_GL_GET_PROC_SUFFIX(GetFramebufferAttachmentParameteriv, EXT);
198 GR_GL_GET_PROC_SUFFIX(GetRenderbufferParameteriv, EXT);
199 GR_GL_GET_PROC_SUFFIX(BindFramebuffer, EXT);
200 GR_GL_GET_PROC_SUFFIX(FramebufferTexture2D, EXT);
201 GR_GL_GET_PROC_SUFFIX(CheckFramebufferStatus, EXT);
202 GR_GL_GET_PROC_SUFFIX(DeleteFramebuffers, EXT);
203 GR_GL_GET_PROC_SUFFIX(RenderbufferStorage, EXT);
204 GR_GL_GET_PROC_SUFFIX(GenRenderbuffers, EXT);
205 GR_GL_GET_PROC_SUFFIX(DeleteRenderbuffers, EXT);
206 GR_GL_GET_PROC_SUFFIX(FramebufferRenderbuffer, EXT);
207 GR_GL_GET_PROC_SUFFIX(BindRenderbuffer, EXT);
208 if (extensions.has("GL_EXT_framebuffer_multisample")) {
209 GR_GL_GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
35 } 210 }
36 211 if (extensions.has("GL_EXT_framebuffer_blit")) {
37 const char* versionString = (const char*) getString(GL_VERSION); 212 GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT);
38 GrGLVersion glVer = GrGLGetVersionFromString(versionString);
39
40 if (glVer < GR_GL_VER(1,5)) {
41 // We must have array and element_array buffer objects.
42 return NULL;
43 } 213 }
44 GrGLInterface* interface = SkNEW(GrGLInterface());
45
46 GR_GL_GET_PROC(ActiveTexture);
47 GR_GL_GET_PROC(BeginQuery);
48 GR_GL_GET_PROC(AttachShader);
49 GR_GL_GET_PROC(BindAttribLocation);
50 GR_GL_GET_PROC(BindBuffer);
51 GR_GL_GET_PROC(BindFragDataLocation);
52 GR_GL_GET_PROC(BindTexture);
53 GR_GL_GET_PROC(BlendFunc);
54
55 if (glVer >= GR_GL_VER(1,4) ||
56 extensions.has("GL_ARB_imaging") ||
57 extensions.has("GL_EXT_blend_color")) {
58 GR_GL_GET_PROC(BlendColor);
59 }
60
61 GR_GL_GET_PROC(BufferData);
62 GR_GL_GET_PROC(BufferSubData);
63 GR_GL_GET_PROC(Clear);
64 GR_GL_GET_PROC(ClearColor);
65 GR_GL_GET_PROC(ClearStencil);
66 GR_GL_GET_PROC(ColorMask);
67 GR_GL_GET_PROC(CompileShader);
68 GR_GL_GET_PROC(CompressedTexImage2D);
69 GR_GL_GET_PROC(CopyTexSubImage2D);
70 GR_GL_GET_PROC(CreateProgram);
71 GR_GL_GET_PROC(CreateShader);
72 GR_GL_GET_PROC(CullFace);
73 GR_GL_GET_PROC(DeleteBuffers);
74 GR_GL_GET_PROC(DeleteProgram);
75 GR_GL_GET_PROC(DeleteQueries);
76 GR_GL_GET_PROC(DeleteShader);
77 GR_GL_GET_PROC(DeleteTextures);
78 GR_GL_GET_PROC(DepthMask);
79 GR_GL_GET_PROC(Disable);
80 GR_GL_GET_PROC(DisableVertexAttribArray);
81 GR_GL_GET_PROC(DrawArrays);
82 GR_GL_GET_PROC(DrawBuffer);
83 GR_GL_GET_PROC(DrawBuffers);
84 GR_GL_GET_PROC(DrawElements);
85 GR_GL_GET_PROC(Enable);
86 GR_GL_GET_PROC(EnableVertexAttribArray);
87 GR_GL_GET_PROC(EndQuery);
88 GR_GL_GET_PROC(Finish);
89 GR_GL_GET_PROC(Flush);
90 GR_GL_GET_PROC(FrontFace);
91 GR_GL_GET_PROC(GenBuffers);
92 GR_GL_GET_PROC(GenerateMipmap);
93 GR_GL_GET_PROC(GenQueries);
94 GR_GL_GET_PROC(GetBufferParameteriv);
95 GR_GL_GET_PROC(GetError);
96 GR_GL_GET_PROC(GetIntegerv);
97 GR_GL_GET_PROC(GetProgramInfoLog);
98 GR_GL_GET_PROC(GetProgramiv);
99 if (glVer >= GR_GL_VER(3,3) || extensions.has("GL_ARB_timer_query")) {
100 GR_GL_GET_PROC(GetQueryObjecti64v);
101 GR_GL_GET_PROC(GetQueryObjectui64v)
102 GR_GL_GET_PROC(QueryCounter);
103 } else if (extensions.has("GL_EXT_timer_query")) {
104 GR_GL_GET_PROC_SUFFIX(GetQueryObjecti64v, EXT);
105 GR_GL_GET_PROC_SUFFIX(GetQueryObjectui64v, EXT);
106 }
107 GR_GL_GET_PROC(GetQueryObjectiv);
108 GR_GL_GET_PROC(GetQueryObjectuiv);
109 GR_GL_GET_PROC(GetQueryiv);
110 GR_GL_GET_PROC(GetShaderInfoLog);
111 GR_GL_GET_PROC(GetShaderiv);
112 GR_GL_GET_PROC(GetString);
113 GR_GL_GET_PROC(GetStringi);
114 GR_GL_GET_PROC(GetTexLevelParameteriv);
115 GR_GL_GET_PROC(GenTextures);
116 GR_GL_GET_PROC(GetUniformLocation);
117 GR_GL_GET_PROC(LineWidth);
118 GR_GL_GET_PROC(LinkProgram);
119 GR_GL_GET_PROC(LoadIdentity);
120 GR_GL_GET_PROC(LoadMatrixf);
121 GR_GL_GET_PROC(MatrixMode);
122 GR_GL_GET_PROC(MapBuffer);
123 GR_GL_GET_PROC(PixelStorei);
124 GR_GL_GET_PROC(ReadBuffer);
125 GR_GL_GET_PROC(ReadPixels);
126 GR_GL_GET_PROC(Scissor);
127 GR_GL_GET_PROC(ShaderSource);
128 GR_GL_GET_PROC(StencilFunc);
129 GR_GL_GET_PROC(StencilFuncSeparate);
130 GR_GL_GET_PROC(StencilMask);
131 GR_GL_GET_PROC(StencilMaskSeparate);
132 GR_GL_GET_PROC(StencilOp);
133 GR_GL_GET_PROC(StencilOpSeparate);
134 GR_GL_GET_PROC(TexGenfv);
135 GR_GL_GET_PROC(TexGeni);
136 GR_GL_GET_PROC(TexImage2D)
137 GR_GL_GET_PROC(TexParameteri);
138 GR_GL_GET_PROC(TexParameteriv);
139 GR_GL_GET_PROC(TexStorage2D);
140 if (NULL == interface->fFunctions.fTexStorage2D) {
141 GR_GL_GET_PROC_SUFFIX(TexStorage2D, EXT);
142 }
143 GR_GL_GET_PROC(TexSubImage2D);
144 GR_GL_GET_PROC(Uniform1f);
145 GR_GL_GET_PROC(Uniform1i);
146 GR_GL_GET_PROC(Uniform1fv);
147 GR_GL_GET_PROC(Uniform1iv);
148 GR_GL_GET_PROC(Uniform2f);
149 GR_GL_GET_PROC(Uniform2i);
150 GR_GL_GET_PROC(Uniform2fv);
151 GR_GL_GET_PROC(Uniform2iv);
152 GR_GL_GET_PROC(Uniform3f);
153 GR_GL_GET_PROC(Uniform3i);
154 GR_GL_GET_PROC(Uniform3fv);
155 GR_GL_GET_PROC(Uniform3iv);
156 GR_GL_GET_PROC(Uniform4f);
157 GR_GL_GET_PROC(Uniform4i);
158 GR_GL_GET_PROC(Uniform4fv);
159 GR_GL_GET_PROC(Uniform4iv);
160 GR_GL_GET_PROC(UniformMatrix2fv);
161 GR_GL_GET_PROC(UniformMatrix3fv);
162 GR_GL_GET_PROC(UniformMatrix4fv);
163 GR_GL_GET_PROC(UnmapBuffer);
164 GR_GL_GET_PROC(UseProgram);
165 GR_GL_GET_PROC(VertexAttrib4fv);
166 GR_GL_GET_PROC(VertexAttribPointer);
167 GR_GL_GET_PROC(Viewport);
168
169 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_objec t")) {
170 // no ARB suffix for GL_ARB_vertex_array_object
171 GR_GL_GET_PROC(BindVertexArray);
172 GR_GL_GET_PROC(DeleteVertexArrays);
173 GR_GL_GET_PROC(GenVertexArrays);
174 }
175
176 // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since
177 // GL_ARB_framebuffer_object doesn't use ARB suffix.)
178 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object ")) {
179 GR_GL_GET_PROC(GenFramebuffers);
180 GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv);
181 GR_GL_GET_PROC(GetRenderbufferParameteriv);
182 GR_GL_GET_PROC(BindFramebuffer);
183 GR_GL_GET_PROC(FramebufferTexture2D);
184 GR_GL_GET_PROC(CheckFramebufferStatus);
185 GR_GL_GET_PROC(DeleteFramebuffers);
186 GR_GL_GET_PROC(RenderbufferStorage);
187 GR_GL_GET_PROC(GenRenderbuffers);
188 GR_GL_GET_PROC(DeleteRenderbuffers);
189 GR_GL_GET_PROC(FramebufferRenderbuffer);
190 GR_GL_GET_PROC(BindRenderbuffer);
191 GR_GL_GET_PROC(RenderbufferStorageMultisample);
192 GR_GL_GET_PROC(BlitFramebuffer);
193 } else if (extensions.has("GL_EXT_framebuffer_object")) {
194 GR_GL_GET_PROC_SUFFIX(GenFramebuffers, EXT);
195 GR_GL_GET_PROC_SUFFIX(GetFramebufferAttachmentParameteriv, EXT);
196 GR_GL_GET_PROC_SUFFIX(GetRenderbufferParameteriv, EXT);
197 GR_GL_GET_PROC_SUFFIX(BindFramebuffer, EXT);
198 GR_GL_GET_PROC_SUFFIX(FramebufferTexture2D, EXT);
199 GR_GL_GET_PROC_SUFFIX(CheckFramebufferStatus, EXT);
200 GR_GL_GET_PROC_SUFFIX(DeleteFramebuffers, EXT);
201 GR_GL_GET_PROC_SUFFIX(RenderbufferStorage, EXT);
202 GR_GL_GET_PROC_SUFFIX(GenRenderbuffers, EXT);
203 GR_GL_GET_PROC_SUFFIX(DeleteRenderbuffers, EXT);
204 GR_GL_GET_PROC_SUFFIX(FramebufferRenderbuffer, EXT);
205 GR_GL_GET_PROC_SUFFIX(BindRenderbuffer, EXT);
206 if (extensions.has("GL_EXT_framebuffer_multisample")) {
207 GR_GL_GET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT);
208 }
209 if (extensions.has("GL_EXT_framebuffer_blit")) {
210 GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT);
211 }
212 } else {
213 // we must have FBOs
214 delete interface;
215 return NULL;
216 }
217 GR_GL_GET_PROC(BindFragDataLocationIndexed);
218
219 if (extensions.has("GL_EXT_debug_marker")) {
220 GR_GL_GET_PROC_SUFFIX(InsertEventMarker, EXT);
221 GR_GL_GET_PROC_SUFFIX(PopGroupMarker, EXT);
222 GR_GL_GET_PROC_SUFFIX(PushGroupMarker, EXT);
223 }
224
225 interface->fStandard = kGL_GrGLStandard;
226 interface->fExtensions.swap(&extensions);
227
228 return interface;
229 } else { 214 } else {
230 return NULL; 215 // we must have FBOs
231 } 216 delete interface;
217 return NULL;
218 }
219 GR_GL_GET_PROC(BindFragDataLocationIndexed);
220
221 if (extensions.has("GL_EXT_debug_marker")) {
222 GR_GL_GET_PROC_SUFFIX(InsertEventMarker, EXT);
223 GR_GL_GET_PROC_SUFFIX(PopGroupMarker, EXT);
224 GR_GL_GET_PROC_SUFFIX(PushGroupMarker, EXT);
225 }
226
227 interface->fStandard = kGL_GrGLStandard;
228 interface->fExtensions.swap(&extensions);
229
230 return interface;
232 } 231 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698