PrevUpHomeNext

Contexts

#include <eglplus/context.hpp>

Context is a wrapper around EGLContext.

Context attributes

typedef AttributeList<ContextAttrib, ...> ContextAttribs; 1

typedef FinishedAttributeList<ContextAttrib, ...> FinishedContextAttribs; 2

1

Attribute list type for context attributes.

2

Finished attribute list type for context attributes.

Context

class Context
{
public:
	Context(Context&& tmp);
	Context(const Context& tmp) = delete;

	Context(
		const Display& display,
		const Config& config
	); 1

	Context(
		const Display& display,
		const Config& config,
		const Context& shared_context
	); 2

	Context(
		const Display& display,
		const Config& config,
		const FinishedContextAttribs& attribs
	); 3

	Context(
		const Display& display,
		const Config& config,
		const Context& shared_context,
		const FinishedContextAttribs& attribs
	); 4

	~Context(void); 5

	Boolean MakeCurrent(
		const Surface& draw_surface,
		const Surface& read_surface
	); 6
	Boolean MakeCurrent(const Surface& surface);

	Boolean MakeCurrent(void); 7

	Boolean Release(void); 8

1

Constructs a non-sharing context without any attributes. See eglCreateContext.

2

Construct a sharing context without any attributes. See eglCreateContext.

3

Construct a non-sharing context with the specified attributes. See eglCreateContext.

4

Construct a sharing context without any attributes. See eglCreateContext.

5

Destroys the wrapped context. See eglDestroyContext.

6

Makes the context current. See eglMakeCurrent.

7

Makes the context current without using any surfaces. See eglMakeCurrent, EGL_NO_SURFACE.

8

Releases the current context without assigning a new one. See eglMakeCurrent, EGL_NO_SURFACE, EGL_NO_CONTEXT.

	Boolean Query(ContextAttrib attrib, EGLint& value) const; 1

	EGLint ConfigId(void) const; 2

	Boolean WaitClient(void) const; 3

	Boolean WaitGL(void) const; 4

	Boolean WaitNative(EGLint engine) const; 5
};

::EGLContext GetEGLHandle(const Context& context)
noexcept; 6

};

1

Queries a context attribute. See eglQueryContext.

2

Queries a context attribute. See eglQueryContext, EGL_CONFIG_ID.

3

Waits for client API commands to complete. See eglWaitClient.

4

Waits for GL API commands to complete. See eglWaitGL.

5

Waits for native API commands to complete. See eglWaitNative.

6

Returns the EGL context handle wrapped by a Context.


PrevUpHomeNext