Subversion Repositories shark

Rev

Rev 55 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
55 pj 1
/* $Id: ggimesa.h,v 1.1 2003-02-28 11:41:55 pj Exp $ */
2
 
3
/*
4
 * Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
5
 * Version:  4.0
6
 * Copyright (C) 1995-2000  Brian Paul
7
 * Copyright (C) 1998  Uwe Maurer
8
 * Copyrigth (C) 2001 Filip Spacek
9
 *
10
 * This library is free software; you can redistribute it and/or
11
 * modify it under the terms of the GNU Library General Public
12
 * License as published by the Free Software Foundation; either
13
 * version 2 of the License, or (at your option) any later version.
14
 *
15
 * This library is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 * Library General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU Library General Public
21
 * License along with this library; if not, write to the Free
22
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23
 */
24
 
25
 
26
#ifndef GGIMESA_H
27
#define GGIMESA_H
28
 
29
#define GGIMESA_MAJOR_VERSION 4
30
#define GGIMESA_MINOR_VERSION 0
31
 
32
#ifdef __cplusplus
33
extern "C" {
34
#endif
35
 
36
#include <ggi/ggi.h>
37
#include "GL/gl.h"
38
 
39
typedef struct ggi_mesa_context *ggi_mesa_context_t;
40
 
41
/*
42
 * Initialize Mesa GGI extension
43
 */
44
int ggiMesaInit(void);
45
/*
46
 * Clean up Mesa GGI exension
47
 */
48
int ggiMesaExit(void);
49
 
50
/*
51
 * Attach Mesa GGI extension to the visual 'vis'
52
 */
53
int ggiMesaAttach(ggi_visual_t vis);
54
/*
55
 * Detach Mesa GGI extension from the visual 'vis'
56
 */
57
int ggiMesaDetach(ggi_visual_t vis);
58
 
59
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
60
                        GLboolean stereo_flag, GLint depth_size,
61
                        GLint stencil_size, GLint accum_red_size,
62
                        GLint accum_green_size, GLint accum_blue_size,
63
                        GLint accum_alpha_size, GLint num_samples);
64
 
65
/*
66
 * Create a new context capable of displaying on the visual vis.
67
 */
68
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
69
/*
70
 * Destroy the context 'ctx'
71
 */
72
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
73
 
74
/*
75
 * Make context 'ctx' the current context and bind it to visual 'vis'.
76
 * Note that the context must have been created with respect to that visual.
77
 */
78
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
79
 
80
void ggiMesaSwapBuffers(void);
81
 
82
 
83
#ifdef __cplusplus
84
}
85
#endif
86
 
87
#endif