MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / drawImageArray

Method drawImageArray

src/components/ImageComponent.cpp:187–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void ImageComponent::drawImageArray(GLfloat* points, GLfloat* texs, GLubyte* colors, unsigned int numArrays)
188{
189 mTexture->bind();
190
191 glEnable(GL_TEXTURE_2D);
192 glEnable(GL_BLEND);
193 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
194
195 glEnableClientState(GL_VERTEX_ARRAY);
196 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
197
198 if(colors != NULL)
199 {
200 glEnableClientState(GL_COLOR_ARRAY);
201 glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
202 }
203
204 glVertexPointer(2, GL_FLOAT, 0, points);
205 glTexCoordPointer(2, GL_FLOAT, 0, texs);
206
207 glDrawArrays(GL_TRIANGLES, 0, numArrays);
208
209 glDisableClientState(GL_VERTEX_ARRAY);
210 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
211
212 if(colors != NULL)
213 glDisableClientState(GL_COLOR_ARRAY);
214
215 glDisable(GL_TEXTURE_2D);
216 glDisable(GL_BLEND);
217}
218
219bool ImageComponent::hasImage()
220{

Callers

nothing calls this directly

Calls 1

bindMethod · 0.80

Tested by

no test coverage detected