summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/common/native.h
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-09 18:05:16 +0800
committerChia-I Wu <olv@lunarg.com>2010-04-11 01:17:47 +0800
commitf7730c0740cc8a43c3573dcdbf43e76630d957f6 (patch)
tree203329248def9a82d044c3f81375c0956920b64e /src/gallium/state_trackers/egl/common/native.h
parent51430c21ffd212d801f129d625f3ae8713372f68 (diff)
st/egl: Remove __GLcontextModes from the native interface.
Replace __GLcontextModes by a subset of its attributes that makes sense to EGL. This also gets rid of GL headers from the common code.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/native.h')
-rw-r--r--src/gallium/state_trackers/egl/common/native.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index 5ab21b639e..628befeae2 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -27,8 +27,6 @@
#define _NATIVE_H_
#include "EGL/egl.h" /* for EGL native types */
-#include "GL/gl.h" /* for GL types needed by __GLcontextModes */
-#include "GL/internal/glcore.h" /* for __GLcontextModes */
#include "pipe/p_compiler.h"
#include "pipe/p_screen.h"
@@ -102,15 +100,28 @@ struct native_surface {
void (*wait)(struct native_surface *nsurf);
};
+/**
+ * Describe a native display config.
+ */
struct native_config {
- /* __GLcontextModes should go away some day */
- __GLcontextModes mode;
+ /* available buffers and their format */
+ uint buffer_mask;
enum pipe_format color_format;
enum pipe_format depth_format;
enum pipe_format stencil_format;
- /* treat it as an additional flag to mode.drawableType */
+ /* supported surface types */
+ boolean window_bit;
+ boolean pixmap_bit;
boolean scanout_bit;
+
+ int native_visual_id;
+ int native_visual_type;
+ int level;
+ int samples;
+ boolean slow_config;
+ boolean transparent_rgb;
+ int transparent_rgb_values[3];
};
/**
@@ -142,17 +153,13 @@ struct native_display {
/**
* Get the supported configs. The configs are owned by the display, but
* the returned array should be free()ed.
- *
- * The configs will be converted to EGL config by
- * _eglConfigFromContextModesRec and validated by _eglValidateConfig.
- * Those failing to pass the test will be skipped.
*/
const struct native_config **(*get_configs)(struct native_display *ndpy,
int *num_configs);
/**
* Test if a pixmap is supported by the given config. Required unless no
- * config has GLX_PIXMAP_BIT set.
+ * config has pixmap_bit set.
*
* This function is usually called to find a config that supports a given
* pixmap. Thus, it is usually called with the same pixmap in a row.
@@ -163,16 +170,14 @@ struct native_display {
/**
- * Create a window surface. Required unless no config has GLX_WINDOW_BIT
- * set.
+ * Create a window surface. Required unless no config has window_bit set.
*/
struct native_surface *(*create_window_surface)(struct native_display *ndpy,
EGLNativeWindowType win,
const struct native_config *nconf);
/**
- * Create a pixmap surface. Required unless no config has GLX_PIXMAP_BIT
- * set.
+ * Create a pixmap surface. Required unless no config has pixmap_bit set.
*/
struct native_surface *(*create_pixmap_surface)(struct native_display *ndpy,
EGLNativePixmapType pix,