20 #ifndef __EGL_DEVICE_H__
21 #define __EGL_DEVICE_H__ 1
37 # error "This file needs EGL, which is part of OpenGL-ES"
103 return static_cast<int>(value);
110 return static_cast<int>(value);
117 return static_cast<int>(value);
125 if (value == EGL_SINGLE_BUFFER) {
153 eglQuerySurface(
_eglDisplay, surface, EGL_WIDTH, &value);
155 return static_cast<size_t>(value);
160 eglQuerySurface(
_eglDisplay, surface, EGL_HEIGHT, &value);
162 return static_cast<size_t>(value);
166 eglQuerySurface(
_eglDisplay, surface, EGL_SWAP_BEHAVIOR, &value);
167 if (value == EGL_BUFFER_DESTROYED) {
172 #ifdef BUILD_X11_DEVICE
173 EGLint getNativeVisual();
214 NativePixmapType
pix;
216 log_error(
"eglCopyBuffers() failed (error 0x%x)", eglGetError());
227 log_error(
"eglMakeCurrent() failed (error 0x%x)", eglGetError());
238 log_error(
"eglMakeCurrent() failed (error 0x%x)", eglGetError());
252 return static_cast<size_t>(value);
259 return static_cast<size_t>(value);
265 if (value == EGL_BACK_BUFFER) {
277 if (value == EGL_MULTISAMPLE_RESOLVE_BOX) {
305 if (value == EGL_SINGLE_BUFFER) {
316 if (value == EGL_BACK_BUFFER) {
369 #define DUMP_CURRENT_SURFACE printEGLSurface(eglGetCurrentSurface(EGL_DRAW))
370 #define DUMP_CURRENT_CONTEXT printEGLContext(eglGetCurrentContext())
375 #endif // end of __EGL_DEVICE_H__
bool isContextSingleBuffered()
Definition: eglDevice.h:301
dtype_t getType()
Definition: eglDevice.h:66
EGLint getSurfaceID()
Definition: eglDevice.h:285
void printEGLContext()
Definition: eglDevice.h:186
EGLint getDepth()
Get the depth of the device.
Definition: eglDevice.h:92
bool supportsRenderer(GnashDevice::rtype_t rtype)
Is the specified renderer supported by this hardware ?
Definition: eglDevice.cpp:293
bool isContextBackBuffered()
Definition: eglDevice.h:312
bool copyPbuffers(size_t x)
Definition: eglDevice.h:211
void log_error(StringType msg, Args...args)
Definition: log.h:283
EGLContext _eglContext
Definition: eglDevice.h:358
Definition: GnashDevice.h:48
bool makePbufferCurrent(size_t x)
Definition: eglDevice.h:234
size_t totalPbuffers()
Definition: eglDevice.h:196
float _y
Definition: eglDevice.h:53
EGLNativePixmapType _nativePixmap
Definition: eglDevice.h:362
void setAttrib(int bpp)
Definition: eglDevice.cpp:116
size_t getHeight(EGLSurface surface)
Definition: eglDevice.h:157
EGLint getSampleBuffers()
Definition: eglDevice.h:332
EGLSurface createPbuffer(int width, int height)
Definition: eglDevice.cpp:767
const EGLint * _attrib
Definition: eglDevice.h:364
long native_window_t
Definition: GnashDevice.h:43
bool swapBuffers()
Definition: eglDevice.h:204
bool makePbufferCurrent()
Definition: eglDevice.h:224
EGLSurface & operator[](int index)
Definition: eglDevice.h:197
Definition: GnashDevice.h:39
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
dtype_t
The list of supported device types.
Definition: GnashDevice.h:48
Definition: eglDevice.h:46
int getGreenSize()
Get the size of the Green pixel.
Definition: eglDevice.h:105
EGLConfig _eglConfig
Definition: eglDevice.h:357
type
Definition: GnashKey.h:329
Definition: eglDevice.h:59
bool isSingleBuffered()
Is this device single buffered.
Definition: eglDevice.h:120
void printEGLSurface()
Definition: eglDevice.h:188
Definition: klash_part.cpp:329
2D Point class
Definition: Point2d.h:38
bool bindClient(GnashDevice::rtype_t rtype)
Definition: eglDevice.cpp:332
bool attachWindow(GnashDevice::native_window_t window)
Definition: eglDevice.cpp:376
size_t getWidth(EGLSurface surface)
Definition: eglDevice.h:150
eglVertex(const point &p)
Definition: eglDevice.h:50
void printEGLAttribs(const EGLint *attrib)
Definition: eglDevice.cpp:581
size_t getStride()
Query the system for all supported configs.
Definition: eglDevice.h:78
bool isBufferDestroyed(EGLSurface surface)
Definition: eglDevice.h:164
int getRedSize()
Get the size of the Red pixel.
Definition: eglDevice.h:98
bool isNativeRender()
Is this renderering natively.
Definition: eglDevice.h:140
EGLint getContextID()
Definition: eglDevice.h:294
quality_e _quality
Definition: eglDevice.h:363
Definition: klash_part.cpp:329
bool isMultiSample()
Definition: eglDevice.h:273
struct lirc_config * config
Definition: lirc_ext.cpp:43
int getBlueSize()
Get the size of the Blue pixel.
Definition: eglDevice.h:112
size_t getHeight()
Get the Height of the device.
Definition: eglDevice.h:88
Definition: eglDevice.h:59
rtype_t
The list of supported renders that use devices.
Definition: GnashDevice.h:46
bool isBackBuffered()
Definition: eglDevice.h:261
void printEGLConfig()
Definition: eglDevice.h:184
int queryEGLConfig()
Query the system for all supported configs.
Definition: eglDevice.h:180
EGLNativeWindowType _nativeWindow
Definition: eglDevice.h:361
std::vector< EGLSurface > _pbuffers
Definition: eglDevice.h:366
EGLint getMinSwapInterval()
Definition: eglDevice.h:346
std::int32_t x
Definition: BitmapData_as.cpp:434
BitmapData_as::iterator pix
Definition: BitmapData_as.cpp:568
EGLint getSamples()
Definition: eglDevice.h:325
static EGLint getRenderableTypes()
Definition: eglDevice.cpp:830
Definition: eglDevice.h:56
eglVertex(float x, float y)
Definition: eglDevice.h:47
unsigned int _bpp
Definition: eglDevice.h:365
std::int32_t y
Definition: BitmapData_as.cpp:435
EGLDisplay _eglDisplay
Definition: eglDevice.h:360
Definition: GnashKey.h:162
Definition: eglDevice.h:59
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
bool initDevice(int argc, char *argv[])
Definition: eglDevice.cpp:169
quality_e
Definition: eglDevice.h:59
EGLSurface createPixmap(int width, int height, NativePixmapType buf)
Definition: eglDevice.cpp:808
const char * getErrorString(int error)
Return a string with the error code as text, instead of a numeric value.
Definition: eglDevice.cpp:436
bool isBufferDestroyed()
Are buffers destroyed ?
Definition: eglDevice.h:130
virtual ~EGLDevice()
Definition: eglDevice.cpp:131
EGLDevice()
Definition: eglDevice.cpp:50
int getID()
Get the window ID handle.
Definition: eglDevice.h:134
size_t getVerticalRes()
Definition: eglDevice.h:247
EGLint getMaxSwapInterval()
Definition: eglDevice.h:339
EGLSurface _eglSurface
Definition: eglDevice.h:359
size_t getHorzRes()
Definition: eglDevice.h:254
float _x
Definition: eglDevice.h:52
size_t getWidth()
Get the width of the device.
Definition: eglDevice.h:84
bool checkEGLConfig(EGLConfig config)
Check the requested EGl configuration against the current one.
Definition: eglDevice.cpp:475