lightspark::RenderThread Class Reference

#include <rendering.h>

Inherits lightspark::ITickJob.

Collaboration diagram for lightspark::RenderThread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RenderThread (SystemState *s, ENGINE e, void *param=NULL)
 ~RenderThread ()
void wait ()
void draw ()
float getIdAt (int x, int y)
void glAcquireTempBuffer (number_t xmin, number_t xmax, number_t ymin, number_t ymax)
void glBlitTempBuffer (number_t xmin, number_t xmax, number_t ymin, number_t ymax)
void addResource (GLResource *res)
void removeResource (GLResource *res)
void acquireResourceMutex ()
void releaseResourceMutex ()
void requestInput ()
void requestResize (uint32_t w, uint32_t h)
void pushId ()
void popId ()

Public Attributes

int gpu_program
int blitter_program
GLuint fboId
TextureBuffer dataTex
TextureBuffer mainTex
TextureBuffer tempTex
TextureBuffer inputTex
uint32_t windowWidth
uint32_t windowHeight
bool hasNPOTTextures
GLuint fragmentTexScaleUniform
InteractiveObjectselectedDebug
float currentId
bool materialOverride

Private Member Functions

void commonGLInit (int width, int height)
void commonGLResize (int width, int height)
void commonGLDeinit ()
bool loadShaderPrograms ()
void tick ()

Static Private Member Functions

static void * sdl_worker (RenderThread *)

Private Attributes

SystemStatem_sys
pthread_t t
bool terminated
sem_t render
sem_t inputDone
bool inputNeeded
bool inputDisabled
std::string fontPath
bool resizeNeeded
uint32_t newWidth
uint32_t newHeight
float scaleX
float scaleY
int offsetX
int offsetY
Display * mDisplay
GLXFBConfig mFBConfig
GLXContext mContext
Window mWindow
uint64_t time_s
uint64_t time_d
uint32_t * interactive_buffer
bool tempBufferAcquired
int frameCount
int secsCount
std::vector< float > idStack
Mutex mutexResources
std::set< GLResource * > managedResources

Detailed Description

Definition at line 28 of file rendering.h.


Constructor & Destructor Documentation

RenderThread::RenderThread ( SystemState s,
ENGINE  e,
void *  param = NULL 
)

Definition at line 52 of file rendering.cpp.

RenderThread::~RenderThread (  ) 

Definition at line 100 of file rendering.cpp.


Member Function Documentation

void RenderThread::acquireResourceMutex (  ) 

Acquire the resource mutex to do resource cleanup

Definition at line 119 of file rendering.cpp.

void RenderThread::addResource ( GLResource res  ) 

Add a GLResource to the managed pool

Parameters:
res The GLResource to be manged
Precondition:
running inside the renderthread OR the resourceMutex is acquired

Definition at line 109 of file rendering.cpp.

void RenderThread::commonGLDeinit (  )  [private]

Definition at line 497 of file rendering.cpp.

void RenderThread::commonGLInit ( int  width,
int  height 
) [private]

Definition at line 507 of file rendering.cpp.

void RenderThread::commonGLResize ( int  width,
int  height 
) [private]

Definition at line 591 of file rendering.cpp.

void RenderThread::draw (  ) 

Definition at line 901 of file rendering.cpp.

float RenderThread::getIdAt ( int  x,
int  y 
)

Definition at line 490 of file rendering.cpp.

void RenderThread::glAcquireTempBuffer ( number_t  xmin,
number_t  xmax,
number_t  ymin,
number_t  ymax 
)

Definition at line 136 of file rendering.cpp.

void RenderThread::glBlitTempBuffer ( number_t  xmin,
number_t  xmax,
number_t  ymin,
number_t  ymax 
)

Definition at line 154 of file rendering.cpp.

bool RenderThread::loadShaderPrograms (  )  [private]

Definition at line 418 of file rendering.cpp.

void lightspark::RenderThread::popId (  )  [inline]

Definition at line 108 of file rendering.h.

void lightspark::RenderThread::pushId (  )  [inline]

Definition at line 104 of file rendering.h.

void RenderThread::releaseResourceMutex (  ) 

Release the resource mutex

Definition at line 124 of file rendering.cpp.

void RenderThread::removeResource ( GLResource res  ) 

Remove a GLResource from the managed pool

Parameters:
res The GLResource to stop managing
Precondition:
running inside the renderthread OR the resourceMutex is acquired

Definition at line 114 of file rendering.cpp.

void RenderThread::requestInput (  ) 

Definition at line 129 of file rendering.cpp.

void RenderThread::requestResize ( uint32_t  w,
uint32_t  h 
)

Definition at line 681 of file rendering.cpp.

void * RenderThread::sdl_worker ( RenderThread th  )  [static, private]

Definition at line 689 of file rendering.cpp.

void RenderThread::tick (  )  [private, virtual]

Implements lightspark::ITickJob.

Definition at line 917 of file rendering.cpp.

void RenderThread::wait (  ) 

Definition at line 41 of file rendering.cpp.


Member Data Documentation

Definition at line 116 of file rendering.h.

Definition at line 128 of file rendering.h.

Definition at line 118 of file rendering.h.

Definition at line 117 of file rendering.h.

std::string lightspark::RenderThread::fontPath [private]

Definition at line 46 of file rendering.h.

Definition at line 125 of file rendering.h.

Definition at line 67 of file rendering.h.

Definition at line 115 of file rendering.h.

Definition at line 124 of file rendering.h.

std::vector<float> lightspark::RenderThread::idStack [private]

Definition at line 69 of file rendering.h.

Definition at line 45 of file rendering.h.

Definition at line 43 of file rendering.h.

Definition at line 44 of file rendering.h.

Definition at line 121 of file rendering.h.

Definition at line 64 of file rendering.h.

Definition at line 31 of file rendering.h.

Definition at line 119 of file rendering.h.

Definition at line 71 of file rendering.h.

Definition at line 129 of file rendering.h.

GLXContext lightspark::RenderThread::mContext [private]

Definition at line 58 of file rendering.h.

Definition at line 56 of file rendering.h.

GLXFBConfig lightspark::RenderThread::mFBConfig [private]

Definition at line 57 of file rendering.h.

Definition at line 70 of file rendering.h.

Definition at line 59 of file rendering.h.

Definition at line 49 of file rendering.h.

Definition at line 48 of file rendering.h.

Definition at line 52 of file rendering.h.

Definition at line 53 of file rendering.h.

Definition at line 42 of file rendering.h.

Definition at line 47 of file rendering.h.

Definition at line 50 of file rendering.h.

Definition at line 51 of file rendering.h.

Definition at line 68 of file rendering.h.

Definition at line 127 of file rendering.h.

pthread_t lightspark::RenderThread::t [private]

Definition at line 32 of file rendering.h.

Definition at line 65 of file rendering.h.

Definition at line 120 of file rendering.h.

Definition at line 33 of file rendering.h.

Definition at line 61 of file rendering.h.

Definition at line 61 of file rendering.h.

Definition at line 123 of file rendering.h.

Definition at line 122 of file rendering.h.


The documentation for this class was generated from the following files:
Generated on Tue Aug 24 19:50:37 2010 for Lightspark by  doxygen 1.6.3