Lines Matching refs:c

46 static void validate_arrays(ogles_context_t* c, GLenum mode);
105 void ogles_init_array(ogles_context_t* c) in ogles_init_array() argument
107 c->arrays.vertex.size = 4; in ogles_init_array()
108 c->arrays.vertex.type = GL_FLOAT; in ogles_init_array()
109 c->arrays.color.size = 4; in ogles_init_array()
110 c->arrays.color.type = GL_FLOAT; in ogles_init_array()
111 c->arrays.normal.size = 4; in ogles_init_array()
112 c->arrays.normal.type = GL_FLOAT; in ogles_init_array()
114 c->arrays.texture[i].size = 4; in ogles_init_array()
115 c->arrays.texture[i].type = GL_FLOAT; in ogles_init_array()
117 c->vc.init(); in ogles_init_array()
119 if (!c->vc.vBuffer) { in ogles_init_array()
121 ogles_error(c, GL_OUT_OF_MEMORY); in ogles_init_array()
125 void ogles_uninit_array(ogles_context_t* c) in ogles_uninit_array() argument
127 c->vc.uninit(); in ogles_uninit_array()
136 static void currentColor(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentColor() argument
137 memcpy(v, c->current.color.v, sizeof(vec4_t)); in currentColor()
139 static void currentNormal(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentNormal() argument
140 memcpy(v, c->currentNormal.v, sizeof(vec3_t)); in currentNormal()
142 static void currentTexCoord(ogles_context_t* c, GLfixed* v, const GLvoid*) { in currentTexCoord() argument
143 memcpy(v, c->current.texture[c->arrays.tmu].v, sizeof(vec4_t)); in currentTexCoord()
432 void enableDisableClientState(ogles_context_t* c, GLenum array, bool enable) in enableDisableClientState() argument
434 const int tmu = c->arrays.activeTexture; in enableDisableClientState()
437 case GL_COLOR_ARRAY: a = &c->arrays.color; break; in enableDisableClientState()
438 case GL_NORMAL_ARRAY: a = &c->arrays.normal; break; in enableDisableClientState()
439 case GL_TEXTURE_COORD_ARRAY: a = &c->arrays.texture[tmu]; break; in enableDisableClientState()
440 case GL_VERTEX_ARRAY: a = &c->arrays.vertex; break; in enableDisableClientState()
442 ogles_error(c, GL_INVALID_ENUM); in enableDisableClientState()
455 vertex_t* cache_vertex(ogles_context_t* c, vertex_t* v, uint32_t index) in cache_vertex() argument
458 c->vc.misses++; in cache_vertex()
469 v = c->vc.vBuffer + 2; in cache_vertex()
473 c->arrays.compileElement(c, v, index); in cache_vertex()
479 vertex_t* fetch_vertex(ogles_context_t* c, size_t index) in fetch_vertex() argument
481 index |= c->vc.sequence; in fetch_vertex()
485 vertex_t* const v = c->vc.vCache + in fetch_vertex()
492 return cache_vertex(c, v, index); in fetch_vertex()
496 vertex_t* v = c->vc.vCache + in fetch_vertex()
514 return cache_vertex(c, &v[lru], index); in fetch_vertex()
519 vertex_t* v = c->vc.vBuffer + 2; in fetch_vertex()
520 return cache_vertex(c, v, index); in fetch_vertex()
531 void drawPrimitivesPoints(ogles_context_t* c, GLint first, GLsizei count) in drawPrimitivesPoints() argument
541 vertex_t* v = c->vc.vBuffer; in drawPrimitivesPoints()
543 c->arrays.cull = vertex_t::CLIP_ALL; in drawPrimitivesPoints()
544 c->arrays.compileElements(c, v, first, num); in drawPrimitivesPoints()
547 if (!c->arrays.cull) { in drawPrimitivesPoints()
552 c->prims.renderPoint(c, v); in drawPrimitivesPoints()
562 void drawPrimitivesLineStrip(ogles_context_t* c, GLint first, GLsizei count) in drawPrimitivesLineStrip() argument
568 c->arrays.cull = vertex_t::CLIP_ALL; in drawPrimitivesLineStrip()
569 c->arrays.compileElement(c, c->vc.vBuffer, first); in drawPrimitivesLineStrip()
578 v0 = c->vc.vBuffer + 0; in drawPrimitivesLineStrip()
579 v = c->vc.vBuffer + 1; in drawPrimitivesLineStrip()
581 c->arrays.compileElements(c, v, first, num); in drawPrimitivesLineStrip()
584 if (!c->arrays.cull) { in drawPrimitivesLineStrip()
590 c->prims.renderLine(c, v0, v1); in drawPrimitivesLineStrip()
596 c->vc.vBuffer[0] = *v0; in drawPrimitivesLineStrip()
597 c->arrays.cull = v0->flags & vertex_t::CLIP_ALL; in drawPrimitivesLineStrip()
601 void drawPrimitivesLineLoop(ogles_context_t* c, GLint first, GLsizei count) in drawPrimitivesLineLoop() argument
605 drawPrimitivesLineStrip(c, first, count); in drawPrimitivesLineLoop()
607 vertex_t* v0 = c->vc.vBuffer; in drawPrimitivesLineLoop()
608 vertex_t* v1 = c->vc.vBuffer + 1; in drawPrimitivesLineLoop()
609 c->arrays.compileElement(c, v1, first); in drawPrimitivesLineLoop()
612 c->prims.renderLine(c, v0, v1); in drawPrimitivesLineLoop()
616 void drawPrimitivesLines(ogles_context_t* c, GLint first, GLsizei count) in drawPrimitivesLines() argument
626 vertex_t* v = c->vc.vBuffer; in drawPrimitivesLines()
628 c->arrays.cull = vertex_t::CLIP_ALL; in drawPrimitivesLines()
629 c->arrays.compileElements(c, v, first, num); in drawPrimitivesLines()
632 if (!c->arrays.cull) { in drawPrimitivesLines()
638 c->prims.renderLine(c, v, v+1); in drawPrimitivesLines()
648 static void drawPrimitivesTriangleFanOrStrip(ogles_context_t* c, in drawPrimitivesTriangleFanOrStrip() argument
658 c->arrays.cull = vertex_t::CLIP_ALL; in drawPrimitivesTriangleFanOrStrip()
659 c->arrays.compileElements(c, c->vc.vBuffer, first, 2); in drawPrimitivesTriangleFanOrStrip()
671 v0 = c->vc.vBuffer + 0; in drawPrimitivesTriangleFanOrStrip()
672 v1 = c->vc.vBuffer + 1; in drawPrimitivesTriangleFanOrStrip()
673 v = c->vc.vBuffer + 2; in drawPrimitivesTriangleFanOrStrip()
675 c->arrays.compileElements(c, v, first, num); in drawPrimitivesTriangleFanOrStrip()
678 if (!c->arrays.cull) { in drawPrimitivesTriangleFanOrStrip()
684 c->prims.renderTriangle(c, v0, v1, v2); in drawPrimitivesTriangleFanOrStrip()
690 v0 = c->vc.vBuffer + 2 + vcs - 2; in drawPrimitivesTriangleFanOrStrip()
691 v1 = c->vc.vBuffer + 2 + vcs - 1; in drawPrimitivesTriangleFanOrStrip()
694 c->vc.vBuffer[0] = *v0; in drawPrimitivesTriangleFanOrStrip()
696 c->vc.vBuffer[1] = *v1; in drawPrimitivesTriangleFanOrStrip()
697 c->arrays.cull = v0->flags & v1->flags & vertex_t::CLIP_ALL; in drawPrimitivesTriangleFanOrStrip()
702 void drawPrimitivesTriangleStrip(ogles_context_t* c, in drawPrimitivesTriangleStrip() argument
704 drawPrimitivesTriangleFanOrStrip(c, first, count, 1); in drawPrimitivesTriangleStrip()
707 void drawPrimitivesTriangleFan(ogles_context_t* c, in drawPrimitivesTriangleFan() argument
709 drawPrimitivesTriangleFanOrStrip(c, first, count, 2); in drawPrimitivesTriangleFan()
712 void drawPrimitivesTriangles(ogles_context_t* c, GLint first, GLsizei count) in drawPrimitivesTriangles() argument
722 vertex_t* v = c->vc.vBuffer; in drawPrimitivesTriangles()
724 c->arrays.cull = vertex_t::CLIP_ALL; in drawPrimitivesTriangles()
725 c->arrays.compileElements(c, v, first, num); in drawPrimitivesTriangles()
728 if (!c->arrays.cull) { in drawPrimitivesTriangles()
734 c->prims.renderTriangle(c, v, v+1, v+2); in drawPrimitivesTriangles()
762 void drawIndexedPrimitivesPoints(ogles_context_t* c, in drawIndexedPrimitivesPoints() argument
767 const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE); in drawIndexedPrimitivesPoints()
769 vertex_t * v = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesPoints()
771 c->prims.renderPoint(c, v); in drawIndexedPrimitivesPoints()
779 void drawIndexedPrimitivesLineStrip(ogles_context_t* c, in drawIndexedPrimitivesLineStrip() argument
785 vertex_t * const v = c->vc.vBuffer; in drawIndexedPrimitivesLineStrip()
789 const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE); in drawIndexedPrimitivesLineStrip()
790 c->arrays.compileElement(c, v0, read_index(type, indices)); in drawIndexedPrimitivesLineStrip()
793 v1 = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesLineStrip()
796 c->prims.renderLine(c, v0, v1); in drawIndexedPrimitivesLineStrip()
804 void drawIndexedPrimitivesLineLoop(ogles_context_t* c, in drawIndexedPrimitivesLineLoop() argument
808 drawIndexedPrimitivesLines(c, count, indices); in drawIndexedPrimitivesLineLoop()
812 vertex_t * const v = c->vc.vBuffer; in drawIndexedPrimitivesLineLoop()
816 const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE); in drawIndexedPrimitivesLineLoop()
817 c->arrays.compileElement(c, v0, read_index(type, indices)); in drawIndexedPrimitivesLineLoop()
820 v1 = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesLineLoop()
823 c->prims.renderLine(c, v0, v1); in drawIndexedPrimitivesLineLoop()
830 v1 = c->vc.vBuffer; in drawIndexedPrimitivesLineLoop()
833 c->prims.renderLine(c, v0, v1); in drawIndexedPrimitivesLineLoop()
836 void drawIndexedPrimitivesLines(ogles_context_t* c, in drawIndexedPrimitivesLines() argument
843 const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE); in drawIndexedPrimitivesLines()
845 vertex_t* const v0 = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesLines()
846 vertex_t* const v1 = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesLines()
849 c->prims.renderLine(c, v0, v1); in drawIndexedPrimitivesLines()
858 static void drawIndexedPrimitivesTriangleFanOrStrip(ogles_context_t* c, in drawIndexedPrimitivesTriangleFanOrStrip() argument
867 vertex_t * const v = c->vc.vBuffer; in drawIndexedPrimitivesTriangleFanOrStrip()
872 const int type = (c->arrays.indicesType == GL_UNSIGNED_BYTE); in drawIndexedPrimitivesTriangleFanOrStrip()
873 c->arrays.compileElement(c, v0, read_index(type, indices)); in drawIndexedPrimitivesTriangleFanOrStrip()
874 c->arrays.compileElement(c, v1, read_index(type, indices)); in drawIndexedPrimitivesTriangleFanOrStrip()
881 v2 = fetch_vertex(c, read_index(type, indices)); in drawIndexedPrimitivesTriangleFanOrStrip()
884 c->prims.renderTriangle(c, v0, v1, v2); in drawIndexedPrimitivesTriangleFanOrStrip()
894 void drawIndexedPrimitivesTriangleStrip(ogles_context_t* c, in drawIndexedPrimitivesTriangleStrip() argument
896 drawIndexedPrimitivesTriangleFanOrStrip(c, count, indices, 1); in drawIndexedPrimitivesTriangleStrip()
899 void drawIndexedPrimitivesTriangleFan(ogles_context_t* c, in drawIndexedPrimitivesTriangleFan() argument
901 drawIndexedPrimitivesTriangleFanOrStrip(c, count, indices, 2); in drawIndexedPrimitivesTriangleFan()
904 void drawIndexedPrimitivesTriangles(ogles_context_t* c, in drawIndexedPrimitivesTriangles() argument
911 if (ggl_likely(c->arrays.indicesType == GL_UNSIGNED_SHORT)) { in drawIndexedPrimitivesTriangles()
915 vertex_t* const v0 = fetch_vertex(c, *p++); in drawIndexedPrimitivesTriangles()
916 vertex_t* const v1 = fetch_vertex(c, *p++); in drawIndexedPrimitivesTriangles()
917 vertex_t* const v2 = fetch_vertex(c, *p++); in drawIndexedPrimitivesTriangles()
920 c->prims.renderTriangle(c, v0, v1, v2); in drawIndexedPrimitivesTriangles()
929 vertex_t* const v0 = fetch_vertex(c, *p++); in drawIndexedPrimitivesTriangles()
930 vertex_t* const v1 = fetch_vertex(c, *p++); in drawIndexedPrimitivesTriangles()
931 vertex_t* const v2 = fetch_vertex(c, *p++); in drawIndexedPrimitivesTriangles()
934 c->prims.renderTriangle(c, v0, v1, v2); in drawIndexedPrimitivesTriangles()
949 void compileElement__generic(ogles_context_t* c, in compileElement__generic() argument
955 const GLubyte* vp = c->arrays.vertex.element(first); in compileElement__generic()
958 c->arrays.vertex.fetch(c, v->obj.v, vp); in compileElement__generic()
959 c->arrays.mvp_transform(&c->transforms.mvp, &v->clip, &v->obj); in compileElement__generic()
960 c->arrays.perspective(c, v); in compileElement__generic()
963 void compileElements__generic(ogles_context_t* c, in compileElements__generic() argument
966 const GLubyte* vp = c->arrays.vertex.element( in compileElements__generic()
968 const size_t stride = c->arrays.vertex.stride; in compileElements__generic()
969 transform_t const* const mvp = &c->transforms.mvp; in compileElements__generic()
975 c->arrays.vertex.fetch(c, v->obj.v, vp); in compileElements__generic()
976 c->arrays.mvp_transform(mvp, &v->clip, &v->obj); in compileElements__generic()
977 c->arrays.perspective(c, v); in compileElements__generic()
1035 static void clipVertex(ogles_context_t* c, vertex_t* nv, in clipVertex() argument
1040 ogles_vertex_project(c, nv); in clipVertex()
1045 static void clipVertexC(ogles_context_t* c, vertex_t* nv, in clipVertexC() argument
1049 clipVertex(c, nv, t, s, p); in clipVertexC()
1052 static void clipVertexT(ogles_context_t* c, vertex_t* nv, in clipVertexT() argument
1056 if (c->rasterizer.state.texture[i].enable) in clipVertexT()
1059 clipVertex(c, nv, t, s, p); in clipVertexT()
1062 static void clipVertexAll(ogles_context_t* c, vertex_t* nv, in clipVertexAll() argument
1066 clipVertexT(c, nv, t, s, p); in clipVertexAll()
1069 static void clipEye(ogles_context_t* c, vertex_t* nv, in clipEye() argument
1073 c->arrays.clipVertex(c, nv, t, p, s); in clipEye()
1082 void validate_arrays(ogles_context_t* c, GLenum mode) in validate_arrays() argument
1084 uint32_t enables = c->rasterizer.state.enables; in validate_arrays()
1092 c->perspective && mode!=GL_POINTS && (enables & GGL_ENABLE_TMUS); in validate_arrays()
1093 c->rasterizer.procs.enableDisable(c, GGL_W_LERP, perspective); in validate_arrays()
1099 smooth = c->point.smooth; in validate_arrays()
1104 smooth = c->line.smooth; in validate_arrays()
1108 c->rasterizer.procs.enableDisable(c, GGL_AA, smooth); in validate_arrays()
1111 c->rasterizer.procs.shadeModel(c, in validate_arrays()
1112 (mode == GL_POINTS) ? GL_FLAT : c->lighting.shadeModel); in validate_arrays()
1118 if (c->lighting.enable) { // needs normal transforms and eye coords in validate_arrays()
1125 if (c->clipPlanes.enable || (enables & GGL_ENABLE_FOG)) { in validate_arrays()
1128 ogles_validate_transform(c, want); in validate_arrays()
1132 ogles_validate_texture(c); in validate_arrays()
1135 c->arrays.compileElement = compileElement__generic; in validate_arrays()
1136 c->arrays.compileElements = compileElements__generic; in validate_arrays()
1139 c->arrays.mvp_transform = in validate_arrays()
1140 c->transforms.mvp.pointv[c->arrays.vertex.size - 2]; in validate_arrays()
1142 c->arrays.mv_transform = in validate_arrays()
1143 c->transforms.modelview.transform.pointv[c->arrays.vertex.size - 2]; in validate_arrays()
1151 array_machine_t& am = c->arrays; in validate_arrays()
1172 if (c->lighting.enable) { in validate_arrays()
1186 if (c->rasterizer.state.texture[i].enable) { in validate_arrays()
1197 const int index = c->arrays.texture[i].size - 2; in validate_arrays()
1198 c->arrays.tex_transform[i] = in validate_arrays()
1199 c->transforms.texture[i].transform.pointv[index]; in validate_arrays()
1209 enables = c->rasterizer.state.enables; in validate_arrays()
1215 case 0: c->arrays.clipVertex = clipVertex; break; in validate_arrays()
1216 case 1: c->arrays.clipVertex = clipVertexC; break; in validate_arrays()
1217 case 2: c->arrays.clipVertex = clipVertexT; break; in validate_arrays()
1218 case 3: c->arrays.clipVertex = clipVertexAll; break; in validate_arrays()
1220 c->arrays.clipEye = clipEye; in validate_arrays()
1223 ogles_validate_primitives(c); in validate_arrays()
1240 ogles_context_t* c = ogles_context_t::get(); in glVertexPointer() local
1242 ogles_error(c, GL_INVALID_VALUE); in glVertexPointer()
1252 ogles_error(c, GL_INVALID_ENUM); in glVertexPointer()
1255 c->arrays.vertex.init(size, type, stride, pointer, c->arrays.array_buffer, 0); in glVertexPointer()
1261 ogles_context_t* c = ogles_context_t::get(); in glColorPointer() local
1263 ogles_error(c, GL_INVALID_VALUE); in glColorPointer()
1272 ogles_error(c, GL_INVALID_ENUM); in glColorPointer()
1275 c->arrays.color.init(size, type, stride, pointer, c->arrays.array_buffer, 0); in glColorPointer()
1281 ogles_context_t* c = ogles_context_t::get(); in glNormalPointer() local
1283 ogles_error(c, GL_INVALID_VALUE); in glNormalPointer()
1293 ogles_error(c, GL_INVALID_ENUM); in glNormalPointer()
1296 c->arrays.normal.init(3, type, stride, pointer, c->arrays.array_buffer, 0); in glNormalPointer()
1302 ogles_context_t* c = ogles_context_t::get(); in glTexCoordPointer() local
1304 ogles_error(c, GL_INVALID_VALUE); in glTexCoordPointer()
1314 ogles_error(c, GL_INVALID_ENUM); in glTexCoordPointer()
1317 const int tmu = c->arrays.activeTexture; in glTexCoordPointer()
1318 c->arrays.texture[tmu].init(size, type, stride, pointer, in glTexCoordPointer()
1319 c->arrays.array_buffer, 0); in glTexCoordPointer()
1324 ogles_context_t* c = ogles_context_t::get(); in glEnableClientState() local
1325 enableDisableClientState(c, array, true); in glEnableClientState()
1329 ogles_context_t* c = ogles_context_t::get(); in glDisableClientState() local
1330 enableDisableClientState(c, array, false); in glDisableClientState()
1335 ogles_context_t* c = ogles_context_t::get(); in glClientActiveTexture() local
1337 ogles_error(c, GL_INVALID_ENUM); in glClientActiveTexture()
1340 c->arrays.activeTexture = texture - GL_TEXTURE0; in glClientActiveTexture()
1345 ogles_context_t* c = ogles_context_t::get(); in glDrawArrays() local
1347 ogles_error(c, GL_INVALID_VALUE); in glDrawArrays()
1360 ogles_error(c, GL_INVALID_ENUM); in glDrawArrays()
1364 if (count == 0 || !c->arrays.vertex.enable) in glDrawArrays()
1366 if ((c->cull.enable) && (c->cull.cullFace == GL_FRONT_AND_BACK)) in glDrawArrays()
1370 validate_arrays(c, mode); in glDrawArrays()
1372 const uint32_t enables = c->rasterizer.state.enables; in glDrawArrays()
1374 ogles_lock_textures(c); in glDrawArrays()
1376 drawArraysPrims[mode](c, first, count); in glDrawArrays()
1379 ogles_unlock_textures(c); in glDrawArrays()
1382 c->vc.total = count; in glDrawArrays()
1383 c->vc.dump_stats(mode); in glDrawArrays()
1390 ogles_context_t* c = ogles_context_t::get(); in glDrawElements() local
1392 ogles_error(c, GL_INVALID_VALUE); in glDrawElements()
1405 ogles_error(c, GL_INVALID_ENUM); in glDrawElements()
1411 c->arrays.indicesType = type; in glDrawElements()
1414 ogles_error(c, GL_INVALID_ENUM); in glDrawElements()
1417 if (count == 0 || !c->arrays.vertex.enable) in glDrawElements()
1419 if ((c->cull.enable) && (c->cull.cullFace == GL_FRONT_AND_BACK)) in glDrawElements()
1423 c->vc.clear(); in glDrawElements()
1424 validate_arrays(c, mode); in glDrawElements()
1428 if (c->arrays.element_array_buffer) { in glDrawElements()
1429 indices = c->arrays.element_array_buffer->data + uintptr_t(indices); in glDrawElements()
1432 const uint32_t enables = c->rasterizer.state.enables; in glDrawElements()
1434 ogles_lock_textures(c); in glDrawElements()
1436 drawElementsPrims[mode](c, count, indices); in glDrawElements()
1439 ogles_unlock_textures(c); in glDrawElements()
1443 c->vc.total = count; in glDrawElements()
1444 c->vc.dump_stats(mode); in glDrawElements()
1454 ogles_context_t* c = ogles_context_t::get(); in glBindBuffer() local
1456 ogles_error(c, GL_INVALID_ENUM); in glBindBuffer()
1462 bo = c->bufferObjectManager->bind(buffer); in glBindBuffer()
1464 ogles_error(c, GL_OUT_OF_MEMORY); in glBindBuffer()
1469 c->arrays.array_buffer : c->arrays.element_array_buffer) = bo; in glBindBuffer()
1474 ogles_context_t* c = ogles_context_t::get(); in glBufferData() local
1476 ogles_error(c, GL_INVALID_ENUM); in glBufferData()
1480 ogles_error(c, GL_INVALID_VALUE); in glBufferData()
1484 ogles_error(c, GL_INVALID_ENUM); in glBufferData()
1488 c->arrays.array_buffer : c->arrays.element_array_buffer); in glBufferData()
1492 ogles_error(c, GL_INVALID_OPERATION); in glBufferData()
1497 if (c->bufferObjectManager->allocateStore(edit_bo, size, usage) != 0) { in glBufferData()
1498 ogles_error(c, GL_OUT_OF_MEMORY); in glBufferData()
1508 ogles_context_t* c = ogles_context_t::get(); in glBufferSubData() local
1510 ogles_error(c, GL_INVALID_ENUM); in glBufferSubData()
1514 ogles_error(c, GL_INVALID_VALUE); in glBufferSubData()
1518 c->arrays.array_buffer : c->arrays.element_array_buffer); in glBufferSubData()
1522 ogles_error(c, GL_INVALID_OPERATION); in glBufferSubData()
1526 ogles_error(c, GL_INVALID_VALUE); in glBufferSubData()
1534 ogles_context_t* c = ogles_context_t::get(); in glDeleteBuffers() local
1536 ogles_error(c, GL_INVALID_VALUE); in glDeleteBuffers()
1544 if (c->arrays.element_array_buffer) { in glDeleteBuffers()
1545 if (c->arrays.element_array_buffer->name == name) { in glDeleteBuffers()
1546 c->arrays.element_array_buffer = 0; in glDeleteBuffers()
1549 if (c->arrays.array_buffer) { in glDeleteBuffers()
1550 if (c->arrays.array_buffer->name == name) { in glDeleteBuffers()
1551 c->arrays.array_buffer = 0; in glDeleteBuffers()
1554 if (c->arrays.vertex.bo) { in glDeleteBuffers()
1555 if (c->arrays.vertex.bo->name == name) { in glDeleteBuffers()
1556 c->arrays.vertex.bo = 0; in glDeleteBuffers()
1559 if (c->arrays.normal.bo) { in glDeleteBuffers()
1560 if (c->arrays.normal.bo->name == name) { in glDeleteBuffers()
1561 c->arrays.normal.bo = 0; in glDeleteBuffers()
1564 if (c->arrays.color.bo) { in glDeleteBuffers()
1565 if (c->arrays.color.bo->name == name) { in glDeleteBuffers()
1566 c->arrays.color.bo = 0; in glDeleteBuffers()
1570 if (c->arrays.texture[t].bo) { in glDeleteBuffers()
1571 if (c->arrays.texture[t].bo->name == name) { in glDeleteBuffers()
1572 c->arrays.texture[t].bo = 0; in glDeleteBuffers()
1578 c->bufferObjectManager->deleteBuffers(n, buffers); in glDeleteBuffers()
1579 c->bufferObjectManager->recycleTokens(n, buffers); in glDeleteBuffers()
1584 ogles_context_t* c = ogles_context_t::get(); in glGenBuffers() local
1586 ogles_error(c, GL_INVALID_VALUE); in glGenBuffers()
1589 c->bufferObjectManager->getToken(n, buffers); in glGenBuffers()