1ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston/* 2ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston Copyright (c) 2008 Apple Inc. 3ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 4ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston Permission is hereby granted, free of charge, to any person 5ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston obtaining a copy of this software and associated documentation files 6ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston (the "Software"), to deal in the Software without restriction, 7ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston including without limitation the rights to use, copy, modify, merge, 8ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston publish, distribute, sublicense, and/or sell copies of the Software, 9ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston and to permit persons to whom the Software is furnished to do so, 10ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston subject to the following conditions: 11ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 12ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston The above copyright notice and this permission notice shall be 13ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston included in all copies or substantial portions of the Software. 14ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 15ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 19ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston DEALINGS IN THE SOFTWARE. 23ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 24ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston Except as contained in this notice, the name(s) of the above 25ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston copyright holders shall not be used in advertising or otherwise to 26ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston promote the sale, use or other dealings in this Software without 27ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston prior written authorization. 28ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston*/ 29ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 30ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#ifndef APPLE_GLX_H 31ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#define APPLE_GLX_H 32ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 33ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#include <stdbool.h> 34ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#include <GL/gl.h> 35ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#include <GL/glxint.h> 36ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#include <X11/Xlib.h> 37a1cb3babbef2af222b839a058694acc82a7074f1Jeremy Huddleston 38ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#define XP_NO_X_HEADERS 39ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#include <Xplugin.h> 40ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 4151691f0767f6a75a1f549cd979a878a0ad12a228Jeremy Huddleston#include "apple_glx_log.h" 4251691f0767f6a75a1f549cd979a878a0ad12a228Jeremy Huddleston 43ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddlestonxp_client_id apple_glx_get_client_id(void); 44ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddlestonbool apple_init_glx(Display * dpy); 45ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddlestonvoid apple_glx_swap_buffers(void *ptr); 46ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddlestonvoid apple_glx_waitx(Display * dpy, void *ptr); 47ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddlestonint apple_get_dri_event_base(void); 48ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston 49a128355ecb5b782a69461a04991e4cffb32249dbJeremy Huddlestonvoid apple_glapi_set_dispatch(void); 509f2abbee6215d89e48b7fe042f8a905997f5c232Jeremy Huddlestonvoid apple_glapi_oglfw_viewport_scissor(GLint x, GLint y, GLsizei width, GLsizei height); 517d215e7c4d0ca8a18d91d4f30f79b97835a6d6c4Jeremy Huddleston 52ad503c41557606d15b0420c824369456f6d20a8fJeremy Huddleston#endif 53