removed ogl::Texture2D support from InputArray

This commit is contained in:
Vladislav Vinogradov
2013-04-15 11:29:21 +04:00
parent 173442bb2e
commit 2fae1d9507
7 changed files with 61 additions and 172 deletions

View File

@@ -126,25 +126,6 @@ GPU_TEST_P(Buffer, ConstructorFromBuffer)
EXPECT_EQ(buf_gold.type(), buf.type());
}
GPU_TEST_P(Buffer, ConstructorFromTexture2D)
{
const int depth = CV_MAT_DEPTH(type);
const int cn = CV_MAT_CN(type);
if (depth != CV_32F || cn == 2)
return;
cv::Mat gold = randomMat(size, type, 0, 1.0);
cv::ogl::Texture2D tex_gold(gold, true);
cv::ogl::Buffer buf(tex_gold, cv::ogl::Buffer::PIXEL_PACK_BUFFER, true);
cv::Mat bufData;
buf.copyTo(bufData);
EXPECT_MAT_NEAR(gold, bufData, 1e-2);
}
GPU_TEST_P(Buffer, Create)
{
cv::ogl::Buffer buf;
@@ -198,26 +179,6 @@ GPU_TEST_P(Buffer, CopyFromBuffer)
EXPECT_MAT_NEAR(gold, bufData, 0);
}
GPU_TEST_P(Buffer, CopyFromTexture2D)
{
const int depth = CV_MAT_DEPTH(type);
const int cn = CV_MAT_CN(type);
if (depth != CV_32F || cn == 2)
return;
cv::Mat gold = randomMat(size, type, 0, 1.0);
cv::ogl::Texture2D tex_gold(gold, true);
cv::ogl::Buffer buf;
buf.copyFrom(tex_gold, cv::ogl::Buffer::ARRAY_BUFFER, true);
cv::Mat bufData;
buf.copyTo(bufData);
EXPECT_MAT_NEAR(gold, bufData, 1e-2);
}
GPU_TEST_P(Buffer, CopyToGpuMat)
{
cv::Mat gold = randomMat(size, type);
@@ -247,27 +208,6 @@ GPU_TEST_P(Buffer, CopyToBuffer)
EXPECT_MAT_NEAR(gold, bufData, 0);
}
GPU_TEST_P(Buffer, CopyToTexture2D)
{
const int depth = CV_MAT_DEPTH(type);
const int cn = CV_MAT_CN(type);
if (depth != CV_32F || cn == 2)
return;
cv::Mat gold = randomMat(size, type, 0, 1.0);
cv::ogl::Buffer buf(gold, cv::ogl::Buffer::PIXEL_PACK_BUFFER, true);
cv::ogl::Texture2D tex;
buf.copyTo(tex, cv::ogl::Buffer::PIXEL_PACK_BUFFER, true);
cv::Mat texData;
tex.copyTo(texData);
EXPECT_MAT_NEAR(gold, texData, 1e-2);
}
GPU_TEST_P(Buffer, Clone)
{
cv::Mat gold = randomMat(size, type);