diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-08 15:52:42 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-08 15:52:42 -0400 |
commit | cd6a40d81679c37795e9d24354a8bbbf84cd53a6 (patch) | |
tree | 82186fb0985a16ed76928b0226ff2eed9bb2c261 /render/surface.c | |
parent | 83f8864f0ab1722aae12cc744094a7424c41f2d8 (diff) | |
download | wlroots-cd6a40d81679c37795e9d24354a8bbbf84cd53a6.tar.xz |
Further improvements to rendering subsystem
Diffstat (limited to 'render/surface.c')
-rw-r--r-- | render/surface.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/render/surface.c b/render/surface.c deleted file mode 100644 index 930e118d..00000000 --- a/render/surface.c +++ /dev/null @@ -1,34 +0,0 @@ -#include <stdint.h> -#include <stdlib.h> -#include <assert.h> -#include <GLES3/gl3.h> -#include <wayland-util.h> -#include <wayland-server-protocol.h> -#include <wlr/render.h> -#include <wlr/render/matrix.h> -#include "render.h" - -struct wlr_surface *wlr_surface_init() { - return calloc(sizeof(struct wlr_surface), 1); -} - -void wlr_surface_attach_pixels(struct wlr_surface *surf, uint32_t format, - int width, int height, const unsigned char *pixels) { - assert(surf); - surf->width = width; - surf->height = height; - surf->format = format; - // TODO: Error handling - glGenTextures(1, &surf->tex_id); - glBindTexture(GL_TEXTURE_2D, surf->tex_id); - glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, - format, GL_UNSIGNED_BYTE, pixels); - surf->valid = true; -} - -void wlr_surface_attach_shm(struct wlr_surface *surf, uint32_t format, - struct wl_shm_buffer *shm); - -void wlr_surface_destroy(struct wlr_surface *tex) { - // TODO -} |