diff --git a/include/boost/compute/interop/opengl/opengl_renderbuffer.hpp b/include/boost/compute/interop/opengl/opengl_renderbuffer.hpp index 1811b90d4..fd4759d0e 100644 --- a/include/boost/compute/interop/opengl/opengl_renderbuffer.hpp +++ b/include/boost/compute/interop/opengl/opengl_renderbuffer.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include namespace boost { @@ -123,4 +124,6 @@ struct set_kernel_arg : public set_kernel_arg } // end compute namespace } // end boost namespace +BOOST_COMPUTE_TYPE_NAME(boost::compute::opengl_renderbuffer, image2d_t) + #endif // BOOST_COMPUTE_INTEROP_OPENGL_OPENGL_RENDERBUFFER_HPP diff --git a/include/boost/compute/interop/opengl/opengl_texture.hpp b/include/boost/compute/interop/opengl/opengl_texture.hpp index a46e37fa7..c1f3f4f44 100644 --- a/include/boost/compute/interop/opengl/opengl_texture.hpp +++ b/include/boost/compute/interop/opengl/opengl_texture.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include namespace boost { @@ -127,4 +128,6 @@ struct set_kernel_arg : public set_kernel_arg { }; } // end compute namespace } // end boost namespace +BOOST_COMPUTE_TYPE_NAME(boost::compute::opengl_texture, image2d_t) + #endif // BOOST_COMPUTE_INTEROP_OPENGL_OPENGL_TEXTURE_HPP diff --git a/test/extra/test_interop_opengl.cpp b/test/extra/test_interop_opengl.cpp index 8c4bb5cad..876abfab4 100644 --- a/test/extra/test_interop_opengl.cpp +++ b/test/extra/test_interop_opengl.cpp @@ -16,3 +16,13 @@ BOOST_AUTO_TEST_CASE(opengl_buffer) { } + +BOOST_AUTO_TEST_CASE(type_name) +{ + BOOST_CHECK_EQUAL( + boost::compute::type_name(), "image2d_t" + ); + BOOST_CHECK_EQUAL( + boost::compute::type_name(), "image2d_t" + ); +}