emulator: opengl: Add custom_write optimization to encoder.

This patch allows an auto-generated GLES encoder function to write
'isLarge' buffers with a custom writer, instead of calling stream->readFully()
directly.

This is intended to allow writing pixel or vertex data that is stored
with a specific stride.

Another patch will introduce the corresponding changes to the .attrib files

Change-Id: I6ca86b968cd3f4db91676bc485ee1e84419e50e0
This commit is contained in:
David 'Digit' Turner
2011-09-20 15:19:42 +02:00
parent 5d7f0875e9
commit 894a63dd6e
5 changed files with 59 additions and 5 deletions

View File

@@ -51,6 +51,9 @@ extern "C" {
void glUtilsPackPointerData(unsigned char *dst, unsigned char *str,
int size, GLenum type, unsigned int stride,
unsigned int datalen);
void glUtilsWritePackPointerData(void* stream, unsigned char *src,
int size, GLenum type, unsigned int stride,
unsigned int datalen);
int glUtilsPixelBitSize(GLenum format, GLenum type);
void glUtilsPackStrings(char *ptr, char **strings, GLint *length, GLsizei count);
int glUtilsCalcShaderSourceLen(char **strings, GLint *length, GLsizei count);