Move EGL and GL includes to a gles2-renderer header.

John Kåre Alsaker 12 years ago committed by Kristian Høgsberg
parent 320711db0a
commit 30d2b1fd4b
  1. 1
      src/Makefile.am
  2. 2
      src/compositor-android.c
  3. 1
      src/compositor-drm.c
  4. 1
      src/compositor-rpi.c
  5. 4
      src/compositor-wayland.c
  6. 4
      src/compositor-x11.c
  7. 27
      src/compositor.h
  8. 46
      src/gl-renderer.h
  9. 8
      src/gles2-renderer.c
  10. 1
      src/matrix.c

@ -34,6 +34,7 @@ weston_SOURCES = \
util.c \
matrix.c \
matrix.h \
gl-renderer.h \
gles2-renderer.c \
noop-renderer.c \
weston-launch.h \

@ -33,9 +33,9 @@
#include <unistd.h>
#include <EGL/egl.h>
#include <GLES2/gl2.h>
#include "compositor.h"
#include "gl-renderer.h"
#include "android-framebuffer.h"
#include "evdev.h"

@ -40,6 +40,7 @@
#include <libudev.h>
#include "compositor.h"
#include "gl-renderer.h"
#include "evdev.h"
#include "launcher-util.h"

@ -44,6 +44,7 @@
#endif
#include "compositor.h"
#include "gl-renderer.h"
#include "evdev.h"
/*

@ -36,10 +36,8 @@
#include <wayland-client.h>
#include <wayland-egl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "compositor.h"
#include "gl-renderer.h"
struct wayland_compositor {
struct weston_compositor base;

@ -45,10 +45,8 @@
#include <xkbcommon/xkbcommon.h>
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#include "compositor.h"
#include "gl-renderer.h"
#include "../shared/config-parser.h"
#define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)

@ -28,14 +28,8 @@
#include <xkbcommon/xkbcommon.h>
#include <wayland-server.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "matrix.h"
#include "../shared/config-parser.h"
#include "weston-egl-ext.h"
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
@ -806,27 +800,6 @@ weston_surface_destroy(struct weston_surface *surface);
int
weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode);
extern const EGLint gles2_renderer_opaque_attribs[];
extern const EGLint gles2_renderer_alpha_attribs[];
int
gles2_renderer_create(struct weston_compositor *ec, EGLNativeDisplayType display,
const EGLint *attribs, const EGLint *visual_id);
EGLDisplay
gles2_renderer_display(struct weston_compositor *ec);
int
gles2_renderer_output_create(struct weston_output *output,
EGLNativeWindowType window);
void
gles2_renderer_output_destroy(struct weston_output *output);
EGLSurface
gles2_renderer_output_surface(struct weston_output *output);
void
gles2_renderer_set_border(struct weston_compositor *ec, int32_t width, int32_t height, void *data,
int32_t *edges);
void
gles2_renderer_destroy(struct weston_compositor *ec);
int
noop_renderer_init(struct weston_compositor *ec);
void

@ -0,0 +1,46 @@
/*
* Copyright © 2012 John Kåre Alsaker
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of the copyright holders not be used in
* advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. The copyright holders make
* no representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "compositor.h"
#include <EGL/egl.h>
extern const EGLint gles2_renderer_opaque_attribs[];
extern const EGLint gles2_renderer_alpha_attribs[];
int
gles2_renderer_create(struct weston_compositor *ec, EGLNativeDisplayType display,
const EGLint *attribs, const EGLint *visual_id);
EGLDisplay
gles2_renderer_display(struct weston_compositor *ec);
int
gles2_renderer_output_create(struct weston_output *output,
EGLNativeWindowType window);
void
gles2_renderer_output_destroy(struct weston_output *output);
EGLSurface
gles2_renderer_output_surface(struct weston_output *output);
void
gles2_renderer_set_border(struct weston_compositor *ec, int32_t width, int32_t height, void *data,
int32_t *edges);
void
gles2_renderer_destroy(struct weston_compositor *ec);

@ -22,6 +22,9 @@
#define _GNU_SOURCE
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
@ -29,7 +32,10 @@
#include <assert.h>
#include <linux/input.h>
#include "compositor.h"
#include "gl-renderer.h"
#include <EGL/eglext.h>
#include "weston-egl-ext.h"
struct gles2_shader {
GLuint program;

@ -24,7 +24,6 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <GLES2/gl2.h>
#include <wayland-server.h>
#include "matrix.h"

Loading…
Cancel
Save