aboutsummaryrefslogtreecommitdiff
path: root/include/render/gles2.h
AgeCommit message (Collapse)Author
2019-11-06render/gles: Simplify textures a bitScott Anderson
We don't need our own enum for types. Instead we just use GL_TEXTURE_{2D,EXTERNAL_OES}, which already describes usage. Also fixes a situation where we were using GL_TEXTURE_2D in a situation we should not have. wl_drm buffers are always GL_TEXTURE_EXTERNAL_OES, no matter if they're RGB or any other format.
2019-07-17Use -fmacro-prefix-map to strip build pathManuel Stoeckl
This commit matches sway's 2dc4978d8af326c310057ca8fd22a4c7f5d09335. To help ensure a reproducible build (when debug info is disabled), the meson build script now uses the -fmacro-prefix-map command line argument supported by GCC to strip the build-path dependent bytes of each __FILE__ string used by wlr_log and related functions. A rather ugly algorithm is used to compute the relative path between the build and source folders, because meson has no specific function for this. When the compiler does not support -fmacro-prefix-map, fall back to shifting the start of each __FILE__ string by the length of the relative path to the source directory.
2019-04-22Fix missing headers when building without X11Alyssa Ross
The deleted includes are redundant, because other headers will include the necessary files. Additionally, they cause build failures, because including EGL/egl.h or EGL/eglext.h directly, instead of through wlr/render/egl.h or wlr/render/interface.h, will mean that MESA_EGL_NO_X11_HEADERS will not have been defined, and so the EGL headers will attempt to pull in unnecessary X11 headers that may not exist on the system. For the headers produced by glgen.sh, the includes couldn't simply be deleted, because no other header would include the EGL headers. Neither wlr/render/egl.h or wlr/render/interface.h felt appropriate to include, so I opted instead to copy the MESA_EGL_NO_X11_HEADERS definition before the EGL includes.
2019-02-28Remove glEGLImageTargetTexture2DOESGuido Günther
It's declared via render/glapi.txt.
2018-11-04render/gles2: check for GL_OES_EGL_image_externalemersion
2018-11-04render/gles2: remove assumptions about supported formatsemersion
We were assuming GL_BGRA_EXT was always supported. We now check that it's supported for rendering. We fail if it isn't because this format is specified as "always supported" by the Wayland protocol. We also check if it's supported for reading pixels. A new preferred_read_format function returns the preferred format that can be used to read pixels. This is used by the screencopy protocol.
2018-10-16Use enum wl_shm_format for gles2 texture formatsnyorain
Also rephrase the write_pixels comment.
2018-10-15Remove fmt parameter from wlr_texture_write_pixelsnyorain
It's not allowed to change the format of a texture so remove the confusing parameter.
2018-08-03gles2: change context when it is not currentMariusz Bialonczyk
Texture functions, that create and manipulate textures should switch the current context if necessary. thanks to: @emersion Fixes #934
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-06-13gles2 renderer: introduce struct wlr_gles2_tex_shaderNeKit
2018-06-07Fix GLES2 renderer to use glGetUniformLocations locationsNeKit
This is needed as uniform locations are driver implementation-specific.
2018-04-25Make sure we don't use others' prefixesemersion
2018-04-12Make wlr_renderer_scissor take normal coords instead of upside-down onesemersion
2018-04-01Untie wlr_gles2_renderer and wlr_gles2_textureemersion
2018-03-28Merge pull request #744 from emersion/texture-redesignTony Crisci
Redesign wlr_texture
2018-03-27render: remove GL calls from wlr_eglemersion
2018-03-24Redesign wlr_textureemersion
- Textures are now immutable (apart from those created from raw pixels), no more invalid textures - Move all wl_drm stuff in wlr_renderer - Most of wlr_texture fields are now private - Remove some duplicated DMA-BUF code in the DRM backend - Add more assertions - Stride is now always given as bytes rather than pixels - Drop wl_shm functions Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-21render/gles2: move list of supported WL formats to pixel_format.cemersion
2018-03-20render/gles2: remove global state, use OpenGL debug extensionemersion
2018-03-20gles2: allow to specify texture target typeGuido Günther
Allow to set the texture target type when generating/binding the texture. This allows us to attach the texture type to the texture so we don't have to keep the logic elsewhere.
2018-03-19render: split render.h into wlr_renderer.h and wlr_texture.hemersion
2018-02-21Rename _strip_path to wlr_strip_pathGuido Günther
since it's a public function
2018-02-12Reformat all #include directivesemersion
2017-10-22Move egl.h to render/egl.hScott Anderson
2017-09-23Use more consistent include guard namesemersion
2017-08-19wlr renderer/texture: rename init to create when it does allocDominique Martinet
2017-08-14Refactor away wlr_renderer_stateDrew DeVault
2017-08-14Refactor out wlr_texture_stateDrew DeVault
2017-08-10Refactor EGL handlingDrew DeVault
2017-08-10Fix example for updated glesnyorain
2017-08-10Implement drm (egl) buffer attachingnyorain
2017-08-08Rename wlr_surface -> wlr_texture; attach -> uploadnyorain
2017-07-11Fixed that warnings that showed up with optimisations.Scott Anderson
2017-06-23Support wl_shm pixel formats in gles2 rendererDrew DeVault
2017-06-23Switch to GLES2Drew DeVault
Closes #13