Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Scene2D/Internals/OpenGLTextProgram.cpp @ 1970:33d2ff1aeaae
start ultrasound series at their first frame
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 28 Oct 2022 13:36:40 +0200 |
parents | 7053b8a0aaec |
children | 8bb8d9c0cfd0 07964689cb0b |
rev | line source |
---|---|
592 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
592 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
592 | 10 * as published by the Free Software Foundation, either version 3 of |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
16 * Lesser General Public License for more details. |
1596
4fb8fdf03314
removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
17 * |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
19 * License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
592 | 21 **/ |
22 | |
23 | |
24 #include "OpenGLTextProgram.h" | |
611
e3f21a265be5
Added version directive to GLSL shader code + glew init function in sample code
Benjamin Golinvaux <bgo@osimis.io>
parents:
592
diff
changeset
|
25 #include "OpenGLShaderVersionDirective.h" |
592 | 26 |
27 #include "../../Fonts/OpenGLTextCoordinates.h" | |
28 | |
1624 | 29 #include <Logging.h> |
1455
30deba7bc8e2
simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1270
diff
changeset
|
30 #include <OrthancException.h> |
592 | 31 |
32 | |
33 static const unsigned int COMPONENTS = 2; | |
34 | |
35 static const char* VERTEX_SHADER = | |
611
e3f21a265be5
Added version directive to GLSL shader code + glew init function in sample code
Benjamin Golinvaux <bgo@osimis.io>
parents:
592
diff
changeset
|
36 ORTHANC_STONE_OPENGL_SHADER_VERSION_DIRECTIVE |
592 | 37 "attribute vec2 a_texcoord; \n" |
38 "attribute vec4 a_position; \n" | |
39 "uniform mat4 u_matrix; \n" | |
40 "varying vec2 v_texcoord; \n" | |
41 "void main() \n" | |
42 "{ \n" | |
43 " gl_Position = u_matrix * a_position; \n" | |
44 " v_texcoord = a_texcoord; \n" | |
45 "}"; | |
46 | |
47 static const char* FRAGMENT_SHADER = | |
611
e3f21a265be5
Added version directive to GLSL shader code + glew init function in sample code
Benjamin Golinvaux <bgo@osimis.io>
parents:
592
diff
changeset
|
48 ORTHANC_STONE_OPENGL_SHADER_VERSION_DIRECTIVE |
592 | 49 "uniform sampler2D u_texture; \n" |
50 "uniform vec3 u_color; \n" | |
51 "varying vec2 v_texcoord; \n" | |
52 "void main() \n" | |
53 "{ \n" | |
54 " vec4 v = texture2D(u_texture, v_texcoord); \n" | |
55 " gl_FragColor = vec4(u_color * v.w, v.w); \n" // Premultiplied alpha | |
56 "}"; | |
57 | |
58 | |
59 namespace OrthancStone | |
60 { | |
61 namespace Internals | |
62 { | |
63 OpenGLTextProgram::OpenGLTextProgram(OpenGL::IOpenGLContext& context) : | |
64 context_(context) | |
65 { | |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
66 if (!context_.IsContextLost()) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
67 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
68 context_.MakeCurrent(); |
592 | 69 |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
70 program_.reset(new OpenGL::OpenGLProgram(context_)); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
71 program_->CompileShaders(VERTEX_SHADER, FRAGMENT_SHADER); |
592 | 72 |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
73 positionLocation_ = program_->GetAttributeLocation("a_position"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
74 textureLocation_ = program_->GetAttributeLocation("a_texcoord"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
75 } |
592 | 76 } |
77 | |
78 | |
79 OpenGLTextProgram::Data::Data(OpenGL::IOpenGLContext& context, | |
80 const GlyphTextureAlphabet& alphabet, | |
81 const TextSceneLayer& layer) : | |
82 context_(context), | |
804
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
699
diff
changeset
|
83 red_(layer.GetColor().GetRedAsFloat()), |
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
699
diff
changeset
|
84 green_(layer.GetColor().GetGreenAsFloat()), |
61ba4b504e9a
PolylineSceneLayer now has one color per chain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
699
diff
changeset
|
85 blue_(layer.GetColor().GetBlueAsFloat()), |
592 | 86 x_(layer.GetX()), |
87 y_(layer.GetY()), | |
88 border_(layer.GetBorder()), | |
89 anchor_(layer.GetAnchor()) | |
90 { | |
91 OpenGL::OpenGLTextCoordinates coordinates(alphabet, layer.GetText()); | |
92 textWidth_ = coordinates.GetTextWidth(); | |
93 textHeight_ = coordinates.GetTextHeight(); | |
94 | |
95 if (coordinates.IsEmpty()) | |
96 { | |
97 coordinatesCount_ = 0; | |
98 } | |
99 else | |
100 { | |
101 coordinatesCount_ = coordinates.GetRenderingCoords().size(); | |
102 | |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
103 if (!context_.IsContextLost()) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
104 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
105 context_.MakeCurrent(); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
106 glGenBuffers(2, buffers_); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
107 ORTHANC_OPENGL_CHECK("glGenBuffers"); |
592 | 108 |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
109 glBindBuffer(GL_ARRAY_BUFFER, buffers_[0]); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
110 ORTHANC_OPENGL_CHECK("glBindBuffer"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
111 glBufferData(GL_ARRAY_BUFFER, sizeof(float) * coordinatesCount_, |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
112 &coordinates.GetRenderingCoords()[0], GL_STATIC_DRAW); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
113 ORTHANC_OPENGL_CHECK("glBufferData"); |
592 | 114 |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
115 glBindBuffer(GL_ARRAY_BUFFER, buffers_[1]); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
116 ORTHANC_OPENGL_CHECK("glBindBuffer"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
117 glBufferData(GL_ARRAY_BUFFER, sizeof(float) * coordinatesCount_, |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
118 &coordinates.GetTextureCoords()[0], GL_STATIC_DRAW); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
119 ORTHANC_OPENGL_CHECK("glBufferData"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
120 } |
592 | 121 } |
122 } | |
123 | |
124 | |
125 OpenGLTextProgram::Data::~Data() | |
126 { | |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
127 if (!context_.IsContextLost() && !IsEmpty()) |
592 | 128 { |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
129 try |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
130 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
131 context_.MakeCurrent(); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
132 ORTHANC_OPENGL_TRACE_CURRENT_CONTEXT("About to call glDeleteBuffers"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
133 glDeleteBuffers(2, buffers_); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
134 ORTHANC_OPENGL_CHECK("glDeleteBuffers"); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
135 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
136 catch (const Orthanc::OrthancException& e) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
137 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
138 if (e.HasDetails()) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
139 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
140 LOG(ERROR) << "OrthancException in ~Data: " << e.What() << " Details: " << e.GetDetails(); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
141 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
142 else |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
143 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
144 LOG(ERROR) << "OrthancException in ~Data: " << e.What(); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
145 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
146 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
147 catch (const std::exception& e) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
148 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
149 LOG(ERROR) << "std::exception in ~Data: " << e.what(); |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
150 } |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
151 catch (...) |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
152 { |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
153 LOG(ERROR) << "Unknown exception in ~Data"; |
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
154 } |
592 | 155 } |
156 } | |
157 | |
158 | |
159 GLuint OpenGLTextProgram::Data::GetSceneLocationsBuffer() const | |
160 { | |
161 if (IsEmpty()) | |
162 { | |
956
a7351ad54960
Made IsContextLost automatically set the flag by checking with the emscripten
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
163 LOG(ERROR) << "OpenGLTextProgram::Data::GetSceneLocationsBuffer(): (IsEmpty())"; |
592 | 164 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
165 } | |
166 else | |
167 { | |
168 return buffers_[0]; | |
169 } | |
170 } | |
171 | |
172 GLuint OpenGLTextProgram::Data::GetTextureLocationsBuffer() const | |
173 { | |
174 if (IsEmpty()) | |
175 { | |
956
a7351ad54960
Made IsContextLost automatically set the flag by checking with the emscripten
Benjamin Golinvaux <bgo@osimis.io>
parents:
947
diff
changeset
|
176 LOG(ERROR) << "OpenGLTextProgram::Data::GetTextureLocationsBuffer(): (IsEmpty())"; |
592 | 177 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
178 } | |
179 else | |
180 { | |
181 return buffers_[1]; | |
182 } | |
183 } | |
184 | |
185 void OpenGLTextProgram::Apply(OpenGL::OpenGLTexture& fontTexture, | |
186 const Data& data, | |
1576
92fca2b3ba3d
sanitizing the handling of canvas size
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
187 const AffineTransform2D& transform, |
92fca2b3ba3d
sanitizing the handling of canvas size
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
188 unsigned int canvasWidth, |
92fca2b3ba3d
sanitizing the handling of canvas size
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
189 unsigned int canvasHeight) |
592 | 190 { |
947
1091b2adeb5a
Fixed animation frame stopping when returning false + big work on the OpenGL
Benjamin Golinvaux <bgo@osimis.io>
parents:
804
diff
changeset
|
191 if (!context_.IsContextLost() && !data.IsEmpty()) |
592 | 192 { |
193 context_.MakeCurrent(); | |
194 program_->Use(); | |
195 | |
196 double dx, dy; // In pixels | |
197 ComputeAnchorTranslation(dx, dy, data.GetAnchor(), | |
693
9a474e90e832
Fixed a bunch of truncation warnings in various parts of the library
Benjamin Golinvaux <bgo@osimis.io>
parents:
611
diff
changeset
|
198 data.GetTextWidth(), data.GetTextHeight(), |
9a474e90e832
Fixed a bunch of truncation warnings in various parts of the library
Benjamin Golinvaux <bgo@osimis.io>
parents:
611
diff
changeset
|
199 static_cast<unsigned int>(data.GetBorder())); |
592 | 200 |
201 double x = data.GetX(); | |
202 double y = data.GetY(); | |
203 transform.Apply(x, y); | |
204 | |
205 const AffineTransform2D t = AffineTransform2D::CreateOffset(x + dx, y + dy); | |
206 | |
207 float m[16]; | |
1576
92fca2b3ba3d
sanitizing the handling of canvas size
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
208 t.ConvertToOpenGLMatrix(m, canvasWidth, canvasHeight); |
592 | 209 |
210 fontTexture.Bind(program_->GetUniformLocation("u_texture")); | |
211 glUniformMatrix4fv(program_->GetUniformLocation("u_matrix"), 1, GL_FALSE, m); | |
212 glUniform3f(program_->GetUniformLocation("u_color"), | |
213 data.GetRed(), data.GetGreen(), data.GetBlue()); | |
214 | |
215 glBindBuffer(GL_ARRAY_BUFFER, data.GetSceneLocationsBuffer()); | |
216 glEnableVertexAttribArray(positionLocation_); | |
217 glVertexAttribPointer(positionLocation_, COMPONENTS, GL_FLOAT, GL_FALSE, 0, 0); | |
218 | |
219 glBindBuffer(GL_ARRAY_BUFFER, data.GetTextureLocationsBuffer()); | |
220 glEnableVertexAttribArray(textureLocation_); | |
221 glVertexAttribPointer(textureLocation_, COMPONENTS, GL_FLOAT, GL_FALSE, 0, 0); | |
222 | |
223 glEnable(GL_BLEND); | |
224 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | |
693
9a474e90e832
Fixed a bunch of truncation warnings in various parts of the library
Benjamin Golinvaux <bgo@osimis.io>
parents:
611
diff
changeset
|
225 glDrawArrays(GL_TRIANGLES, 0, |
9a474e90e832
Fixed a bunch of truncation warnings in various parts of the library
Benjamin Golinvaux <bgo@osimis.io>
parents:
611
diff
changeset
|
226 static_cast<GLsizei>(data.GetCoordinatesCount() / COMPONENTS)); |
592 | 227 glDisable(GL_BLEND); |
228 | |
229 glDisableVertexAttribArray(positionLocation_); | |
230 glDisableVertexAttribArray(textureLocation_); | |
231 } | |
232 } | |
233 } | |
234 } |