Home | History | Annotate | Download | only in glshared

Lines Matching full:m_ctx

928 	sglr::Context&				m_ctx;
949 , m_ctx (context)
967 m_ctx.genBuffers(1, &m_glBuffer);
968 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glGenBuffers()");
976 m_ctx.deleteBuffers(1, &m_glBuffer);
977 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDeleteBuffers()");
992 m_ctx.bindBuffer(targetToGL(target), m_glBuffer);
993 GLU_EXPECT_NO_ERROR(m_ctx
995 m_ctx.bufferData(targetToGL(target), size, ptr, usageToGL(usage));
996 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBufferData()");
1016 m_ctx.bindBuffer(targetToGL(target), m_glBuffer);
1017 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBindBuffer()");
1019 m_ctx.bufferSubData(targetToGL(target), offset, size, ptr);
1020 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBufferSubData()");
1055 case 1: m_ctx.vertexAttrib1f(loc, attr.x()); break;
1056 case 2: m_ctx.vertexAttrib2f(loc, attr.x(), attr.y()); break;
1057 case 3: m_ctx.vertexAttrib3f(loc, attr.x(), attr.y(), attr.z()); break;
1058 case 4: m_ctx.vertexAttrib4f(loc, attr.x(), attr.y(), attr.z(), attr.w()); break;
1066 m_ctx.vertexAttribI4i(loc, attr.x(), attr.y(), attr.z(), attr.w());
1072 m_ctx.vertexAttribI4ui(loc, attr.x(), attr.y(), attr.z(), attr.w());
1086 m_ctx.bindBuffer(targetToGL(m_target), m_glBuffer);
1087 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBindBuffer()");
1093 m_ctx.bindBuffer(targetToGL(m_target), 0);
1094 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glBindBuffer()");
1112 m_ctx.vertexAttribPointer(loc, size, inputTypeToGL(m_inputType), m_normalize, m_stride, basePtr + m_offset);
1113 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glVertexAttribPointer()");
1118 m_ctx.vertexAttribIPointer(loc, m_componentCount, inputTypeToGL(m_inputType), m_stride, basePtr + m_offset);
1119 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glVertexAttribIPointer()");
1129 m_ctx.vertexAttribPointer(loc, m_componentCount, inputTypeToGL(m_inputType), m_normalize, m_stride, basePtr + m_offset);
1130 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glVertexAttribPointer()");
1134 m_ctx.vertexAttribDivisor(loc, m_instanceDivisor);
1145 m_ctx.bindBuffer(targetToGL(target), m_glBuffer);
1866 sglr::Context& m_ctx;
1880 , m_ctx (drawContext)
1889 m_ctx.genVertexArrays(1, &m_vaoID);
1897 m_ctx.deleteProgram(m_programID);
1903 m_ctx.deleteVertexArrays(1, &m_vaoID);
1918 m_arrays.push_back(new AttributeArray(storage, m_ctx));
1931 m_ctx.deleteProgram(m_programID);
1936 m_programID = m_ctx.createProgram(m_program);
1944 m_ctx.viewport(0, 0, m_screen.getWidth(), m_screen.getHeight());
1945 m_ctx.clearColor(0.0, 0.0, 0.0, 1.0);
1946 m_ctx.clear(GL_COLOR_BUFFER_BIT);
1948 m_ctx.useProgram(m_programID);
1949 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glUseProgram()");
1951 m_ctx.uniform1f(m_ctx.getUniformLocation(m_programID, "u_coordScale"), coordScale);
1952 m_ctx.uniform1f(m_ctx.getUniformLocation(m_programID, "u_colorScale"), colorScale);
1955 m_ctx.bindVertexArray(m_vaoID);
1965 deUint32 loc = m_ctx.getAttribLocation(m_programID, attribName.str().c_str());
1969 m_ctx.enableVertexAttribArray(loc);
1970 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glEnableVertexAttribArray()");
1978 m_ctx.drawArrays(primitiveToGL(primitive), firstVertex, vertexCount);
1979 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawArrays()");
1983 m_ctx.drawArraysInstanced(primitiveToGL(primitive), firstVertex, vertexCount, instanceCount);
1984 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawArraysInstanced()");
1988 m_ctx.drawElements(primitiveToGL(primitive), vertexCount, indexTypeToGL(indexType), indexOffset);
1989 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawElements()");
1993 m_ctx.drawRangeElements(primitiveToGL(primitive), rangeStart, rangeEnd, vertexCount, indexTypeToGL(indexType), indexOffset);
1994 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawRangeElements()");
1998 m_ctx.drawElementsInstanced(primitiveToGL(primitive), vertexCount, indexTypeToGL(indexType), indexOffset, instanceCount);
1999 m_ctx.getError(), "glDrawElementsInstanced()");
2034 m_ctx.genBuffers(1, &indirectBuf);
2035 m_ctx.bindBuffer(GL_DRAW_INDIRECT_BUFFER, indirectBuf);
2036 m_ctx.bufferData(GL_DRAW_INDIRECT_BUFFER, sizeof(DrawCommand) + indirectOffset, buffer, GL_STATIC_DRAW);
2039 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "Setup draw indirect buffer");
2041 m_ctx.drawArraysIndirect(primitiveToGL(primitive), (const deInt8*)DE_NULL + indirectOffset);
2042 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawArraysIndirect()");
2044 m_ctx.deleteBuffers(1, &indirectBuf);
2085 m_ctx.genBuffers(1, &indirectBuf);
2086 m_ctx.bindBuffer(GL_DRAW_INDIRECT_BUFFER, indirectBuf);
2087 m_ctx.bufferData(GL_DRAW_INDIRECT_BUFFER, sizeof(DrawCommand) + indirectOffset, buffer, GL_STATIC_DRAW);
2090 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "Setup draw indirect buffer");
2092 m_ctx.drawElementsIndirect(primitiveToGL(primitive), indexTypeToGL(indexType), (const deInt8*)DE_NULL + indirectOffset);
2093 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawArraysIndirect()");
2095 m_ctx.deleteBuffers(1, &indirectBuf);
2099 m_ctx.drawElementsBaseVertex(primitiveToGL(primitive), vertexCount, indexTypeToGL(indexType), indexOffset, baseVertex);
2100 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawElementsBaseVertex()");
2104 m_ctx.drawElementsInstancedBaseVertex(primitiveToGL(primitive), vertexCount, indexTypeToGL(indexType), indexOffset, instanceCount, baseVertex);
2105 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawElementsInstancedBaseVertex()");
2109 m_ctx.drawRangeElementsBaseVertex(primitiveToGL(primitive), rangeStart, rangeEnd, vertexCount, indexTypeToGL(indexType), indexOffset, baseVertex);
2110 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDrawRangeElementsBaseVertex()");
2122 deUint32 loc = m_ctx.getAttribLocation(m_programID, attribName.str().c_str());
2124 m_ctx.disableVertexAttribArray(loc);
2125 GLU_EXPECT_NO_ERROR(m_ctx.getError(), "glDisableVertexAttribArray()");
2130 m_ctx.bindVertexArray(0);
2132 m_ctx.useProgram(0);
2133 m_ctx.readPixels(m_screen, 0, 0, m_screen.getWidth(), m_screen.getHeight());