… | |
… | |
271 | ulong IV - Q |
271 | ulong IV - Q |
272 | float NV float f |
272 | float NV float f |
273 | half IV ushort S |
273 | half IV ushort S |
274 | double NV double d |
274 | double NV double d |
275 | |
275 | |
276 | =head2 OpenGL sharing |
|
|
277 | |
|
|
278 | This module can be optionally compiled with support for |
|
|
279 | OpenGL sharing. The sharing functions are only available when |
|
|
280 | C<OpenCL::HAVE_OPENGL> returns true, otherwise they are absent and cannot |
|
|
281 | be called. |
|
|
282 | |
|
|
283 | =head2 THE OpenCL PACKAGE |
276 | =head2 THE OpenCL PACKAGE |
284 | |
277 | |
285 | =over 4 |
278 | =over 4 |
286 | |
279 | |
287 | =item $int = OpenCL::errno |
280 | =item $int = OpenCL::errno |
… | |
… | |
699 | Creates a new OpenCL::Image3D object and optionally initialises it with |
692 | Creates a new OpenCL::Image3D object and optionally initialises it with |
700 | the given data values. |
693 | the given data values. |
701 | |
694 | |
702 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
695 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html> |
703 | |
696 | |
|
|
697 | =item $buffer = $ctx->gl_buffer ($flags, $bufobj) |
|
|
698 | |
|
|
699 | Creates a new OpenCL::Buffer (actually OpenCL::BufferObj) object that refers to the given |
|
|
700 | OpenGL buffer object. |
|
|
701 | |
|
|
702 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLBuffer.html |
|
|
703 | |
|
|
704 | =item $ctx->gl_texture2d ($flags, $target, $miplevel, $texture) |
|
|
705 | |
|
|
706 | Creates a new OpenCL::Image2D object that refers to the given OpenGL |
|
|
707 | 2D texture object. |
|
|
708 | |
|
|
709 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLTexture2D.html |
|
|
710 | |
|
|
711 | =item $ctx->gl_texture3d ($flags, $target, $miplevel, $texture) |
|
|
712 | |
|
|
713 | Creates a new OpenCL::Image3D object that refers to the given OpenGL |
|
|
714 | 3D texture object. |
|
|
715 | |
|
|
716 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLTexture3D.html |
|
|
717 | |
|
|
718 | =item $ctx->gl_renderbuffer ($flags, $renderbuffer) |
|
|
719 | |
|
|
720 | Creates a new OpenCL::Image2D object that refers to the given OpenGL |
|
|
721 | render buffer. |
|
|
722 | |
|
|
723 | http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateFromGLRenderbuffer.html |
|
|
724 | |
704 | =item @formats = $ctx->supported_image_formats ($flags, $image_type) |
725 | =item @formats = $ctx->supported_image_formats ($flags, $image_type) |
705 | |
726 | |
706 | Returns a list of matching image formats - each format is an arrayref with |
727 | Returns a list of matching image formats - each format is an arrayref with |
707 | two values, $channel_order and $channel_type, in it. |
728 | two values, $channel_order and $channel_type, in it. |
708 | |
729 | |
… | |
… | |
939 | |
960 | |
940 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result. |
961 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result. |
941 | |
962 | |
942 | =for gengetinfo end mem |
963 | =for gengetinfo end mem |
943 | |
964 | |
|
|
965 | =item ($type, $name) = $mem->gl_object_info |
|
|
966 | |
|
|
967 | Returns the OpenGL object type (e.g. OpenCL::GL_OBJECT_TEXTURE2D) and the |
|
|
968 | object "name" (e.g. the texture name) used to create this memory object. |
|
|
969 | |
|
|
970 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetGLObjectInfo.html> |
|
|
971 | |
944 | =back |
972 | =back |
945 | |
973 | |
946 | =head2 THE OpenCL::Buffer CLASS |
974 | =head2 THE OpenCL::Buffer CLASS |
947 | |
975 | |
948 | This is a subclass of OpenCL::Memory, and the superclass of |
976 | This is a subclass of OpenCL::Memory, and the superclass of |
… | |
… | |
1006 | =item $int = $image->depth |
1034 | =item $int = $image->depth |
1007 | |
1035 | |
1008 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result. |
1036 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result. |
1009 | |
1037 | |
1010 | =for gengetinfo end image |
1038 | =for gengetinfo end image |
|
|
1039 | |
|
|
1040 | =for gengetinfo begin gl_texture |
|
|
1041 | |
|
|
1042 | =item $GLenum = $gl_texture->target |
|
|
1043 | |
|
|
1044 | Calls C<clGetGlTextureInfo> with C<CL_GL_TEXTURE_TARGET> and returns the result. |
|
|
1045 | |
|
|
1046 | =item $GLint = $gl_texture->gl_mipmap_level |
|
|
1047 | |
|
|
1048 | Calls C<clGetGlTextureInfo> with C<CL_GL_MIPMAP_LEVEL> and returns the result. |
|
|
1049 | |
|
|
1050 | =for gengetinfo end gl_texture |
1011 | |
1051 | |
1012 | =back |
1052 | =back |
1013 | |
1053 | |
1014 | =head2 THE OpenCL::Sampler CLASS |
1054 | =head2 THE OpenCL::Sampler CLASS |
1015 | |
1055 | |