emulator opengl : unit-test renderer GLESv2
Make the unit test renderer (ut_renderer) encode GLESv2 commands. A rendering thread has both V1 & V2 decoder object, and tryies to decode commands of the two protocols from the stream. Context creating is taking into account the API version and creates context accordingly. Decoder data is shared between the V1 & V2 decoders and applied to both of them on makeCurrent (regardless to the requested context version) Change-Id: If78e84310e5dcd22108c19656051b138b22e3c9f
This commit is contained in:
committed by
David 'Digit' Turner
parent
25af30c464
commit
0c01f32aa2
@@ -312,6 +312,8 @@ void *RenderingThread::thread()
|
||||
m_glDisableClientState = m_glDec.set_glDisableClientState(s_glDisableClientState);
|
||||
#endif
|
||||
|
||||
m_gl2Dec.initGL();
|
||||
|
||||
m_utDec.set_swapBuffers(s_swapBuffers);
|
||||
m_utDec.set_createContext(s_createContext);
|
||||
m_utDec.set_destroyContext(s_destroyContext);
|
||||
@@ -359,6 +361,14 @@ void *RenderingThread::thread()
|
||||
}
|
||||
}
|
||||
|
||||
if (readBuf.validData() >= 8) {
|
||||
size_t last = m_gl2Dec.decode(readBuf.buf(), readBuf.validData(), m_stream);
|
||||
if (last > 0) {
|
||||
readBuf.consume(last);
|
||||
progress = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (readBuf.validData() >= 8) {
|
||||
size_t last = m_utDec.decode(readBuf.buf(), readBuf.validData(), m_stream);
|
||||
if (last > 0) {
|
||||
|
||||
Reference in New Issue
Block a user