diff options
author | Chia-I Wu <olv@lunarg.com> | 2011-09-20 14:01:26 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2011-09-20 17:44:15 +0800 |
commit | 5eca41665bbd6deb5ffff011e47ff0cec41916da (patch) | |
tree | f136471780d9a1a54ec5d2e6bf706c1df5f4e474 /src/egl | |
parent | fb4ceb9638cbedc09446e3c21c15d9dfd72b7a6d (diff) |
egl: add null platform
The null platform has no window or pixmap surface (but pbuffer surface).
And the only valid display is EGL_DEFAULT_DISPLAY. It is useful for
offscreen rendering. It works everywhere becase no window system is
required.
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/main/Makefile | 6 | ||||
-rw-r--r-- | src/egl/main/egldisplay.c | 1 | ||||
-rw-r--r-- | src/egl/main/egldisplay.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index 5e5090ebc0..57fb691ea9 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -94,6 +94,9 @@ endif ifeq ($(firstword $(EGL_PLATFORMS)),fbdev) EGL_NATIVE_PLATFORM=_EGL_PLATFORM_FBDEV endif +ifeq ($(firstword $(EGL_PLATFORMS)),null) +EGL_NATIVE_PLATFORM=_EGL_PLATFORM_NULL +endif ifneq ($(findstring x11, $(EGL_PLATFORMS)),) LOCAL_CFLAGS += -DHAVE_X11_PLATFORM @@ -107,6 +110,9 @@ endif ifneq ($(findstring fbdev, $(EGL_PLATFORMS)),) LOCAL_CFLAGS += -DHAVE_FBDEV_PLATFORM endif +ifneq ($(findstring null, $(EGL_PLATFORMS)),) +LOCAL_CFLAGS += -DHAVE_NULL_PLATFORM +endif LOCAL_CFLAGS += \ -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \ diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 1d05e57c42..39ba8830cd 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -73,6 +73,7 @@ static const struct { { _EGL_PLATFORM_WAYLAND, "wayland" }, { _EGL_PLATFORM_DRM, "drm" }, { _EGL_PLATFORM_FBDEV, "fbdev" }, + { _EGL_PLATFORM_NULL, "null" }, { _EGL_PLATFORM_ANDROID, "android" } }; diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index cddea803c2..67a2e244e2 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -44,6 +44,7 @@ enum _egl_platform_type { _EGL_PLATFORM_WAYLAND, _EGL_PLATFORM_DRM, _EGL_PLATFORM_FBDEV, + _EGL_PLATFORM_NULL, _EGL_PLATFORM_ANDROID, _EGL_NUM_PLATFORMS, |