|
Packit |
5af8b3 |
/*
|
|
Packit |
5af8b3 |
* Copyright (c) 2013, NVIDIA CORPORATION.
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
Packit |
5af8b3 |
* copy of this software and/or associated documentation files (the
|
|
Packit |
5af8b3 |
* "Materials"), to deal in the Materials without restriction, including
|
|
Packit |
5af8b3 |
* without limitation the rights to use, copy, modify, merge, publish,
|
|
Packit |
5af8b3 |
* distribute, sublicense, and/or sell copies of the Materials, and to
|
|
Packit |
5af8b3 |
* permit persons to whom the Materials are furnished to do so, subject to
|
|
Packit |
5af8b3 |
* the following conditions:
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* The above copyright notice and this permission notice shall be included
|
|
Packit |
5af8b3 |
* unaltered in all copies or substantial portions of the Materials.
|
|
Packit |
5af8b3 |
* Any additions, deletions, or changes to the original source files
|
|
Packit |
5af8b3 |
* must be clearly indicated in accompanying documentation.
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* If only executable code is distributed, then the accompanying
|
|
Packit |
5af8b3 |
* documentation must state that "this software is based in part on the
|
|
Packit |
5af8b3 |
* work of the Khronos Group."
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
Packit |
5af8b3 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
Packit |
5af8b3 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
Packit |
5af8b3 |
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
Packit |
5af8b3 |
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
Packit |
5af8b3 |
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
Packit |
5af8b3 |
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
#ifndef __GLX_MAKECURRENT_H__
|
|
Packit |
5af8b3 |
#define __GLX_MAKECURRENT_H__
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
#include <X11/Xlib.h>
|
|
Packit |
5af8b3 |
#include <GL/gl.h>
|
|
Packit |
5af8b3 |
#include <GL/glx.h>
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/*
|
|
Packit |
5af8b3 |
* Contains definition of the fake GL extension functions exported by the
|
|
Packit |
5af8b3 |
* GLX_makecurrent vendor library used in the testglxmakecurrent test.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
enum {
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/*
|
|
Packit |
5af8b3 |
* Returns an array of 3 GLint values containing, respectively,
|
|
Packit |
5af8b3 |
* the number of times glBegin(), glVertex3fv(), and glEnd() were called
|
|
Packit |
5af8b3 |
* by this thread.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
GL_MC_FUNCTION_COUNTS,
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/*
|
|
Packit |
5af8b3 |
* Returns a NULL-terminated string describing the name of this vendor.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
GL_MC_VENDOR_STRING,
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/*
|
|
Packit |
5af8b3 |
* Last request. Always returns NULL.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
GL_MC_LAST_REQ
|
|
Packit |
5af8b3 |
} GLmakeCurrentTestRequest;
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/**
|
|
Packit |
5af8b3 |
* This is an attribute to query using glXQueryContext to test dispatching by
|
|
Packit |
5af8b3 |
* GLXContext.
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* The dummy vendor library will just return 1 for this attribute.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
#define GLX_CONTEX_ATTRIB_DUMMY 0x10000
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/*
|
|
Packit |
5af8b3 |
* glMakeCurrentTestResults(): perform queries on vendor library state.
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* This explicitly is designed to not return anything, in case a bug causes the
|
|
Packit |
5af8b3 |
* API library to dispatch this to a no-op stub. If this function returned a
|
|
Packit |
5af8b3 |
* value and dispatched to a no-op, the return value would be bogus and hard to
|
|
Packit |
5af8b3 |
* debug. To detect this issue, clients should initialize *saw to GL_FALSE
|
|
Packit |
5af8b3 |
* before passing it to this function. Similarly, *ret should be initialized to
|
|
Packit |
5af8b3 |
* NULL prior to passing it to this function.
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* \param [in] req The request to perform. Must be a valid
|
|
Packit |
5af8b3 |
* GLmakeCurrentTestRequest enum
|
|
Packit |
5af8b3 |
* \param [out] saw Expected to point to a GLboolean initialied to GL_FALSE.
|
|
Packit |
5af8b3 |
* *saw is set to GL_TRUE if we dispatched to the vendor function.
|
|
Packit |
5af8b3 |
* \param [out] ret Expected to point to a (void*) initialized to NULL. *ret is
|
|
Packit |
5af8b3 |
* set to NULL if there was an error, or a pointer to request-specific data
|
|
Packit |
5af8b3 |
* otherwise. The pointer may be passed into free(3).
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
typedef void (*PFNGLMAKECURRENTTESTRESULTSPROC)(
|
|
Packit |
5af8b3 |
GLint req,
|
|
Packit |
5af8b3 |
GLboolean *saw,
|
|
Packit |
5af8b3 |
void **ret
|
|
Packit |
5af8b3 |
);
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
/**
|
|
Packit |
5af8b3 |
* glXCreateContextVendorDUMMY(): Dummy extension function to create a context.
|
|
Packit |
5af8b3 |
*
|
|
Packit |
5af8b3 |
* This tests using a vendor-provided dispach stub to create a context and add
|
|
Packit |
5af8b3 |
* it to GLVND's tracking.
|
|
Packit |
5af8b3 |
*/
|
|
Packit |
5af8b3 |
typedef GLXContext (* PFNGLXCREATECONTEXTVENDORDUMMYPROC) (Display *dpy,
|
|
Packit |
5af8b3 |
GLXFBConfig config, GLXContext share_list, Bool direct,
|
|
Packit |
5af8b3 |
const int *attrib_list);
|
|
Packit |
5af8b3 |
|
|
Packit |
5af8b3 |
#endif
|