OSDN Git Service

new file: Integration/Tomography/Makefile.recent
[eos/hostdependX86LINUX64.git] / hostdepend / X86MAC64 / util / X86MAC64 / cuda / man / man3 / CUGL.3
1 phTexRef)hTexRef)pdptr, \fBCUtexref\fP hTexRef)pAddressMode, \fBCUtexref\fP hTexRef, int Dim)phArray, \fBCUtexref\fP hTexRef)pFilterMode, \fBCUtexref\fP hTexRef)pFlags, \fBCUtexref\fP hTexRef)pFormat, int * pNumPackedComponents, \fBCUtexref\fP hTexRef)pOffset, \fBCUtexref\fP hTexRef, \fBCUdeviceptr\fP dptr, unsigned int bytes)hTexRef, const \fBCUDA_ARRAY_DESCRIPTOR\fP * desc, \fBCUdeviceptr\fP dptr, unsigned int PitchInBytes)hTexRef, int Dim, \fBCUaddress_mode\fP am)hTexRef, \fBCUarray\fP hArray, unsigned int Flags)hTexRef, \fBCUfilter_mode\fP fm)hTexRef, unsigned int Flags)hTexRef, \fBCUarray_format\fP Format, int NumChannels).TH "OpenGL Interoperability" 3 "30 Mar 2009" "Version 2.2" "NVIDIA CUDA Library" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 OpenGL Interoperability \- 
6 .SS "Functions"
7
8 .in +1c
9 .ti -1c
10 .RI "\fBCUresult\fP \fBcuGLCtxCreate\fP (\fBCUcontext\fP *pCtx, unsigned int Flags, \fBCUdevice\fP device)"
11 .br
12 .RI "\fICreate a CUDA context for interoperability with OpenGL. \fP"
13 .ti -1c
14 .RI "\fBCUresult\fP \fBcuGLInit\fP (void)"
15 .br
16 .RI "\fIInitializes OpenGL interoperability. \fP"
17 .ti -1c
18 .RI "\fBCUresult\fP \fBcuGLMapBufferObject\fP (\fBCUdeviceptr\fP *dptr, unsigned int *size, GLuint bufferObj)"
19 .br
20 .RI "\fIMaps an OpenGL buffer object. \fP"
21 .ti -1c
22 .RI "\fBCUresult\fP \fBcuGLRegisterBufferObject\fP (GLuint bufferObj)"
23 .br
24 .RI "\fIRegisters an OpenGL buffer object. \fP"
25 .ti -1c
26 .RI "\fBCUresult\fP \fBcuGLUnmapBufferObject\fP (GLuint bufferObj)"
27 .br
28 .RI "\fIUnmaps an OpenGL buffer object. \fP"
29 .ti -1c
30 .RI "\fBCUresult\fP \fBcuGLUnregisterBufferObject\fP (GLuint bufferObj)"
31 .br
32 .RI "\fIUnregister an OpenGL buffer object. \fP"
33 .ti -1c
34 .RI "\fBCUresult\fP \fBcuWGLGetDevice\fP (\fBCUdevice\fP *pDevice, HGPUNV hGpu)"
35 .br
36 .RI "\fIGets the CUDA device associated with hGpu. \fP"
37 .in -1c
38 .SH "Detailed Description"
39 .PP 
40 This section describes the OpenGL interoperability functions of the low-level CUDA driver application programming interface. 
41 .SH "Function Documentation"
42 .PP 
43 .SS "\fBCUresult\fP cuGLCtxCreate (\fBCUcontext\fP * pCtx, unsigned int Flags, \fBCUdevice\fP device)"
44 .PP
45 Creates a new CUDA context, initializes OpenGL interoperability, and associates the CUDA context with the calling thread. It must be called before performing any other OpenGL interoperability operations. It may fail if the needed OpenGL driver facilities are not available. For usage of the \fCFlags\fP parameter, see \fBcuCtxCreate()\fP.
46 .PP
47 \fBParameters:\fP
48 .RS 4
49 \fIpCtx\fP - Returned CUDA context 
50 .br
51 \fIFlags\fP - Options for CUDA context creation 
52 .br
53 \fIdevice\fP - Device on which to create the context
54 .RE
55 .PP
56 \fBReturns:\fP
57 .RS 4
58 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_OUT_OF_MEMORY\fP 
59 .RE
60 .PP
61 \fBNote:\fP
62 .RS 4
63 Note that this function may also return error codes from previous, asynchronous launches.
64 .RE
65 .PP
66 \fBSee also:\fP
67 .RS 4
68 \fBcuCtxCreate\fP, \fBcuGLInit\fP, \fBcuGLMapBufferObject\fP, \fBcuGLRegisterBufferObject\fP, \fBcuGLUnmapBufferObject\fP, \fBcuGLUnregisterBufferObject\fP, \fBcuWGLGetDevice\fP 
69 .RE
70 .PP
71
72 .SS "\fBCUresult\fP cuGLInit (void)"
73 .PP
74 Initializes OpenGL interoperability. It must be called before performing any other OpenGL interoperability operations. It may fail if the needed OpenGL driver facilities are not available.
75 .PP
76 \fBReturns:\fP
77 .RS 4
78 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_UNKNOWN\fP 
79 .RE
80 .PP
81 \fBNote:\fP
82 .RS 4
83 Note that this function may also return error codes from previous, asynchronous launches.
84 .RE
85 .PP
86 \fBSee also:\fP
87 .RS 4
88 \fBcuGLCtxCreate\fP, \fBcuGLMapBufferObject\fP, \fBcuGLRegisterBufferObject\fP, \fBcuGLUnmapBufferObject\fP, \fBcuGLUnregisterBufferObject\fP, \fBcuWGLGetDevice\fP 
89 .RE
90 .PP
91
92 .SS "\fBCUresult\fP cuGLMapBufferObject (\fBCUdeviceptr\fP * dptr, unsigned int * size, GLuint bufferObj)"
93 .PP
94 Maps the buffer object of ID \fCbufferObj\fP into the address space of the current CUDA context and returns in \fC*dptr\fP and \fC*size\fP the base pointer and size of the resulting mapping.
95 .PP
96 \fBParameters:\fP
97 .RS 4
98 \fIdptr\fP - Returned mapped base pointer 
99 .br
100 \fIsize\fP - Returned size of mapping 
101 .br
102 \fIbufferObj\fP - Buffer object to map
103 .RE
104 .PP
105 \fBReturns:\fP
106 .RS 4
107 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_MAP_FAILED\fP 
108 .RE
109 .PP
110 \fBNote:\fP
111 .RS 4
112 Note that this function may also return error codes from previous, asynchronous launches.
113 .RE
114 .PP
115 \fBSee also:\fP
116 .RS 4
117 \fBcuGLCtxCreate\fP, \fBcuGLInit\fP, \fBcuGLRegisterBufferObject\fP, \fBcuGLUnmapBufferObject\fP, \fBcuGLUnregisterBufferObject\fP, \fBcuWGLGetDevice\fP 
118 .RE
119 .PP
120
121 .SS "\fBCUresult\fP cuGLRegisterBufferObject (GLuint bufferObj)"
122 .PP
123 Registers the buffer object of ID \fCbufferObj\fP for access by CUDA. This function must be called before CUDA can map the buffer object. While it is registered, the buffer object cannot be used by any OpenGL commands, except as a data source for OpenGL drawing commands.
124 .PP
125 \fBParameters:\fP
126 .RS 4
127 \fIbufferObj\fP - Buffer object to register
128 .RE
129 .PP
130 \fBReturns:\fP
131 .RS 4
132 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_ALREADY_MAPPED\fP 
133 .RE
134 .PP
135 \fBNote:\fP
136 .RS 4
137 Note that this function may also return error codes from previous, asynchronous launches.
138 .RE
139 .PP
140 \fBSee also:\fP
141 .RS 4
142 \fBcuGLCtxCreate\fP, \fBcuGLInit\fP, \fBcuGLMapBufferObject\fP, \fBcuGLUnmapBufferObject\fP, \fBcuGLUnregisterBufferObject\fP, \fBcuWGLGetDevice\fP 
143 .RE
144 .PP
145
146 .SS "\fBCUresult\fP cuGLUnmapBufferObject (GLuint bufferObj)"
147 .PP
148 Unmaps the buffer object of ID \fCbufferObj\fP for access by CUDA.
149 .PP
150 \fBParameters:\fP
151 .RS 4
152 \fIbufferObj\fP - Buffer object to unmap
153 .RE
154 .PP
155 \fBReturns:\fP
156 .RS 4
157 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP 
158 .RE
159 .PP
160 \fBNote:\fP
161 .RS 4
162 Note that this function may also return error codes from previous, asynchronous launches.
163 .RE
164 .PP
165 \fBSee also:\fP
166 .RS 4
167 \fBcuGLCtxCreate\fP, \fBcuGLInit\fP, \fBcuGLMapBufferObject\fP, \fBcuGLRegisterBufferObject\fP, \fBcuGLUnregisterBufferObject\fP, \fBcuWGLGetDevice\fP 
168 .RE
169 .PP
170
171 .SS "\fBCUresult\fP cuGLUnregisterBufferObject (GLuint bufferObj)"
172 .PP
173 Unregisters the buffer object of ID \fCbufferObj\fP for access by CUDA.
174 .PP
175 \fBParameters:\fP
176 .RS 4
177 \fIbufferObj\fP - Buffer object to unmap
178 .RE
179 .PP
180 \fBReturns:\fP
181 .RS 4
182 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP 
183 .RE
184 .PP
185 \fBNote:\fP
186 .RS 4
187 Note that this function may also return error codes from previous, asynchronous launches.
188 .RE
189 .PP
190 \fBSee also:\fP
191 .RS 4
192 \fBcuGLCtxCreate\fP, \fBcuGLInit\fP, \fBcuGLMapBufferObject\fP, \fBcuGLRegisterBufferObject\fP, \fBcuGLUnmapBufferObject\fP, \fBcuWGLGetDevice\fP 
193 .RE
194 .PP
195
196 .SS "\fBCUresult\fP cuWGLGetDevice (\fBCUdevice\fP * pDevice, HGPUNV hGpu)"
197 .PP
198 Returns in \fC*pDevice\fP the CUDA device associated with a \fChGpu\fP, if applicable.
199 .PP
200 \fBParameters:\fP
201 .RS 4
202 \fIpDevice\fP - Device associated with hGpu 
203 .br
204 \fIhGpu\fP - Handle to a GPU, as queried via WGL_NV_gpu_affinity()
205 .RE
206 .PP
207 \fBReturns:\fP
208 .RS 4
209 \fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP 
210 .RE
211 .PP
212 \fBNote:\fP
213 .RS 4
214 Note that this function may also return error codes from previous, asynchronous launches.
215 .RE
216 .PP
217 \fBSee also:\fP
218 .RS 4
219 \fBcuGLCtxCreate\fP, \fBcuGLInit\fP, \fBcuGLMapBufferObject\fP, \fBcuGLRegisterBufferObject\fP, \fBcuGLUnmapBufferObject\fP, \fBcuGLUnregisterBufferObject\fP 
220 .RE
221 .PP
222
223 .SH "Author"
224 .PP 
225 Generated automatically by Doxygen for NVIDIA CUDA Library from the source code.