Update gears example to latest eagle API changes

dev
Kristian Høgsberg 16 years ago
parent 01f941bfda
commit cda0e0db98
  1. 13
      gears.c

@ -261,12 +261,11 @@ resize_window(struct gears *gears)
if (gears->surface != NULL) if (gears->surface != NULL)
eglDestroySurface(gears->display, gears->surface); eglDestroySurface(gears->display, gears->surface);
gears->surface = eglCreateSurfaceForName(gears->display, gears->surface = eglCreateSurface(gears->display,
gears->config, gears->config,
0, gears->rectangle.width,
gears->rectangle.width, gears->rectangle.height,
gears->rectangle.height, 1, NULL);
0, NULL);
eglMakeCurrent(gears->display, eglMakeCurrent(gears->display,
gears->surface, gears->surface, gears->context); gears->surface, gears->surface, gears->context);
@ -317,7 +316,7 @@ handle_frame(void *data,
struct gears *gears = data; struct gears *gears = data;
uint32_t name, handle, stride; uint32_t name, handle, stride;
eglGetNativeBuffer(gears->surface, GL_FRONT_LEFT, &name, &handle, &stride); eglGetColorBuffer(gears->surface, 0, &name, &handle, &stride);
window_copy(gears->window, &gears->rectangle, name, stride); window_copy(gears->window, &gears->rectangle, name, stride);

Loading…
Cancel
Save