1 #ifndef __blip_RenderingContext_hpp 2 #define __blip_RenderingContext_hpp 58 {
return(_screenSize); }
62 {
return(_versionMajor); }
66 {
return(_versionMinor); }
70 {
return(_eglContext != EGL_NO_CONTEXT); }
76 bool init(ANativeWindow* window);
79 EGLContext _eglContext;
80 EGLDisplay _eglDisplay;
81 EGLSurface _eglSurface;
91 #endif // __blip_RenderingContext_hpp
uint_t getHeight() const
Get the height.
Definition: Size.hpp:35
int getScreenHeight() const
Get the height of the screen, in pixels.
Definition: RenderingContext.hpp:53
A rectangular size that has a width and a height.
Definition: Size.hpp:13
void makeCurrent()
Bind this rendering context to the native window.
Definition: RenderingContext.cpp:127
int getScreenWidth() const
Get the width of the screen, in pixels.
Definition: RenderingContext.hpp:49
const Size & getScreenSize() const
Get the size of the screen, in pixels.
Definition: RenderingContext.hpp:57
uint_t getWidth() const
Get the width.
Definition: Size.hpp:27
bool isValid() const
Test if this rendering context is valid.
Definition: RenderingContext.hpp:69
The native rendering context.
Definition: RenderingContext.hpp:24
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
An abstract base class for all "native" (C++) Android activities.
Definition: NativeActivity.hpp:71
bool copyBuffer(Pixmap *pixmap)
Copy the EGL surface color buffer to a Pixmap.
Definition: RenderingContext.cpp:143
~RenderingContext()
Destructor.
Definition: RenderingContext.cpp:49
int getGLVersionMajor() const
Get the OpenGL ES major version number.
Definition: RenderingContext.hpp:61
A buffer for two-dimensional pixel data, stored in inverted row order (bottom row first...
Definition: Pixmap.hpp:58
int getGLVersionMinor() const
Get the OpenGL ES minor version number.
Definition: RenderingContext.hpp:65
void swapBuffers()
Post the EGL surface to the native window.
Definition: RenderingContext.cpp:135