blip  0.1
RenderingContext Class Reference

The native rendering context. More...

#include <RenderingContext.hpp>

Public Member Functions

 ~RenderingContext ()
 Destructor. More...
 
void makeCurrent ()
 Bind this rendering context to the native window. More...
 
void swapBuffers ()
 Post the EGL surface to the native window. More...
 
bool copyBuffer (Pixmap *pixmap)
 Copy the EGL surface color buffer to a Pixmap. More...
 
int getScreenWidth () const
 Get the width of the screen, in pixels. More...
 
int getScreenHeight () const
 Get the height of the screen, in pixels. More...
 
const SizegetScreenSize () const
 Get the size of the screen, in pixels. More...
 
int getGLVersionMajor () const
 Get the OpenGL ES major version number. More...
 
int getGLVersionMinor () const
 Get the OpenGL ES minor version number. More...
 
bool isValid () const
 Test if this rendering context is valid. More...
 

Detailed Description

The native rendering context.

An instance of this class is automatically initialized by NativeActivity once the activity's native window has been created, and automatically destroyed when the native window is destroyed. This instance may be obtained by calling NativeActivity::getRenderingContext().

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ~RenderingContext()

Destructor.

Member Function Documentation

◆ copyBuffer()

bool copyBuffer ( Pixmap pixmap)

Copy the EGL surface color buffer to a Pixmap.

This is a wrapper around eglCopyBuffers().

◆ getGLVersionMajor()

int getGLVersionMajor ( ) const
inline

Get the OpenGL ES major version number.

◆ getGLVersionMinor()

int getGLVersionMinor ( ) const
inline

Get the OpenGL ES minor version number.

◆ getScreenHeight()

int getScreenHeight ( ) const
inline

Get the height of the screen, in pixels.

◆ getScreenSize()

const Size& getScreenSize ( ) const
inline

Get the size of the screen, in pixels.

◆ getScreenWidth()

int getScreenWidth ( ) const
inline

Get the width of the screen, in pixels.

◆ isValid()

bool isValid ( ) const
inline

Test if this rendering context is valid.

◆ makeCurrent()

void makeCurrent ( )

Bind this rendering context to the native window.

This is simply a wrapper around eglMakeCurrent().

◆ swapBuffers()

void swapBuffers ( )

Post the EGL surface to the native window.

This is simply a wrapper around eglSwapBuffers().


The documentation for this class was generated from the following files: