20 #ifndef __EGL_DEVICE_H__
21 #define __EGL_DEVICE_H__ 1
27 #include <boost/scoped_array.hpp>
28 #include <boost/scoped_ptr.hpp>
38 # error "This file needs EGL, which is part of OpenGL-ES"
104 return static_cast<int>(value);
111 return static_cast<int>(value);
118 return static_cast<int>(value);
126 if (value == EGL_SINGLE_BUFFER) {
154 eglQuerySurface(
_eglDisplay, surface, EGL_WIDTH, &value);
156 return static_cast<size_t>(value);
161 eglQuerySurface(
_eglDisplay, surface, EGL_HEIGHT, &value);
163 return static_cast<size_t>(value);
167 eglQuerySurface(
_eglDisplay, surface, EGL_SWAP_BEHAVIOR, &value);
168 if (value == EGL_BUFFER_DESTROYED) {
173 #ifdef BUILD_X11_DEVICE
174 EGLint getNativeVisual();
215 NativePixmapType
pix;
217 log_error(
"eglCopyBuffers() failed (error 0x%x)", eglGetError());
228 log_error(
"eglMakeCurrent() failed (error 0x%x)", eglGetError());
239 log_error(
"eglMakeCurrent() failed (error 0x%x)", eglGetError());
253 return static_cast<size_t>(value);
260 return static_cast<size_t>(value);
266 if (value == EGL_BACK_BUFFER) {
278 if (value == EGL_MULTISAMPLE_RESOLVE_BOX) {
306 if (value == EGL_SINGLE_BUFFER) {
317 if (value == EGL_BACK_BUFFER) {
370 #define DUMP_CURRENT_SURFACE printEGLSurface(eglGetCurrentSurface(EGL_DRAW))
371 #define DUMP_CURRENT_CONTEXT printEGLContext(eglGetCurrentContext())
376 #endif // end of __EGL_DEVICE_H__
bool isContextSingleBuffered()
Definition: eglDevice.h:302
dtype_t getType()
Definition: eglDevice.h:67
EGLint getSurfaceID()
Definition: eglDevice.h:286
void printEGLContext()
Definition: eglDevice.h:187
EGLint getDepth()
Get the depth of the device.
Definition: eglDevice.h:93
bool supportsRenderer(GnashDevice::rtype_t rtype)
Is the specified renderer supported by this hardware ?
Definition: eglDevice.cpp:293
bool isContextBackBuffered()
Definition: eglDevice.h:313
bool copyPbuffers(size_t x)
Definition: eglDevice.h:212
EGLContext _eglContext
Definition: eglDevice.h:359
Definition: GnashDevice.h:48
bool makePbufferCurrent(size_t x)
Definition: eglDevice.h:235
size_t totalPbuffers()
Definition: eglDevice.h:197
float _y
Definition: eglDevice.h:54
EGLNativePixmapType _nativePixmap
Definition: eglDevice.h:363
void setAttrib(int bpp)
Definition: eglDevice.cpp:116
size_t getHeight(EGLSurface surface)
Definition: eglDevice.h:158
EGLint getSampleBuffers()
Definition: eglDevice.h:333
EGLSurface createPbuffer(int width, int height)
Definition: eglDevice.cpp:767
const EGLint * _attrib
Definition: eglDevice.h:365
long native_window_t
Definition: GnashDevice.h:43
bool swapBuffers()
Definition: eglDevice.h:205
bool makePbufferCurrent()
Definition: eglDevice.h:225
EGLSurface & operator[](int index)
Definition: eglDevice.h:198
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:47
int getGreenSize()
Get the size of the Green pixel.
Definition: eglDevice.h:106
EGLConfig _eglConfig
Definition: eglDevice.h:358
type
Definition: GnashKey.h:329
Definition: eglDevice.h:60
bool isSingleBuffered()
Is this device single buffered.
Definition: eglDevice.h:121
void printEGLSurface()
Definition: eglDevice.h:189
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:151
eglVertex(const point &p)
Definition: eglDevice.h:51
void printEGLAttribs(const EGLint *attrib)
Definition: eglDevice.cpp:581
size_t getStride()
Query the system for all supported configs.
Definition: eglDevice.h:79
bool isBufferDestroyed(EGLSurface surface)
Definition: eglDevice.h:165
int getRedSize()
Get the size of the Red pixel.
Definition: eglDevice.h:99
bool isNativeRender()
Is this renderering natively.
Definition: eglDevice.h:141
EGLint getContextID()
Definition: eglDevice.h:295
quality_e _quality
Definition: eglDevice.h:364
Definition: klash_part.cpp:329
bool isMultiSample()
Definition: eglDevice.h:274
struct lirc_config * config
Definition: lirc_ext.cpp:43
int getBlueSize()
Get the size of the Blue pixel.
Definition: eglDevice.h:113
size_t getHeight()
Get the Height of the device.
Definition: eglDevice.h:89
Definition: eglDevice.h:60
rtype_t
The list of supported renders that use devices.
Definition: GnashDevice.h:46
bool isBackBuffered()
Definition: eglDevice.h:262
void printEGLConfig()
Definition: eglDevice.h:185
int queryEGLConfig()
Query the system for all supported configs.
Definition: eglDevice.h:181
EGLNativeWindowType _nativeWindow
Definition: eglDevice.h:362
std::vector< EGLSurface > _pbuffers
Definition: eglDevice.h:367
EGLint getMinSwapInterval()
Definition: eglDevice.h:347
boost::int32_t x
Definition: BitmapData_as.cpp:434
BitmapData_as::iterator pix
Definition: BitmapData_as.cpp:568
EGLint getSamples()
Definition: eglDevice.h:326
static EGLint getRenderableTypes()
Definition: eglDevice.cpp:830
Definition: eglDevice.h:57
eglVertex(float x, float y)
Definition: eglDevice.h:48
unsigned int _bpp
Definition: eglDevice.h:366
boost::int32_t y
Definition: BitmapData_as.cpp:435
EGLDisplay _eglDisplay
Definition: eglDevice.h:361
Definition: GnashKey.h:162
Definition: eglDevice.h:60
#define GNASH_REPORT_FUNCTION
Definition: log.h:438
bool initDevice(int argc, char *argv[])
Definition: eglDevice.cpp:169
quality_e
Definition: eglDevice.h:60
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:131
virtual ~EGLDevice()
Definition: eglDevice.cpp:131
EGLDevice()
Definition: eglDevice.cpp:50
int getID()
Get the window ID handle.
Definition: eglDevice.h:135
size_t getVerticalRes()
Definition: eglDevice.h:248
EGLint getMaxSwapInterval()
Definition: eglDevice.h:340
EGLSurface _eglSurface
Definition: eglDevice.h:360
size_t getHorzRes()
Definition: eglDevice.h:255
float _x
Definition: eglDevice.h:53
size_t getWidth()
Get the width of the device.
Definition: eglDevice.h:85
bool checkEGLConfig(EGLConfig config)
Check the requested EGl configuration against the current one.
Definition: eglDevice.cpp:475