blob: 4e672c6815042d7077fd7ea707ddc59976bc2fb7 [file] [log] [blame]
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#include <string.h>
#include "gl_opcodes.h"
#include "gl_enc.h"
#include <vector>
#include <stdio.h>
namespace {
void enc_unsupported()
{
ALOGE("Function is unsupported\n");
}
void glAlphaFunc_enc(void *self , GLenum func, GLclampf ref)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glAlphaFunc;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &func, 4); ptr += 4;
memcpy(ptr, &ref, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClearColor_enc(void *self , GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClearColor;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &red, 4); ptr += 4;
memcpy(ptr, &green, 4); ptr += 4;
memcpy(ptr, &blue, 4); ptr += 4;
memcpy(ptr, &alpha, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClearDepthf_enc(void *self , GLclampf depth)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClearDepthf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &depth, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClipPlanef_enc(void *self , GLenum plane, const GLfloat* equation)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_equation = (4 * sizeof(float));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_equation + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClipPlanef;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &plane, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_equation; ptr += 4;
memcpy(ptr, equation, __size_equation);ptr += __size_equation;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glColor4f_enc(void *self , GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glColor4f;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &red, 4); ptr += 4;
memcpy(ptr, &green, 4); ptr += 4;
memcpy(ptr, &blue, 4); ptr += 4;
memcpy(ptr, &alpha, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDepthRangef_enc(void *self , GLclampf zNear, GLclampf zFar)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDepthRangef;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &zNear, 4); ptr += 4;
memcpy(ptr, &zFar, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFogf_enc(void *self , GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFogf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFogfv_enc(void *self , GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFogfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFrustumf_enc(void *self , GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFrustumf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &left, 4); ptr += 4;
memcpy(ptr, &right, 4); ptr += 4;
memcpy(ptr, &bottom, 4); ptr += 4;
memcpy(ptr, &top, 4); ptr += 4;
memcpy(ptr, &zNear, 4); ptr += 4;
memcpy(ptr, &zFar, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glGetClipPlanef_enc(void *self , GLenum pname, GLfloat* eqn)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_eqn = (4 * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 0 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glGetClipPlanef;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_eqn; ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
stream->readback(eqn, __size_eqn);
if (useChecksum) checksumCalculator->addBuffer(eqn, __size_eqn);
if (useChecksum) {
unsigned char *checksumBufPtr = NULL;
unsigned char checksumBuf[ChecksumCalculator::kMaxChecksumSize];
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
ALOGE("glGetClipPlanef: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
}
void glGetFloatv_enc(void *self , GLenum pname, GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 0 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glGetFloatv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
stream->readback(params, __size_params);
if (useChecksum) checksumCalculator->addBuffer(params, __size_params);
if (useChecksum) {
unsigned char *checksumBufPtr = NULL;
unsigned char checksumBuf[ChecksumCalculator::kMaxChecksumSize];
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
ALOGE("glGetFloatv: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
}
void glGetLightfv_enc(void *self , GLenum light, GLenum pname, GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 0 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glGetLightfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &light, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
stream->readback(params, __size_params);
if (useChecksum) checksumCalculator->addBuffer(params, __size_params);
if (useChecksum) {
unsigned char *checksumBufPtr = NULL;
unsigned char checksumBuf[ChecksumCalculator::kMaxChecksumSize];
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
ALOGE("glGetLightfv: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
}
void glGetMaterialfv_enc(void *self , GLenum face, GLenum pname, GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 0 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glGetMaterialfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &face, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
stream->readback(params, __size_params);
if (useChecksum) checksumCalculator->addBuffer(params, __size_params);
if (useChecksum) {
unsigned char *checksumBufPtr = NULL;
unsigned char checksumBuf[ChecksumCalculator::kMaxChecksumSize];
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
ALOGE("glGetMaterialfv: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
}
void glGetTexEnvfv_enc(void *self , GLenum env, GLenum pname, GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 0 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glGetTexEnvfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &env, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
stream->readback(params, __size_params);
if (useChecksum) checksumCalculator->addBuffer(params, __size_params);
if (useChecksum) {
unsigned char *checksumBufPtr = NULL;
unsigned char checksumBuf[ChecksumCalculator::kMaxChecksumSize];
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
ALOGE("glGetTexEnvfv: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
}
void glGetTexParameterfv_enc(void *self , GLenum target, GLenum pname, GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 0 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glGetTexParameterfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
stream->readback(params, __size_params);
if (useChecksum) checksumCalculator->addBuffer(params, __size_params);
if (useChecksum) {
unsigned char *checksumBufPtr = NULL;
unsigned char checksumBuf[ChecksumCalculator::kMaxChecksumSize];
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
ALOGE("glGetTexParameterfv: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
}
void glLightModelf_enc(void *self , GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glLightModelf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glLightModelfv_enc(void *self , GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glLightModelfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glLightf_enc(void *self , GLenum light, GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glLightf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &light, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glLightfv_enc(void *self , GLenum light, GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glLightfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &light, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glLineWidth_enc(void *self , GLfloat width)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glLineWidth;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &width, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glLoadMatrixf_enc(void *self , const GLfloat* m)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_m = (16 * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + __size_m + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glLoadMatrixf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_m; ptr += 4;
memcpy(ptr, m, __size_m);ptr += __size_m;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glMaterialf_enc(void *self , GLenum face, GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glMaterialf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &face, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glMaterialfv_enc(void *self , GLenum face, GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glMaterialfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &face, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glMultMatrixf_enc(void *self , const GLfloat* m)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_m = (16 * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + __size_m + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glMultMatrixf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_m; ptr += 4;
memcpy(ptr, m, __size_m);ptr += __size_m;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glMultiTexCoord4f_enc(void *self , GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glMultiTexCoord4f;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &s, 4); ptr += 4;
memcpy(ptr, &t, 4); ptr += 4;
memcpy(ptr, &r, 4); ptr += 4;
memcpy(ptr, &q, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glNormal3f_enc(void *self , GLfloat nx, GLfloat ny, GLfloat nz)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glNormal3f;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &nx, 4); ptr += 4;
memcpy(ptr, &ny, 4); ptr += 4;
memcpy(ptr, &nz, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glOrthof_enc(void *self , GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glOrthof;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &left, 4); ptr += 4;
memcpy(ptr, &right, 4); ptr += 4;
memcpy(ptr, &bottom, 4); ptr += 4;
memcpy(ptr, &top, 4); ptr += 4;
memcpy(ptr, &zNear, 4); ptr += 4;
memcpy(ptr, &zFar, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glPointParameterf_enc(void *self , GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glPointParameterf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glPointParameterfv_enc(void *self , GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glPointParameterfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glPointSize_enc(void *self , GLfloat size)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glPointSize;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &size, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glPolygonOffset_enc(void *self , GLfloat factor, GLfloat units)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glPolygonOffset;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &factor, 4); ptr += 4;
memcpy(ptr, &units, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glRotatef_enc(void *self , GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glRotatef;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &angle, 4); ptr += 4;
memcpy(ptr, &x, 4); ptr += 4;
memcpy(ptr, &y, 4); ptr += 4;
memcpy(ptr, &z, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glScalef_enc(void *self , GLfloat x, GLfloat y, GLfloat z)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glScalef;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &x, 4); ptr += 4;
memcpy(ptr, &y, 4); ptr += 4;
memcpy(ptr, &z, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glTexEnvf_enc(void *self , GLenum target, GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glTexEnvf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glTexEnvfv_enc(void *self , GLenum target, GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glTexEnvfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glTexParameterf_enc(void *self , GLenum target, GLenum pname, GLfloat param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glTexParameterf;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glTexParameterfv_enc(void *self , GLenum target, GLenum pname, const GLfloat* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfloat));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glTexParameterfv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glTranslatef_enc(void *self , GLfloat x, GLfloat y, GLfloat z)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glTranslatef;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &x, 4); ptr += 4;
memcpy(ptr, &y, 4); ptr += 4;
memcpy(ptr, &z, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glActiveTexture_enc(void *self , GLenum texture)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glActiveTexture;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &texture, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glAlphaFuncx_enc(void *self , GLenum func, GLclampx ref)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glAlphaFuncx;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &func, 4); ptr += 4;
memcpy(ptr, &ref, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glBindBuffer_enc(void *self , GLenum target, GLuint buffer)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glBindBuffer;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &buffer, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glBindTexture_enc(void *self , GLenum target, GLuint texture)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glBindTexture;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &texture, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glBlendFunc_enc(void *self , GLenum sfactor, GLenum dfactor)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glBlendFunc;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &sfactor, 4); ptr += 4;
memcpy(ptr, &dfactor, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glBufferData_enc(void *self , GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_data = ((data != NULL) ? size : 0);
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + __size_data + 4 + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glBufferData;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &size, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_data; ptr += 4;
if (data != NULL) memcpy(ptr, data, __size_data);ptr += __size_data;
memcpy(ptr, &usage, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glBufferSubData_enc(void *self , GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_data = ((data != NULL) ? size : 0);
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + __size_data + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glBufferSubData;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &offset, 4); ptr += 4;
memcpy(ptr, &size, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_data; ptr += 4;
if (data != NULL) memcpy(ptr, data, __size_data);ptr += __size_data;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClear_enc(void *self , GLbitfield mask)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClear;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &mask, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClearColorx_enc(void *self , GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClearColorx;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &red, 4); ptr += 4;
memcpy(ptr, &green, 4); ptr += 4;
memcpy(ptr, &blue, 4); ptr += 4;
memcpy(ptr, &alpha, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClearDepthx_enc(void *self , GLclampx depth)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClearDepthx;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &depth, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClearStencil_enc(void *self , GLint s)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClearStencil;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &s, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glClientActiveTexture_enc(void *self , GLenum texture)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glClientActiveTexture;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &texture, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glColor4ub_enc(void *self , GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 1 + 1 + 1 + 1;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glColor4ub;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &red, 1); ptr += 1;
memcpy(ptr, &green, 1); ptr += 1;
memcpy(ptr, &blue, 1); ptr += 1;
memcpy(ptr, &alpha, 1); ptr += 1;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glColor4x_enc(void *self , GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glColor4x;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &red, 4); ptr += 4;
memcpy(ptr, &green, 4); ptr += 4;
memcpy(ptr, &blue, 4); ptr += 4;
memcpy(ptr, &alpha, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glColorMask_enc(void *self , GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 1 + 1 + 1 + 1;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glColorMask;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &red, 1); ptr += 1;
memcpy(ptr, &green, 1); ptr += 1;
memcpy(ptr, &blue, 1); ptr += 1;
memcpy(ptr, &alpha, 1); ptr += 1;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glCompressedTexImage2D_enc(void *self , GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_data = ((data != NULL) ? imageSize : 0);
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + __size_data + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glCompressedTexImage2D;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &level, 4); ptr += 4;
memcpy(ptr, &internalformat, 4); ptr += 4;
memcpy(ptr, &width, 4); ptr += 4;
memcpy(ptr, &height, 4); ptr += 4;
memcpy(ptr, &border, 4); ptr += 4;
memcpy(ptr, &imageSize, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_data; ptr += 4;
if (data != NULL) memcpy(ptr, data, __size_data);ptr += __size_data;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glCompressedTexSubImage2D_enc(void *self , GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_data = ((data != NULL) ? imageSize : 0);
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + __size_data + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glCompressedTexSubImage2D;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &level, 4); ptr += 4;
memcpy(ptr, &xoffset, 4); ptr += 4;
memcpy(ptr, &yoffset, 4); ptr += 4;
memcpy(ptr, &width, 4); ptr += 4;
memcpy(ptr, &height, 4); ptr += 4;
memcpy(ptr, &format, 4); ptr += 4;
memcpy(ptr, &imageSize, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_data; ptr += 4;
if (data != NULL) memcpy(ptr, data, __size_data);ptr += __size_data;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glCopyTexImage2D_enc(void *self , GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glCopyTexImage2D;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &level, 4); ptr += 4;
memcpy(ptr, &internalformat, 4); ptr += 4;
memcpy(ptr, &x, 4); ptr += 4;
memcpy(ptr, &y, 4); ptr += 4;
memcpy(ptr, &width, 4); ptr += 4;
memcpy(ptr, &height, 4); ptr += 4;
memcpy(ptr, &border, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glCopyTexSubImage2D_enc(void *self , GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glCopyTexSubImage2D;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &target, 4); ptr += 4;
memcpy(ptr, &level, 4); ptr += 4;
memcpy(ptr, &xoffset, 4); ptr += 4;
memcpy(ptr, &yoffset, 4); ptr += 4;
memcpy(ptr, &x, 4); ptr += 4;
memcpy(ptr, &y, 4); ptr += 4;
memcpy(ptr, &width, 4); ptr += 4;
memcpy(ptr, &height, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glCullFace_enc(void *self , GLenum mode)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glCullFace;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &mode, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDeleteBuffers_enc(void *self , GLsizei n, const GLuint* buffers)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_buffers = (n * sizeof(GLuint));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_buffers + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDeleteBuffers;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &n, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_buffers; ptr += 4;
memcpy(ptr, buffers, __size_buffers);ptr += __size_buffers;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDeleteTextures_enc(void *self , GLsizei n, const GLuint* textures)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_textures = (n * sizeof(GLuint));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_textures + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDeleteTextures;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &n, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_textures; ptr += 4;
memcpy(ptr, textures, __size_textures);ptr += __size_textures;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDepthFunc_enc(void *self , GLenum func)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDepthFunc;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &func, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDepthMask_enc(void *self , GLboolean flag)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 1;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDepthMask;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &flag, 1); ptr += 1;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDepthRangex_enc(void *self , GLclampx zNear, GLclampx zFar)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDepthRangex;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &zNear, 4); ptr += 4;
memcpy(ptr, &zFar, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDisable_enc(void *self , GLenum cap)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDisable;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &cap, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDisableClientState_enc(void *self , GLenum array)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDisableClientState;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &array, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glDrawArrays_enc(void *self , GLenum mode, GLint first, GLsizei count)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glDrawArrays;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &mode, 4); ptr += 4;
memcpy(ptr, &first, 4); ptr += 4;
memcpy(ptr, &count, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glEnable_enc(void *self , GLenum cap)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glEnable;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &cap, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glEnableClientState_enc(void *self , GLenum array)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glEnableClientState;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &array, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFinish_enc(void *self )
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFinish;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFlush_enc(void *self )
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFlush;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFogx_enc(void *self , GLenum pname, GLfixed param)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFogx;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
memcpy(ptr, &param, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFogxv_enc(void *self , GLenum pname, const GLfixed* params)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
const unsigned int __size_params = (glUtilsParamSize(pname) * sizeof(GLfixed));
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + __size_params + 1*4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFogxv;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &pname, 4); ptr += 4;
*(unsigned int *)(ptr) = __size_params; ptr += 4;
memcpy(ptr, params, __size_params);ptr += __size_params;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFrontFace_enc(void *self , GLenum mode)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
int tmp = OP_glFrontFace;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
memcpy(ptr, &mode, 4); ptr += 4;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
if (useChecksum) checksumCalculator->writeChecksum(ptr, checksumSize); ptr += checksumSize;
}
void glFrustumx_enc(void *self , GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
{
gl_encoder_context_t *ctx = (gl_encoder_context_t *)self;
IOStream *stream = ctx->m_stream;
ChecksumCalculator *checksumCalculator = ctx->m_checksumCalculator;
bool useChecksum = checksumCalculator->getVersion() > 0;
unsigned char *ptr;
unsigned char *buf;
const size_t sizeWithoutChecksum = 8 + 4 + 4 + 4 + 4 + 4 + 4;
const size_t checksumSize = checksumCalculator->checksumByteSize();
const size_t totalSize