void clear (int x, int y, int width, int height, const tcu::Vec4& color)
{
	glEnable(GL_SCISSOR_TEST);
	glScissor(x, y, width, height);
	glClearColor(color.x(), color.y(), color.z(), color.w());
	glClear(GL_COLOR_BUFFER_BIT);
	glDisable(GL_SCISSOR_TEST);
}
예제 #2
0
bool ShaderBallotBaseTestCase::validateColor(tcu::Vec4 testedColor, tcu::Vec4 desiredColor)
{
	const float epsilon = 0.008f;
	return de::abs(testedColor.x() - desiredColor.x()) < epsilon &&
		   de::abs(testedColor.y() - desiredColor.y()) < epsilon &&
		   de::abs(testedColor.z() - desiredColor.z()) < epsilon &&
		   de::abs(testedColor.w() - desiredColor.w()) < epsilon;
}
bool ShaderAtomicCounterOpsTestBase::validateColor(tcu::Vec4 testedColor, tcu::Vec4 desiredColor)
{
	const float epsilon = 0.008f;
	return de::abs(testedColor.x() - desiredColor.x()) < epsilon &&
		   de::abs(testedColor.y() - desiredColor.y()) < epsilon &&
		   de::abs(testedColor.z() - desiredColor.z()) < epsilon;
}
예제 #4
0
void DepthShader::setColor (sglr::Context& ctx, deUint32 programID, const tcu::Vec4& color)
{
	ctx.useProgram(programID);
	ctx.uniform4fv(ctx.getUniformLocation(programID, "u_color"), 1, color.getPtr());
}