glxmakecontextcurrent man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

GLXMAKECONTEXTCURRENT(3gl)			    GLXMAKECONTEXTCURRENT(3gl)

NAME
       glXMakeContextCurrent - attach a GLX context to separate write and read
       drawables (windows, GLX windows, GLX pixmaps, or GLX pbuffers)

C SPECIFICATION
       Bool glXMakeContextCurrent( Display *dpy,
				   GLXDrawable drawable,
				   GLXDrawable readable,
				   GLXContext ctx )

PARAMETERS
       dpy	 Specifies the connection to the X server.

       drawable	 Specifies a GLX drawable.  Must be either an X window	ID,  a
		 GLXWindow ID, a GLXPixmap ID, or a GLXPbuffer ID.

       readable	 Specifies  a  GLX readable.  Must be either an X window ID, a
		 GLXWindow ID, a GLXPixmap ID, or a GLXPbuffer ID.

       ctx	 Specifies a GLX rendering context that is to be  attached  to
		 drawable.

DESCRIPTION
       glXMakeContextCurrent  specifies the association of the current context
       with a drawable; It is extended from glXMakeCurrent to  allow  separate
       write  and  read drawables.  This allows preprocessing of image data in
       an off screen window which is then read into  the  visible  window  for
       final  display.	Similarly it sets the framework for direct transfer of
       video to the GL library, by treating the video as  a  special  kind  of
       read drawable (a.k.a, readable).

       glXMakeContextCurrent  returns  True  if	 it  succeeds, and False if it
       fails.

NOTES
       If glXMakeContextCurrent is used to associate two GLXDrawables with the
       current	rendering context, GLXDrawable drawable is used for all OpenGL
       operations except:

       1.     Any  pixel  data	that  is  sourced  based  on  the   value   of
	      GL_READ_BUFFER.	Note,  that  accumulation  operations  use the
	      value of GL_READ_BUFFER, but are not allowed  when  drawable  is
	      not identical to readable.

       2.     Any  depth values that are retrieved by glReadPixels, glCopyPix‐
	      els, or any OpenGL extension that sources depth images from  the
	      frame buffer in the manner of glReadPixels and glCopyPixels.

       3.     Any  stencil values that are retrieved by glReadPixels, glCopyP‐
	      ixels, or any OpenGL extension that sources stencil images  from
	      the frame buffer in the manner of glReadPixels and glCopyPixels.

       These frame buffer values are taken from GLXDrawable readable.

       No  error  will be generated if the value of GL_READ_BUFFER at the time
       the glXMakeContextCurrent call is made does not correspond to  a	 valid
       color buffer in readable. Also, no error due to GL_READ_BUFFER mismatch
       will be generated by subsequent calls to any of the operations  enumer‐
       ated  above,  but  the  pixels  values  used  will  be  undefined until
       GL_READ_BUFFER is set to a color buffer that is valid in the  readable.
       Operations  that	 query	the  value  of	GL_READ_BUFFER	(i.e.,	glGet,
       glPushAttrib) use the value set last in	the  context,  independent  of
       whether	it  is a valid buffer in readable. Subsequent to a glXMakeCon‐
       textCurrent call, it is possible that the GL_READ_BUFFER may be set  to
       a color buffer that is not valid with respect to the visual of the con‐
       text.  This also applies to glXMakeCurrent where readable  is  replaced
       by the single drawable parameter to the call.

       Error  conditions  set by glDrawBuffer (even when called implicitly via
       glPopAttrib) and by the operations enumerated above are with respect to
       color  and  ancillary buffers available in readable (i.e., glReadBuffer
       (GL_BACK_BUFFER)	 will  generate	 an  error  when  readable  is	single
       buffered,  and so will an operation that tries to source stencil images
       when readable does not have a stencil buffer).

       Accumulation operations are only allowed when the GLXDrawbles  drawable
       and readable are identical.

       glXMakeContextCurrent  may fail if a window or a GLXPixmap as the read‐
       able GLXDrawable refuses to accept the readable GLXDrawable, or a GLXP‐
       buffer  with  color, depth, stencil, or accumulation storage facilities
       that differ from those of drawable.

       glXMakeContextCurrent may return False if drawable and readable	cannot
       exist in framebuffer memory simultaneously.

       glXMakeContextCurrent  is  part of the GLX Version 1.3 command set. The
       function is only valid if the connection supports GLX  Version  1.3  or
       later.

ERRORS
       GLXBadDrawable is generated if drawable was not created with the same X
       screen and visual as ctx. glXMakeContextCurrent associates two GLXDraw‐
       ables with a single GLXContext.

       BadMatch	 is  generated	if  readable  was  not created with the same X
       screen as ctx. The color, depth, stencil, and accumulation  buffers  of
       readable need not match the resources of drawable.

SEE ALSO
       glXMakeCurrent,	 glXCreateWindow,  glXCreatePixmap,  glXCreatePbuffer,
       glXGetCurrentReadDrawable, glGet, glPushAttrib,	glPopAttrib,  glAccum,
       glReadPixels, glCopyPixels

				   12 May 01	    GLXMAKECONTEXTCURRENT(3gl)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net