13 #ifndef OGLPLUS_EXT_NV_COPY_IMAGE_1406270722_HPP
14 #define OGLPLUS_EXT_NV_COPY_IMAGE_1406270722_HPP
16 #if OGLPLUS_DOCUMENTATION_ONLY || GL_NV_copy_image
34 template <
typename SrcObjTag,
typename DstObjTag>
35 static void _chk_params(
void)
38 std::is_same<SrcObjTag, tag::Texture>() ||
39 std::is_same<SrcObjTag, tag::Renderbuffer>(),
40 "Source object must be a Texture or a Renderbuffer"
43 std::is_same<DstObjTag, tag::Texture>() ||
44 std::is_same<DstObjTag, tag::Renderbuffer>(),
45 "Destination object must be a Texture or a Renderbuffer"
49 OGLPLUS_EXTENSION_CLASS(NV, copy_image)
51 template <
typename SrcObjTag,
typename DstObjTag>
52 static void CopyImageSubData(
54 typename ObjBindingOps<SrcObjTag>::Target src_target,
56 GLint src_x, GLint src_y, GLint src_z,
58 typename ObjBindingOps<DstObjTag>::Target dst_target,
60 GLint dst_x, GLint dst_y, GLint dst_z,
61 GLsizei width, GLsizei height, GLsizei depth
64 _chk_params<SrcObjTag, DstObjTag>();
65 OGLPLUS_GLFUNC(CopyImageSubDataNV)(
80 SubjectBinding(dst_target).
82 ObjectBinding(src_target)
86 #if OGLPLUS_NATIVE_GLX
87 template <
typename SrcObjTag,
typename DstObjTag>
88 static void CopyImageSubData(
91 typename ObjBindingOps<SrcObjTag>::Target src_target,
93 GLint src_x, GLint src_y, GLint src_z,
96 typename ObjBindingOps<DstObjTag>::Target dst_target,
98 GLint dst_x, GLint dst_y, GLint dst_z,
99 GLsizei width, GLsizei height, GLsizei depth
102 using native::GetGLXContext;
104 _chk_params<SrcObjTag, DstObjTag>();
105 OGLPLUS_GLXFUNC(CopyImageSubDataNV)(
106 GetGLXDisplay(src_context),
107 GetGLXContext(src_context),
112 GetGLXContext(dst_context),
119 OGLPLUS_HANDLE_ERROR_IF(
120 error_code != GL_NO_ERROR,
121 OGLPLUS_GLFUNC(GetError)(),
122 ObjectPairError::Message(error_code),
125 SubjectBinding(dst_target).
127 ObjectBinding(src_target).
129 GLFunc(
"CopyImageSubData")
132 #endif // OGLPLUS_NATIVE_GLX
134 #if OGLPLUS_NATIVE_WGL
135 template <
typename SrcObjTag,
typename DstObjTag>
136 static void CopyImageSubData(
139 typename ObjBindingOps<SrcObjTag>::Target src_target,
141 GLint src_x, GLint src_y, GLint src_z,
144 typename ObjBindingOps<DstObjTag>::Target dst_target,
146 GLint dst_x, GLint dst_y, GLint dst_z,
147 GLsizei width, GLsizei height, GLsizei depth
150 using native::GetHGLRC;
152 _chk_params<SrcObjTag, DstObjTag>();
153 OGLPLUS_WGLFUNC(CopyImageSubDataNV)(
154 GetHGLRC(src_context),
159 GetHGLRC(dst_context),
166 OGLPLUS_HANDLE_ERROR_IF(
167 error_code != GL_NO_ERROR,
168 OGLPLUS_GLFUNC(GetError)(),
169 ObjectPairError::Message(error_code),
172 SubjectBinding(dst_target).
174 ObjectBinding(src_target).
176 GLFunc(
"CopyImageSubData")
179 #endif // OGLPLUS_NATIVE_WGL
184 #endif // NV_copy_image
186 #endif // include guard
Funcions and classes for handling and wrapping OpenGL extensions.
Wrapper for a valid GLX context handle.
Definition: context_glx.hpp:24
Declaration of OGLplus object-related error.
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
Wrapper for a valid WGL context handle.
Definition: context_wgl.hpp:24
Wrapper for the NV_copy_image extension.
Definition: NV_copy_image.hpp:31
Base class for OpenGL "named" objects.
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136