Home | History | Annotate | Download | only in opengl

Lines Matching refs:gl

220 static OutputIter namedBindingsToProgramLocations (const glw::Functions& gl, deUint32 program, InputIter first, InputIter end, OutputIter out)
228 int location = gl.getAttribLocation(program, binding.name.c_str());
323 void uploadBufferData (const glw::Functions& gl, deUint32 buffer, deUint32 usage, const VertexBufferLayout& layout, const VertexArrayPointer* srcArrays)
331 gl.bindBuffer(GL_ARRAY_BUFFER, buffer);
332 gl.bufferData(GL_ARRAY_BUFFER, (int)localBuf.size(), &localBuf[0], usage);
333 gl.bindBuffer(GL_ARRAY_BUFFER, 0);
334 GLU_EXPECT_NO_ERROR(gl.getError(), "Uploading buffer data failed");
342 const glw::Functions& gl = context.getFunctions();
360 uploadBufferData(gl, m_object, usage, layout, &srcPtrs[0]);
376 const glw::Functions& gl = context.getFunctions();
379 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_object);
380 gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, numIndices*getIndexSize(indexType), indices, usage);
381 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
382 GLU_EXPECT_NO_ERROR(gl.getError(), "Uploading index data failed");
403 static void setVertexAttribPointer (const glw::Functions& gl, const VertexAttributeDescriptor& va)
413 gl.enableVertexAttribArray(va.location);
416 gl.vertexAttribIPointer(va.location, va.numComponents, compTypeGL, va.stride, va.pointer);
418 gl.vertexAttribPointer(va.location, va.numComponents, compTypeGL, va.convert == VTX_COMP_CONVERT_NORMALIZE_TO_FLOAT ? GL_TRUE : GL_FALSE, va.stride, va.pointer);
422 static void setVertexBufferAttributes (const glw::Functions& gl, const VertexBufferDescriptor& buffer)
424 gl.bindBuffer(GL_ARRAY_BUFFER, buffer.buffer);
427 setVertexAttribPointer(gl, *vaIter);
429 gl.bindBuffer(GL_ARRAY_BUFFER, 0);
432 static void disableVertexArrays (const glw::Functions& gl, const std::vector<VertexArrayBinding>& bindings)
437 gl.disableVertexAttribArray(vaIter->binding.location);
479 static inline void drawNonIndexed (const glw::Functions& gl, PrimitiveType type, int numElements)
482 gl.drawArrays(mode, 0, numElements);
485 static inline void drawIndexed (const glw::Functions& gl, PrimitiveType type, int numElements, IndexType indexType, const void* indexPtr)
490 gl.drawElements(mode, numElements, indexGLType, indexPtr);
497 const glw::Functions& gl = context.getFunctions();
504 namedBindingsToProgramLocations(gl, program, vertexArrays, vertexArrays+numVertexArrays, std::inserter(bindingsWithLocations, bindingsWithLocations.begin()));
510 setVertexAttribPointer(gl, getUserPointerDescriptor(*vaIter));
516 drawIndexed(gl, primitives.type, primitives.numElements, primitives.indexType, primitives.indices);
518 drawNonIndexed(gl
524 disableVertexArrays(gl, bindingsWithLocations);
529 const glw::Functions& gl = context.getFunctions();
536 namedBindingsToProgramLocations(gl, program, vertexArrays, vertexArrays+numVertexArrays, std::inserter(bindingsWithLocations, bindingsWithLocations.begin()));
545 setVertexBufferAttributes(gl, vertexBuffer.getDescriptor());
551 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, *indexBuffer);
556 drawIndexed(gl, primitives.type, primitives.numElements, primitives.indexType, 0);
561 gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
568 drawNonIndexed(gl, primitives.type, primitives.numElements);
577 gl.disableVertexAttribArray(vaIter->binding.location);
582 const glw::Functions& gl = context.getFunctions();
585 gl.bindVertexArray(*vao);
587 gl.bindVertexArray(0);