Valkka  1.6.1
OpenSource Video Management
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
RenderContext Class Reference

Encapsulates data for rendering a single bitmap: vertex array object (VAO), vertex buffer object (VBO), vertice coordinates, transformation matrix, etc. More...

#include <openglthread.h>

Collaboration diagram for RenderContext:
Collaboration graph
[legend]

Public Member Functions

 RenderContext (SlotContext *slot_context, int id, unsigned int z=0)
 Default constructor. More...
 
virtual ~RenderContext ()
 Default virtual destructor. More...
 
int getId () const
 Returns the unique id of this render context.
 
void addRectangle (float left, float right, float top, float bottom)
 
void clearObjects ()
 
void renderTexture ()
 Render the texture.
 
void renderObjects ()
 Render objects overlaying the texture.
 
void render (XWindowAttributes x_window_attr)
 Sets x_window_attr and calls renderTexture and renderObjects.
 
void bindTextures ()
 Associate textures with the shader program. Uses parameters from Shader reference.
 
void bindVars ()
 Upload other data to the GPU (say, transformation matrix). Uses parameters from Shader reference.
 
void bindVarsObj ()
 bindVars for the overlay objects. Uses previously calculated value of RenderContext::transform
 
void bindVertexArray ()
 Bind the vertex array and draw.
 

Public Attributes

RenderContext(const RenderContext &f) ban_copy_asm (RenderContext)
 
SlotContextslot_context
 Knows relevant Shader and YUVTEX.
 
const unsigned int z
 Stacking order.
 
int id
 A unique id identifying this render context.
 
XWindowAttributes x_window_attr
 X window size, etc.
 

Private Member Functions

void activate ()
 Init VAO, VBO, etc.
 

Private Attributes

GLuint VAO
 id of the vertex array object
 
GLuint VBO
 id of the vertex buffer object
 
GLuint EBO
 id of the element buffer object
 
std::array< GLfloat, 16 > transform
 data of the transformation matrix
 
std::array< GLfloat, 20 > vertices
 data of the vertex buffer object
 
std::array< GLuint, 6 > indices
 data of the element buffer object
 
long int render_mstime
 
long int render_mstime_old
 
std::list< OverlayObject * > overlays
 

Detailed Description

Encapsulates data for rendering a single bitmap: vertex array object (VAO), vertex buffer object (VBO), vertice coordinates, transformation matrix, etc.

Constructor & Destructor Documentation

◆ RenderContext()

RenderContext::RenderContext ( SlotContext slot_context,
int  id,
unsigned int  z = 0 
)

Default constructor.

Parameters
slot_contextA reference to a SlotContext instance
zStacking order (for "video-in-video")
Here is the call graph for this function:

◆ ~RenderContext()

RenderContext::~RenderContext ( )
virtual

Default virtual destructor.


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