PrevUpHomeNext

Surfaces

#include <eglplus/surface.hpp>

Surface attributes

typedef AttributeList<SurfaceAttrib, ...> SurfaceAttribs; 1

typedef FinishedAttributeList<SurfaceAttrib, ...> FinishedSurfaceAttribs; 2

1

Attribute list type for surface attributes.

2

Finished attribute list type for surface attributes.

Surface

Surface is a wrapper around EGLSurface.

class Surface
{
public:
	Surface(Surface&& tmp)
	noexcept;

	~Surface(void); 1

	static Surface Pbuffer(
		const Display& display,
		const Config& config,
		const FinishedSurfaceAttribs& attribs
	); 2

	static Surface Pixmap(
		const Display& display,
		const Config& config,
		EGLNativePixmapType pixmap,
		const FinishedSurfaceAttribs& attribs
	); 3

	static Surface Window(
		const Display& display,
		const Config& config,
		EGLNativeWindowType window,
		const FinishedSurfaceAttribs& attribs
	); 4

	Boolean SwapBuffers(void); 5

	Boolean CopyBuffers(EGLNativePixmapType target); 6

	Boolean Attrib(SurfaceAttrib attrib, EGLint value); 7

	Boolean QueryAttrib(SurfaceAttrib attrib, EGLint& value) const; 8

	EGLint GetAttrib(SurfaceAttrib attrib) const; 9

	EGLint Width(void) const; 10

	EGLint Height(void) const; 11

1

Destroys the wrapped surface. See [eglfunref DestroySurface].

2

Creates a Pbuffer surface. See eglCreatePbufferSurface.

3

Creates a Pixmap surface. See eglCreatePixmapSurface.

4

Creates a Window surface. See eglCreateWindowSurface.

5

Swap the front and back buffers. See eglSwapBuffers.

6

Copy buffer to native pixmap. See eglCopyBuffers.

7

Sets the value of the specified attribute. See eglSurfaceAttrib.

8

Queries the specified surface attribute value. See eglQuerySurface.

9

Gets the specified surface attribute value. See eglQuerySurface.

10

Returns the width of the surface. See eglQuerySurface, EGL_WIDTH.

11

Returns the height of the surface. See eglQuerySurface, EGL_HEIGHT.

	RenderBuffer RenderBuffer(void) const; 1

	void RenderBuffer(RenderBuffer render_buffer); 2

	MultisampleResolve MultisampleResolve(void) const; 3

	void MultisampleResolve(MultisampleResolve value); 4

	SwapBehavior SwapBehavior(void) const; 5

	void SwapBehavior(SwapBehavior value); 6

	TextureTarget TextureTarget(void) const; 7

	TextureFormat TextureFormat(void) const; 8

	GLColorSpace GLColorspace(void) const; 9

	VGColorSpace VGColorspace(void) const; 10

	VGAlphaFormat VGAlphaFormat(void) const; 11
};

::EGLSurface GetEGLHandle(const Surface& surface)
noexcept; 12

1

Returns the render buffer setting of the surface. See eglQuerySurface, EGL_RENDER_BUFFER.

2

Changes the render buffer setting of the surface. See eglSurfaceAttrib, EGL_RENDER_BUFFER.

3

Returns the multisample resolve setting of the surface. See eglQuerySurface, EGL_MULTISAMPLE_RESOLVE.

4

Changes the multisample resolve setting of the surface. See eglSurfaceAttrib, EGL_MULTISAMPLE_RESOLVE.

5

Returns the buffer swap behavior setting of the surface. See eglQuerySurface, EGL_SWAP_BEHAVIOR.

6

Changes the buffer swap behavior setting of the surface. See eglSurfaceAttrib, EGL_SWAP_BEHAVIOR.

7

Returns the texture target setting of the surface. See eglQuerySurface, EGL_TEXTURE_TARGET.

8

Returns the texture format setting of the surface. See eglQuerySurface, EGL_TEXTURE_FORMAT.

9

Returns the OpenGL colorspace setting of the surface. See eglQuerySurface, EGL_GL_COLORSPACE.

10

Returns the OpenVG colorspace setting of the surface. See eglQuerySurface, EGL_VG_COLORSPACE.

11

Returns the OpenVG alpha format of the surface. See eglQuerySurface, EGL_VG_ALPHA_FORMAT.

12

Returns the EGL surface handle wrapped by a Surface.


PrevUpHomeNext