2 * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #ifndef VA_GLX_PRIVATE_H
26 #define VA_GLX_PRIVATE_H
30 #include "va_backend.h"
33 #include "va_backend_glx.h"
35 #if GLX_GLXEXT_VERSION < 18
36 typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *);
37 typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int);
40 typedef struct VAOpenGLVTable *VAOpenGLVTableP;
42 struct VAOpenGLVTable {
43 PFNGLXBINDTEXIMAGEEXTPROC glx_bind_tex_image;
44 PFNGLXRELEASETEXIMAGEEXTPROC glx_release_tex_image;
45 PFNGLGENFRAMEBUFFERSEXTPROC gl_gen_framebuffers;
46 PFNGLDELETEFRAMEBUFFERSEXTPROC gl_delete_framebuffers;
47 PFNGLBINDFRAMEBUFFEREXTPROC gl_bind_framebuffer;
48 PFNGLGENRENDERBUFFERSEXTPROC gl_gen_renderbuffers;
49 PFNGLDELETERENDERBUFFERSEXTPROC gl_delete_renderbuffers;
50 PFNGLBINDRENDERBUFFEREXTPROC gl_bind_renderbuffer;
51 PFNGLRENDERBUFFERSTORAGEEXTPROC gl_renderbuffer_storage;
52 PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC gl_framebuffer_renderbuffer;
53 PFNGLFRAMEBUFFERTEXTURE2DEXTPROC gl_framebuffer_texture_2d;
54 PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC gl_check_framebuffer_status;
57 typedef struct VADisplayContextGLX *VADisplayContextGLXP;
58 typedef struct VADriverContextGLX *VADriverContextGLXP;
59 typedef struct VASurfaceGLX *VASurfaceGLXP;
60 typedef struct VADriverVTableGLX *VADriverVTableGLXP;
62 typedef void (*vaDestroyFunc)(VADisplayContextP);
64 struct VADisplayContextGLX {
65 vaDestroyFunc vaDestroy;
68 #define VA_DRIVER_CONTEXT_GLX(ctx) ((VADriverContextGLXP)((ctx)->glx))
70 struct VADriverContextGLX {
71 struct VADriverVTableGLX vtable;
72 struct VAOpenGLVTable gl_vtable;
73 unsigned int is_initialized : 1;
76 #endif /* VA_GLX_PRIVATE_H */