OLD | NEW |
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 | 9 |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
11 | 11 |
12 #import <OpenGLES/ES2/gl.h> | 12 #import <OpenGLES/ES2/gl.h> |
13 #import <OpenGLES/ES2/glext.h> | 13 #import <OpenGLES/ES2/glext.h> |
14 | 14 |
15 const GrGLInterface* GrGLCreateNativeInterface() { | 15 const GrGLInterface* GrGLCreateNativeInterface() { |
16 GrGLInterface* interface = SkNEW(GrGLInterface); | 16 GrGLInterface* interface = SkNEW(GrGLInterface); |
17 | 17 |
18 GrGLInterface::Functions* functions = &interface->functions; | 18 GrGLInterface::Functions* functions = &interface->fFunctions; |
19 | 19 |
20 functions->fActiveTexture = glActiveTexture; | 20 functions->fActiveTexture = glActiveTexture; |
21 functions->fAttachShader = glAttachShader; | 21 functions->fAttachShader = glAttachShader; |
22 functions->fBindAttribLocation = glBindAttribLocation; | 22 functions->fBindAttribLocation = glBindAttribLocation; |
23 functions->fBindBuffer = glBindBuffer; | 23 functions->fBindBuffer = glBindBuffer; |
24 functions->fBindTexture = glBindTexture; | 24 functions->fBindTexture = glBindTexture; |
25 functions->fBlendColor = glBlendColor; | 25 functions->fBlendColor = glBlendColor; |
26 functions->fBlendFunc = glBlendFunc; | 26 functions->fBlendFunc = glBlendFunc; |
27 functions->fBufferData = (GrGLBufferDataProc)glBufferData; | 27 functions->fBufferData = (GrGLBufferDataProc)glBufferData; |
28 functions->fBufferSubData = (GrGLBufferSubDataProc)glBufferSubData; | 28 functions->fBufferSubData = (GrGLBufferSubDataProc)glBufferSubData; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 functions->fBindVertexArray = glBindVertexArrayOES; | 142 functions->fBindVertexArray = glBindVertexArrayOES; |
143 functions->fDeleteVertexArrays = glDeleteVertexArraysOES; | 143 functions->fDeleteVertexArrays = glDeleteVertexArraysOES; |
144 functions->fGenVertexArrays = glGenVertexArraysOES; | 144 functions->fGenVertexArrays = glGenVertexArraysOES; |
145 #endif | 145 #endif |
146 | 146 |
147 interface->fStandard = kGLES_GrGLStandard; | 147 interface->fStandard = kGLES_GrGLStandard; |
148 interface->fExtensions.init(kGLES_GrGLStandard, glGetString, NULL, glGetInte
gerv); | 148 interface->fExtensions.init(kGLES_GrGLStandard, glGetString, NULL, glGetInte
gerv); |
149 | 149 |
150 return interface; | 150 return interface; |
151 } | 151 } |
OLD | NEW |