2005-07-03 09:02:09 +02:00
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
2003-11-14 17:48:57 +01:00
|
|
|
#ifndef _GLX_drawable_h_
|
|
|
|
#define _GLX_drawable_h_
|
|
|
|
|
|
|
|
/*
|
Update to SGI FreeB 2.0.
Under the terms of version 1.1, "once Covered Code has been published
under a particular version of the License, Recipient may, for the
duration of the License, continue to use it under the terms of that
version, or choose to use such Covered Code under the terms of any
subsequent version published by SGI."
FreeB 2.0 license refers to "dates of first publication". They are here
taken to be 1991-2000, as noted in the original license text:
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
Official FreeB 2.0 text:
http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf
As always, this code has not been tested for conformance with the OpenGL
specification. OpenGL conformance testing is available from
http://khronos.org/ and is required for use of the OpenGL logo in
product advertising and promotion.
2008-09-19 18:02:28 +02:00
|
|
|
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
|
|
|
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice including the dates of first publication and
|
|
|
|
* either this permission notice or a reference to
|
|
|
|
* http://oss.sgi.com/projects/FreeB/
|
|
|
|
* shall be included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS 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
|
|
|
|
* SILICON GRAPHICS, INC. 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*
|
|
|
|
* Except as contained in this notice, the name of Silicon Graphics, Inc.
|
|
|
|
* shall not be used in advertising or otherwise to promote the sale, use or
|
|
|
|
* other dealings in this Software without prior written authorization from
|
|
|
|
* Silicon Graphics, Inc.
|
|
|
|
*/
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2007-08-27 20:23:50 +02:00
|
|
|
/* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */
|
|
|
|
enum {
|
|
|
|
GLX_DRAWABLE_WINDOW,
|
|
|
|
GLX_DRAWABLE_PIXMAP,
|
2009-04-07 19:58:53 +02:00
|
|
|
GLX_DRAWABLE_PBUFFER,
|
|
|
|
GLX_DRAWABLE_ANY
|
2007-08-27 20:23:50 +02:00
|
|
|
};
|
|
|
|
|
2006-03-12 01:11:34 +01:00
|
|
|
struct __GLXdrawable {
|
2012-03-21 20:55:09 +01:00
|
|
|
void (*destroy) (__GLXdrawable * private);
|
|
|
|
GLboolean(*swapBuffers) (ClientPtr client, __GLXdrawable *);
|
|
|
|
void (*copySubBuffer) (__GLXdrawable * drawable,
|
|
|
|
int x, int y, int w, int h);
|
|
|
|
void (*waitX) (__GLXdrawable *);
|
|
|
|
void (*waitGL) (__GLXdrawable *);
|
2006-03-12 01:11:34 +01:00
|
|
|
|
2003-11-14 17:48:57 +01:00
|
|
|
DrawablePtr pDraw;
|
|
|
|
XID drawId;
|
|
|
|
|
|
|
|
/*
|
2012-03-21 20:55:09 +01:00
|
|
|
** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or
|
|
|
|
** GLX_DRAWABLE_PBUFFER.
|
|
|
|
*/
|
2003-11-14 17:48:57 +01:00
|
|
|
int type;
|
|
|
|
|
|
|
|
/*
|
2012-03-21 20:55:09 +01:00
|
|
|
** Configuration of the visual to which this drawable was created.
|
|
|
|
*/
|
2008-03-27 00:28:09 +01:00
|
|
|
__GLXconfig *config;
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2007-08-24 01:07:52 +02:00
|
|
|
GLenum target;
|
2009-04-01 23:42:33 +02:00
|
|
|
GLenum format;
|
2007-08-27 20:43:48 +02:00
|
|
|
|
|
|
|
/*
|
2012-03-21 20:55:09 +01:00
|
|
|
** Event mask
|
|
|
|
*/
|
2007-08-27 20:43:48 +02:00
|
|
|
unsigned long eventMask;
|
2003-11-14 17:48:57 +01:00
|
|
|
};
|
|
|
|
|
Add Windows-DRI extension
If windowsdriproto headers are available, build a Windows-DRI extension,
which supports requests to enable local clients to directly render GL to a
Windows drawable:
- a query to check if WGL is being used on a screen
- a query to map a fbconfigID to a native pixelformatindex
- a query to map a drawable to a native handle
Windows-DRI can only be useful if we are using WGL, so make an note if WGL
is active on a screen.
Make validGlxDrawable() public
Adjust glxWinSetPixelFormat() so it doesn't require a context, just a
screen and config.
That enables factoring out the deferred drawable creation code as
glxWinDeferredCreateDrawable()
Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a
file mapping, so they exist in memory which can be shared with the direct
rendering process.
Currently, this file mapping is accessed by a name generated from the XID.
This will not be unique across multiple server instances. It would perhaps
be better, although more complicated, to use an anonymous file mapping, and
then duplicate the handle for the direct rendering process.
Use glxWinDeferredCreateDrawable() to ensure the native handle exists for
the Windows-DRI query to map a drawable to native handle.
v2:
Various printf format warning fixes
v3:
Fix format warnings on x86
Move some uninteresting windows-dri output to debug log level
v4:
check for windowsdriproto when --enable-windowsdri
use windowsdriproto_CFLAGS
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-07-24 13:29:41 +02:00
|
|
|
extern int validGlxDrawable(ClientPtr client, XID id, int type, int access_mode,
|
|
|
|
__GLXdrawable **drawable, int *err);
|
|
|
|
|
2012-03-21 20:55:09 +01:00
|
|
|
#endif /* !__GLX_drawable_h__ */
|