'/**********************************************************************************
' * Copyright (c) 2008-2009 The Khronos Group Inc.
' *
' * Permission is hereby granted, free of charge, to any person obtaining a
' * copy of this software and/or associated documentation files (the
' * "Materials"), to deal in the Materials without restriction, including
' * without limitation the rights to use, copy, modify, merge, publish,
' * distribute, sublicense, and/or sell copies of the Materials, and to
' * permit persons to whom the Materials are furnished to do so, subject to
' * the following conditions:
' *
' * The above copyright notice and this permission notice shall be included
' * in all copies or substantial portions of the Materials.
' *
' * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
' * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
' * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
' * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
' * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
' * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
' * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
' **********************************************************************************/
'/* $Revision: 8748 $ on $Date: 2009-08-27 04:24:36 -0700 (Thu, 27 Aug 2009) $ */
#IF NOT %DEF(PBX_cl_gl_PBI)
#DEFINE PBX_cl_gl_PBI
%EQUATE `CL_GL_INC = 1
#INCLUDE ONCE "Legacy/System/cl_platform.inc"
#INCLUDE ONCE "Legacy/Graphics/GL.inc"
'// NOTE: Make sure that appropriate GL header file is included separately
'typedef cl_uint cl_gl_object_type;
'typedef cl_uint cl_gl_texture_info;
'typedef cl_uint cl_gl_platform_info;
'// cl_gl_object_type
%EQUATE `CL_GL_OBJECT_BUFFER = &H2000
%EQUATE `CL_GL_OBJECT_TEXTURE2D = &H2001
%EQUATE `CL_GL_OBJECT_TEXTURE3D = &H2002
%EQUATE `CL_GL_OBJECT_RENDERBUFFER = &H2003
'// cl_gl_texture_info
%EQUATE `CL_GL_TEXTURE_TARGET = &H2004
%EQUATE `CL_GL_MIPMAP_LEVEL = &H2005
DECLARE FUNCTION clCreateFromGLBuffer LIB "opencl.dll" ALIAS "clCreateFromGLBuffer" ( BYVAL context AS QUAD ' cl_context /* context */, , BYVAL flags AS QUAD ' cl_mem_flags /* flags */, , BYVAL bufobj AS QUAD ' GLuint /* bufobj */, , BYREF errcode_ret AS LONG ' int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clCreateFromGLTexture2D LIB "opencl.dll" ALIAS "clCreateFromGLTexture2D" ( BYVAL context AS QUAD ' cl_context /* context */, , BYVAL flags AS QUAD ' cl_mem_flags /* flags */, , BYVAL target AS LONG ' GLenum /* target */ , BYVAL miplevel AS LONG ' GLint /* miplevel */ , BYVAL texture AS QUAD ' GLuint /* texture */ , BYREF errcode_ret AS LONG ' int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clCreateFromGLTexture3D LIB "opencl.dll" ALIAS "clCreateFromGLTexture3D" ( BYVAL context AS QUAD ' cl_context /* context */, , BYVAL flags AS QUAD ' cl_mem_flags /* flags */, , BYVAL target AS LONG ' GLenum /* target */ , BYVAL miplevel AS LONG ' GLint /* miplevel */ , BYVAL texture AS QUAD ' GLuint /* texture */ , BYREF errcode_ret AS LONG ' int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clCreateFromGLRenderbuffer LIB "opencl.dll" ALIAS "clCreateFromGLRenderbuffer" ( BYVAL context AS QUAD ' cl_context /* context */, , BYVAL flags AS QUAD ' cl_mem_flags /* flags */, , BYVAL renderbuffer AS QUAD ' GLuint /* renderbuffer */ , BYREF errcode_ret AS LONG ' int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clGetGLObjectInfo LIB "opencl.dll" ALIAS "clGetGLObjectInfo" ( BYVAL memobj AS QUAD ' cl_mem /* memobj */ , BYVAL gl_object_type AS QUAD ' cl_gl_object_type * /* gl_object_type */ , BYREF gl_object_name AS QUAD ' GLuint * /* gl_object_name */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetGLTextureInfo LIB "opencl.dll" ALIAS "clGetGLTextureInfo" ( BYVAL memobj AS QUAD ' cl_mem /* memobj */ , BYVAL param_name AS QUAD ' cl_gl_texture_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueAcquireGLObjects LIB "opencl.dll" ALIAS "clEnqueueAcquireGLObjects" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL num_objects AS QUAD ' cl_uint /* num_objects */ , BYREF mem_objects AS QUAD ' const cl_mem * /* mem_objects */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueReleaseGLObjects LIB "opencl.dll" ALIAS "clEnqueueReleaseGLObjects" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL num_objects AS QUAD ' cl_uint /* num_objects */ , BYVAL mem_objects AS QUAD ' const cl_mem * /* mem_objects */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
#ENDIF
