Import goldfish HAL sources from devices/generic/goldfish

We import all code here so we can customize and keep in sync with what
we do on the host side more easily.
This commit is contained in:
Simon Fels 2017-01-09 08:05:04 +01:00
commit 23392b9732
196 changed files with 62159 additions and 0 deletions

View file

@ -0,0 +1,12 @@
LOCAL_PATH := $(call my-dir)
### GLESv1 implementation ###########################################
$(call emugl-begin-shared-library,libGLESv1_CM_emulation)
$(call emugl-import,libOpenglSystemCommon libGLESv1_enc lib_renderControl_enc)
LOCAL_CFLAGS += -DLOG_TAG=\"GLES_emulation\" -DGL_GLEXT_PROTOTYPES
LOCAL_SRC_FILES := gl.cpp
LOCAL_MODULE_RELATIVE_PATH := egl
$(call emugl-end-module)

View file

@ -0,0 +1,165 @@
/*
* Copyright 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "EGLClientIface.h"
#include "HostConnection.h"
#include "GLEncoder.h"
#include "GLES/gl.h"
#include "GLES/glext.h"
#include "ErrorLog.h"
#include "gralloc_cb.h"
#include "ThreadInfo.h"
#include "EGLImage.h"
//XXX: fix this macro to get the context from fast tls path
#define GET_CONTEXT GLEncoder * ctx = getEGLThreadInfo()->hostConn->glEncoder();
#include "gl_entry.cpp"
//The functions table
#include "gl_ftable.h"
static EGLClient_eglInterface * s_egl = NULL;
static EGLClient_glesInterface * s_gl = NULL;
#define DEFINE_AND_VALIDATE_HOST_CONNECTION(ret) \
HostConnection *hostCon = HostConnection::get(); \
if (!hostCon) { \
ALOGE("egl: Failed to get host connection\n"); \
return ret; \
} \
renderControl_encoder_context_t *rcEnc = hostCon->rcEncoder(); \
if (!rcEnc) { \
ALOGE("egl: Failed to get renderControl encoder context\n"); \
return ret; \
}
//GL extensions
void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES img)
{
(void)self;
DBG("glEGLImageTargetTexture2DOES v1 target=%#x img=%p", target, img);
EGLImage_t *image = (EGLImage_t*)img;
if (image->target == EGL_NATIVE_BUFFER_ANDROID) {
//TODO: check error - we don't have a way to set gl error
android_native_buffer_t* native_buffer = image->native_buffer;
if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) {
return;
}
if (native_buffer->common.version != sizeof(android_native_buffer_t)) {
return;
}
GET_CONTEXT;
DEFINE_AND_VALIDATE_HOST_CONNECTION();
ctx->override2DTextureTarget(target);
rcEnc->rcBindTexture(rcEnc,
((cb_handle_t *)(native_buffer->handle))->hostHandle);
ctx->restore2DTextureTarget();
}
else if (image->target == EGL_GL_TEXTURE_2D_KHR) {
GET_CONTEXT;
ctx->override2DTextureTarget(target);
GLeglImageOES hostImage = reinterpret_cast<GLeglImageOES>((intptr_t)image->host_egl_image);
ctx->m_glEGLImageTargetTexture2DOES_enc(self, target, hostImage);
ctx->restore2DTextureTarget();
}
}
void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES image)
{
(void)self;
(void)target;
DBG("glEGLImageTargetRenderbufferStorageOES v1 target=%#x image=%p",
target, image);
//TODO: check error - we don't have a way to set gl error
android_native_buffer_t* native_buffer = (android_native_buffer_t*)image;
if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) {
return;
}
if (native_buffer->common.version != sizeof(android_native_buffer_t)) {
return;
}
DEFINE_AND_VALIDATE_HOST_CONNECTION();
rcEnc->rcBindRenderbuffer(rcEnc,
((cb_handle_t *)(native_buffer->handle))->hostHandle);
return;
}
void * getProcAddress(const char * procname)
{
// search in GL function table
for (int i=0; i<gl_num_funcs; i++) {
if (!strcmp(gl_funcs_by_name[i].name, procname)) {
return gl_funcs_by_name[i].proc;
}
}
return NULL;
}
void finish()
{
glFinish();
}
const GLubyte *my_glGetString (void *self, GLenum name)
{
(void)self;
if (s_egl) {
return (const GLubyte*)s_egl->getGLString(name);
}
return NULL;
}
void init()
{
GET_CONTEXT;
ctx->m_glEGLImageTargetTexture2DOES_enc = ctx->glEGLImageTargetTexture2DOES;
ctx->glEGLImageTargetTexture2DOES = &glEGLImageTargetTexture2DOES;
ctx->glEGLImageTargetRenderbufferStorageOES = &glEGLImageTargetRenderbufferStorageOES;
ctx->glGetString = &my_glGetString;
}
extern "C" {
EGLClient_glesInterface * init_emul_gles(EGLClient_eglInterface *eglIface)
{
s_egl = eglIface;
if (!s_gl) {
s_gl = new EGLClient_glesInterface();
s_gl->getProcAddress = getProcAddress;
s_gl->finish = finish;
s_gl->init = init;
}
return s_gl;
}
} //extern

View file

@ -0,0 +1,19 @@
LOCAL_PATH := $(call my-dir)
### GLESv1_enc Encoder ###########################################
$(call emugl-begin-shared-library,libGLESv1_enc)
LOCAL_CFLAGS += -DLOG_TAG=\"emuglGLESv1_enc\"
LOCAL_SRC_FILES := \
GLEncoder.cpp \
GLEncoderUtils.cpp \
gl_client_context.cpp \
gl_enc.cpp \
gl_entry.cpp
$(call emugl-import,libOpenglCodecCommon)
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
$(call emugl-export,C_INCLUDES,$(intermediates))
$(call emugl-end-module)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,154 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _GL_ENCODER_H_
#define _GL_ENCODER_H_
#include "gl_enc.h"
#include "GLClientState.h"
#include "GLSharedGroup.h"
#include "FixedBuffer.h"
#include "ChecksumCalculator.h"
class GLEncoder : public gl_encoder_context_t {
public:
GLEncoder(IOStream *stream, ChecksumCalculator* protocol);
virtual ~GLEncoder();
void setClientState(GLClientState *state) {
m_state = state;
}
void setSharedGroup(GLSharedGroupPtr shared) { m_shared = shared; }
void flush() { m_stream->flush(); }
size_t pixelDataSize(GLsizei width, GLsizei height, GLenum format, GLenum type, int pack);
void setInitialized(){ m_initialized = true; };
bool isInitialized(){ return m_initialized; };
virtual void setError(GLenum error){ m_error = error; };
virtual GLenum getError() { return m_error; };
void override2DTextureTarget(GLenum target);
void restore2DTextureTarget();
private:
bool m_initialized;
GLClientState *m_state;
GLSharedGroupPtr m_shared;
GLenum m_error;
FixedBuffer m_fixedBuffer;
GLint *m_compressedTextureFormats;
GLint m_num_compressedTextureFormats;
GLint *getCompressedTextureFormats();
// original functions;
glGetError_client_proc_t m_glGetError_enc;
glGetIntegerv_client_proc_t m_glGetIntegerv_enc;
glGetFloatv_client_proc_t m_glGetFloatv_enc;
glGetFixedv_client_proc_t m_glGetFixedv_enc;
glGetBooleanv_client_proc_t m_glGetBooleanv_enc;
glGetPointerv_client_proc_t m_glGetPointerv_enc;
glPixelStorei_client_proc_t m_glPixelStorei_enc;
glVertexPointer_client_proc_t m_glVertexPointer_enc;
glNormalPointer_client_proc_t m_glNormalPointer_enc;
glColorPointer_client_proc_t m_glColorPointer_enc;
glPointSizePointerOES_client_proc_t m_glPointSizePointerOES_enc;
glTexCoordPointer_client_proc_t m_glTexCoordPointer_enc;
glClientActiveTexture_client_proc_t m_glClientActiveTexture_enc;
glMatrixIndexPointerOES_client_proc_t m_glMatrixIndexPointerOES_enc;
glWeightPointerOES_client_proc_t m_glWeightPointerOES_enc;
glBindBuffer_client_proc_t m_glBindBuffer_enc;
glBufferData_client_proc_t m_glBufferData_enc;
glBufferSubData_client_proc_t m_glBufferSubData_enc;
glDeleteBuffers_client_proc_t m_glDeleteBuffers_enc;
glEnableClientState_client_proc_t m_glEnableClientState_enc;
glDisableClientState_client_proc_t m_glDisableClientState_enc;
glIsEnabled_client_proc_t m_glIsEnabled_enc;
glDrawArrays_client_proc_t m_glDrawArrays_enc;
glDrawElements_client_proc_t m_glDrawElements_enc;
glFlush_client_proc_t m_glFlush_enc;
glActiveTexture_client_proc_t m_glActiveTexture_enc;
glBindTexture_client_proc_t m_glBindTexture_enc;
glDeleteTextures_client_proc_t m_glDeleteTextures_enc;
glDisable_client_proc_t m_glDisable_enc;
glEnable_client_proc_t m_glEnable_enc;
glGetTexParameterfv_client_proc_t m_glGetTexParameterfv_enc;
glGetTexParameteriv_client_proc_t m_glGetTexParameteriv_enc;
glGetTexParameterxv_client_proc_t m_glGetTexParameterxv_enc;
glTexParameterf_client_proc_t m_glTexParameterf_enc;
glTexParameterfv_client_proc_t m_glTexParameterfv_enc;
glTexParameteri_client_proc_t m_glTexParameteri_enc;
glTexParameterx_client_proc_t m_glTexParameterx_enc;
glTexParameteriv_client_proc_t m_glTexParameteriv_enc;
glTexParameterxv_client_proc_t m_glTexParameterxv_enc;
// statics
static GLenum s_glGetError(void * self);
static void s_glGetIntegerv(void *self, GLenum pname, GLint *ptr);
static void s_glGetBooleanv(void *self, GLenum pname, GLboolean *ptr);
static void s_glGetFloatv(void *self, GLenum pname, GLfloat *ptr);
static void s_glGetFixedv(void *self, GLenum pname, GLfixed *ptr);
static void s_glGetPointerv(void *self, GLenum pname, GLvoid **params);
static void s_glFlush(void * self);
static const GLubyte * s_glGetString(void *self, GLenum name);
static void s_glVertexPointer(void *self, int size, GLenum type, GLsizei stride, const void *data);
static void s_glNormalPointer(void *self, GLenum type, GLsizei stride, const void *data);
static void s_glColorPointer(void *self, int size, GLenum type, GLsizei stride, const void *data);
static void s_glPointSizePointerOES(void *self, GLenum type, GLsizei stride, const void *data);
static void s_glClientActiveTexture(void *self, GLenum texture);
static void s_glTexCoordPointer(void *self, int size, GLenum type, GLsizei stride, const void *data);
static void s_glMatrixIndexPointerOES(void *self, int size, GLenum type, GLsizei stride, const void * data);
static void s_glWeightPointerOES(void *self, int size, GLenum type, GLsizei stride, const void * data);
static void s_glDisableClientState(void *self, GLenum state);
static void s_glEnableClientState(void *self, GLenum state);
static GLboolean s_glIsEnabled(void *self, GLenum cap);
static void s_glBindBuffer(void *self, GLenum target, GLuint id);
static void s_glBufferData(void *self, GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
static void s_glBufferSubData(void *self, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
static void s_glDeleteBuffers(void *self, GLsizei n, const GLuint * buffers);
static void s_glDrawArrays(void *self, GLenum mode, GLint first, GLsizei count);
static void s_glDrawElements(void *self, GLenum mode, GLsizei count, GLenum type, const void *indices);
static void s_glPixelStorei(void *self, GLenum param, GLint value);
static void s_glFinish(void *self);
void sendVertexData(unsigned first, unsigned count);
static void s_glActiveTexture(void* self, GLenum texture);
static void s_glBindTexture(void* self, GLenum target, GLuint texture);
static void s_glDeleteTextures(void* self, GLsizei n, const GLuint* textures);
static void s_glDisable(void* self, GLenum cap);
static void s_glEnable(void* self, GLenum cap);
static void s_glGetTexParameterfv(void* self, GLenum target, GLenum pname, GLfloat* params);
static void s_glGetTexParameteriv(void* self, GLenum target, GLenum pname, GLint* params);
static void s_glGetTexParameterxv(void* self, GLenum target, GLenum pname, GLfixed* params);
static void s_glTexParameterf(void* self, GLenum target, GLenum pname, GLfloat param);
static void s_glTexParameterfv(void* self, GLenum target, GLenum pname, const GLfloat* params);
static void s_glTexParameteri(void* self, GLenum target, GLenum pname, GLint param);
static void s_glTexParameterx(void* self, GLenum target, GLenum pname, GLfixed param);
static void s_glTexParameteriv(void* self, GLenum target, GLenum pname, const GLint* params);
static void s_glTexParameterxv(void* self, GLenum target, GLenum pname, const GLfixed* params);
public:
glEGLImageTargetTexture2DOES_client_proc_t m_glEGLImageTargetTexture2DOES_enc;
};
#endif

View file

@ -0,0 +1,28 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include "GLEncoder.h"
namespace glesv1_enc {
size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, GLenum type, int pack)
{
GLEncoder *ctx = (GLEncoder *)self;
return ctx->pixelDataSize(width, height, format, type, pack);
}
} // namespace glesv1_enc

View file

@ -0,0 +1,23 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GL_ENCODER_UTILS_H
#define GL_ENCODER_UTILS_H
namespace glesv1_enc {
size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, GLenum type, int pack);
};
#endif

View file

@ -0,0 +1,306 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#include <string.h>
#include "gl_client_context.h"
#include <stdio.h>
int gl_client_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData)
{
glAlphaFunc = (glAlphaFunc_client_proc_t) getProc("glAlphaFunc", userData);
glClearColor = (glClearColor_client_proc_t) getProc("glClearColor", userData);
glClearDepthf = (glClearDepthf_client_proc_t) getProc("glClearDepthf", userData);
glClipPlanef = (glClipPlanef_client_proc_t) getProc("glClipPlanef", userData);
glColor4f = (glColor4f_client_proc_t) getProc("glColor4f", userData);
glDepthRangef = (glDepthRangef_client_proc_t) getProc("glDepthRangef", userData);
glFogf = (glFogf_client_proc_t) getProc("glFogf", userData);
glFogfv = (glFogfv_client_proc_t) getProc("glFogfv", userData);
glFrustumf = (glFrustumf_client_proc_t) getProc("glFrustumf", userData);
glGetClipPlanef = (glGetClipPlanef_client_proc_t) getProc("glGetClipPlanef", userData);
glGetFloatv = (glGetFloatv_client_proc_t) getProc("glGetFloatv", userData);
glGetLightfv = (glGetLightfv_client_proc_t) getProc("glGetLightfv", userData);
glGetMaterialfv = (glGetMaterialfv_client_proc_t) getProc("glGetMaterialfv", userData);
glGetTexEnvfv = (glGetTexEnvfv_client_proc_t) getProc("glGetTexEnvfv", userData);
glGetTexParameterfv = (glGetTexParameterfv_client_proc_t) getProc("glGetTexParameterfv", userData);
glLightModelf = (glLightModelf_client_proc_t) getProc("glLightModelf", userData);
glLightModelfv = (glLightModelfv_client_proc_t) getProc("glLightModelfv", userData);
glLightf = (glLightf_client_proc_t) getProc("glLightf", userData);
glLightfv = (glLightfv_client_proc_t) getProc("glLightfv", userData);
glLineWidth = (glLineWidth_client_proc_t) getProc("glLineWidth", userData);
glLoadMatrixf = (glLoadMatrixf_client_proc_t) getProc("glLoadMatrixf", userData);
glMaterialf = (glMaterialf_client_proc_t) getProc("glMaterialf", userData);
glMaterialfv = (glMaterialfv_client_proc_t) getProc("glMaterialfv", userData);
glMultMatrixf = (glMultMatrixf_client_proc_t) getProc("glMultMatrixf", userData);
glMultiTexCoord4f = (glMultiTexCoord4f_client_proc_t) getProc("glMultiTexCoord4f", userData);
glNormal3f = (glNormal3f_client_proc_t) getProc("glNormal3f", userData);
glOrthof = (glOrthof_client_proc_t) getProc("glOrthof", userData);
glPointParameterf = (glPointParameterf_client_proc_t) getProc("glPointParameterf", userData);
glPointParameterfv = (glPointParameterfv_client_proc_t) getProc("glPointParameterfv", userData);
glPointSize = (glPointSize_client_proc_t) getProc("glPointSize", userData);
glPolygonOffset = (glPolygonOffset_client_proc_t) getProc("glPolygonOffset", userData);
glRotatef = (glRotatef_client_proc_t) getProc("glRotatef", userData);
glScalef = (glScalef_client_proc_t) getProc("glScalef", userData);
glTexEnvf = (glTexEnvf_client_proc_t) getProc("glTexEnvf", userData);
glTexEnvfv = (glTexEnvfv_client_proc_t) getProc("glTexEnvfv", userData);
glTexParameterf = (glTexParameterf_client_proc_t) getProc("glTexParameterf", userData);
glTexParameterfv = (glTexParameterfv_client_proc_t) getProc("glTexParameterfv", userData);
glTranslatef = (glTranslatef_client_proc_t) getProc("glTranslatef", userData);
glActiveTexture = (glActiveTexture_client_proc_t) getProc("glActiveTexture", userData);
glAlphaFuncx = (glAlphaFuncx_client_proc_t) getProc("glAlphaFuncx", userData);
glBindBuffer = (glBindBuffer_client_proc_t) getProc("glBindBuffer", userData);
glBindTexture = (glBindTexture_client_proc_t) getProc("glBindTexture", userData);
glBlendFunc = (glBlendFunc_client_proc_t) getProc("glBlendFunc", userData);
glBufferData = (glBufferData_client_proc_t) getProc("glBufferData", userData);
glBufferSubData = (glBufferSubData_client_proc_t) getProc("glBufferSubData", userData);
glClear = (glClear_client_proc_t) getProc("glClear", userData);
glClearColorx = (glClearColorx_client_proc_t) getProc("glClearColorx", userData);
glClearDepthx = (glClearDepthx_client_proc_t) getProc("glClearDepthx", userData);
glClearStencil = (glClearStencil_client_proc_t) getProc("glClearStencil", userData);
glClientActiveTexture = (glClientActiveTexture_client_proc_t) getProc("glClientActiveTexture", userData);
glColor4ub = (glColor4ub_client_proc_t) getProc("glColor4ub", userData);
glColor4x = (glColor4x_client_proc_t) getProc("glColor4x", userData);
glColorMask = (glColorMask_client_proc_t) getProc("glColorMask", userData);
glColorPointer = (glColorPointer_client_proc_t) getProc("glColorPointer", userData);
glCompressedTexImage2D = (glCompressedTexImage2D_client_proc_t) getProc("glCompressedTexImage2D", userData);
glCompressedTexSubImage2D = (glCompressedTexSubImage2D_client_proc_t) getProc("glCompressedTexSubImage2D", userData);
glCopyTexImage2D = (glCopyTexImage2D_client_proc_t) getProc("glCopyTexImage2D", userData);
glCopyTexSubImage2D = (glCopyTexSubImage2D_client_proc_t) getProc("glCopyTexSubImage2D", userData);
glCullFace = (glCullFace_client_proc_t) getProc("glCullFace", userData);
glDeleteBuffers = (glDeleteBuffers_client_proc_t) getProc("glDeleteBuffers", userData);
glDeleteTextures = (glDeleteTextures_client_proc_t) getProc("glDeleteTextures", userData);
glDepthFunc = (glDepthFunc_client_proc_t) getProc("glDepthFunc", userData);
glDepthMask = (glDepthMask_client_proc_t) getProc("glDepthMask", userData);
glDepthRangex = (glDepthRangex_client_proc_t) getProc("glDepthRangex", userData);
glDisable = (glDisable_client_proc_t) getProc("glDisable", userData);
glDisableClientState = (glDisableClientState_client_proc_t) getProc("glDisableClientState", userData);
glDrawArrays = (glDrawArrays_client_proc_t) getProc("glDrawArrays", userData);
glDrawElements = (glDrawElements_client_proc_t) getProc("glDrawElements", userData);
glEnable = (glEnable_client_proc_t) getProc("glEnable", userData);
glEnableClientState = (glEnableClientState_client_proc_t) getProc("glEnableClientState", userData);
glFinish = (glFinish_client_proc_t) getProc("glFinish", userData);
glFlush = (glFlush_client_proc_t) getProc("glFlush", userData);
glFogx = (glFogx_client_proc_t) getProc("glFogx", userData);
glFogxv = (glFogxv_client_proc_t) getProc("glFogxv", userData);
glFrontFace = (glFrontFace_client_proc_t) getProc("glFrontFace", userData);
glFrustumx = (glFrustumx_client_proc_t) getProc("glFrustumx", userData);
glGetBooleanv = (glGetBooleanv_client_proc_t) getProc("glGetBooleanv", userData);
glGetBufferParameteriv = (glGetBufferParameteriv_client_proc_t) getProc("glGetBufferParameteriv", userData);
glClipPlanex = (glClipPlanex_client_proc_t) getProc("glClipPlanex", userData);
glGenBuffers = (glGenBuffers_client_proc_t) getProc("glGenBuffers", userData);
glGenTextures = (glGenTextures_client_proc_t) getProc("glGenTextures", userData);
glGetError = (glGetError_client_proc_t) getProc("glGetError", userData);
glGetFixedv = (glGetFixedv_client_proc_t) getProc("glGetFixedv", userData);
glGetIntegerv = (glGetIntegerv_client_proc_t) getProc("glGetIntegerv", userData);
glGetLightxv = (glGetLightxv_client_proc_t) getProc("glGetLightxv", userData);
glGetMaterialxv = (glGetMaterialxv_client_proc_t) getProc("glGetMaterialxv", userData);
glGetPointerv = (glGetPointerv_client_proc_t) getProc("glGetPointerv", userData);
glGetString = (glGetString_client_proc_t) getProc("glGetString", userData);
glGetTexEnviv = (glGetTexEnviv_client_proc_t) getProc("glGetTexEnviv", userData);
glGetTexEnvxv = (glGetTexEnvxv_client_proc_t) getProc("glGetTexEnvxv", userData);
glGetTexParameteriv = (glGetTexParameteriv_client_proc_t) getProc("glGetTexParameteriv", userData);
glGetTexParameterxv = (glGetTexParameterxv_client_proc_t) getProc("glGetTexParameterxv", userData);
glHint = (glHint_client_proc_t) getProc("glHint", userData);
glIsBuffer = (glIsBuffer_client_proc_t) getProc("glIsBuffer", userData);
glIsEnabled = (glIsEnabled_client_proc_t) getProc("glIsEnabled", userData);
glIsTexture = (glIsTexture_client_proc_t) getProc("glIsTexture", userData);
glLightModelx = (glLightModelx_client_proc_t) getProc("glLightModelx", userData);
glLightModelxv = (glLightModelxv_client_proc_t) getProc("glLightModelxv", userData);
glLightx = (glLightx_client_proc_t) getProc("glLightx", userData);
glLightxv = (glLightxv_client_proc_t) getProc("glLightxv", userData);
glLineWidthx = (glLineWidthx_client_proc_t) getProc("glLineWidthx", userData);
glLoadIdentity = (glLoadIdentity_client_proc_t) getProc("glLoadIdentity", userData);
glLoadMatrixx = (glLoadMatrixx_client_proc_t) getProc("glLoadMatrixx", userData);
glLogicOp = (glLogicOp_client_proc_t) getProc("glLogicOp", userData);
glMaterialx = (glMaterialx_client_proc_t) getProc("glMaterialx", userData);
glMaterialxv = (glMaterialxv_client_proc_t) getProc("glMaterialxv", userData);
glMatrixMode = (glMatrixMode_client_proc_t) getProc("glMatrixMode", userData);
glMultMatrixx = (glMultMatrixx_client_proc_t) getProc("glMultMatrixx", userData);
glMultiTexCoord4x = (glMultiTexCoord4x_client_proc_t) getProc("glMultiTexCoord4x", userData);
glNormal3x = (glNormal3x_client_proc_t) getProc("glNormal3x", userData);
glNormalPointer = (glNormalPointer_client_proc_t) getProc("glNormalPointer", userData);
glOrthox = (glOrthox_client_proc_t) getProc("glOrthox", userData);
glPixelStorei = (glPixelStorei_client_proc_t) getProc("glPixelStorei", userData);
glPointParameterx = (glPointParameterx_client_proc_t) getProc("glPointParameterx", userData);
glPointParameterxv = (glPointParameterxv_client_proc_t) getProc("glPointParameterxv", userData);
glPointSizex = (glPointSizex_client_proc_t) getProc("glPointSizex", userData);
glPolygonOffsetx = (glPolygonOffsetx_client_proc_t) getProc("glPolygonOffsetx", userData);
glPopMatrix = (glPopMatrix_client_proc_t) getProc("glPopMatrix", userData);
glPushMatrix = (glPushMatrix_client_proc_t) getProc("glPushMatrix", userData);
glReadPixels = (glReadPixels_client_proc_t) getProc("glReadPixels", userData);
glRotatex = (glRotatex_client_proc_t) getProc("glRotatex", userData);
glSampleCoverage = (glSampleCoverage_client_proc_t) getProc("glSampleCoverage", userData);
glSampleCoveragex = (glSampleCoveragex_client_proc_t) getProc("glSampleCoveragex", userData);
glScalex = (glScalex_client_proc_t) getProc("glScalex", userData);
glScissor = (glScissor_client_proc_t) getProc("glScissor", userData);
glShadeModel = (glShadeModel_client_proc_t) getProc("glShadeModel", userData);
glStencilFunc = (glStencilFunc_client_proc_t) getProc("glStencilFunc", userData);
glStencilMask = (glStencilMask_client_proc_t) getProc("glStencilMask", userData);
glStencilOp = (glStencilOp_client_proc_t) getProc("glStencilOp", userData);
glTexCoordPointer = (glTexCoordPointer_client_proc_t) getProc("glTexCoordPointer", userData);
glTexEnvi = (glTexEnvi_client_proc_t) getProc("glTexEnvi", userData);
glTexEnvx = (glTexEnvx_client_proc_t) getProc("glTexEnvx", userData);
glTexEnviv = (glTexEnviv_client_proc_t) getProc("glTexEnviv", userData);
glTexEnvxv = (glTexEnvxv_client_proc_t) getProc("glTexEnvxv", userData);
glTexImage2D = (glTexImage2D_client_proc_t) getProc("glTexImage2D", userData);
glTexParameteri = (glTexParameteri_client_proc_t) getProc("glTexParameteri", userData);
glTexParameterx = (glTexParameterx_client_proc_t) getProc("glTexParameterx", userData);
glTexParameteriv = (glTexParameteriv_client_proc_t) getProc("glTexParameteriv", userData);
glTexParameterxv = (glTexParameterxv_client_proc_t) getProc("glTexParameterxv", userData);
glTexSubImage2D = (glTexSubImage2D_client_proc_t) getProc("glTexSubImage2D", userData);
glTranslatex = (glTranslatex_client_proc_t) getProc("glTranslatex", userData);
glVertexPointer = (glVertexPointer_client_proc_t) getProc("glVertexPointer", userData);
glViewport = (glViewport_client_proc_t) getProc("glViewport", userData);
glPointSizePointerOES = (glPointSizePointerOES_client_proc_t) getProc("glPointSizePointerOES", userData);
glVertexPointerOffset = (glVertexPointerOffset_client_proc_t) getProc("glVertexPointerOffset", userData);
glColorPointerOffset = (glColorPointerOffset_client_proc_t) getProc("glColorPointerOffset", userData);
glNormalPointerOffset = (glNormalPointerOffset_client_proc_t) getProc("glNormalPointerOffset", userData);
glPointSizePointerOffset = (glPointSizePointerOffset_client_proc_t) getProc("glPointSizePointerOffset", userData);
glTexCoordPointerOffset = (glTexCoordPointerOffset_client_proc_t) getProc("glTexCoordPointerOffset", userData);
glWeightPointerOffset = (glWeightPointerOffset_client_proc_t) getProc("glWeightPointerOffset", userData);
glMatrixIndexPointerOffset = (glMatrixIndexPointerOffset_client_proc_t) getProc("glMatrixIndexPointerOffset", userData);
glVertexPointerData = (glVertexPointerData_client_proc_t) getProc("glVertexPointerData", userData);
glColorPointerData = (glColorPointerData_client_proc_t) getProc("glColorPointerData", userData);
glNormalPointerData = (glNormalPointerData_client_proc_t) getProc("glNormalPointerData", userData);
glTexCoordPointerData = (glTexCoordPointerData_client_proc_t) getProc("glTexCoordPointerData", userData);
glPointSizePointerData = (glPointSizePointerData_client_proc_t) getProc("glPointSizePointerData", userData);
glWeightPointerData = (glWeightPointerData_client_proc_t) getProc("glWeightPointerData", userData);
glMatrixIndexPointerData = (glMatrixIndexPointerData_client_proc_t) getProc("glMatrixIndexPointerData", userData);
glDrawElementsOffset = (glDrawElementsOffset_client_proc_t) getProc("glDrawElementsOffset", userData);
glDrawElementsData = (glDrawElementsData_client_proc_t) getProc("glDrawElementsData", userData);
glGetCompressedTextureFormats = (glGetCompressedTextureFormats_client_proc_t) getProc("glGetCompressedTextureFormats", userData);
glFinishRoundTrip = (glFinishRoundTrip_client_proc_t) getProc("glFinishRoundTrip", userData);
glBlendEquationSeparateOES = (glBlendEquationSeparateOES_client_proc_t) getProc("glBlendEquationSeparateOES", userData);
glBlendFuncSeparateOES = (glBlendFuncSeparateOES_client_proc_t) getProc("glBlendFuncSeparateOES", userData);
glBlendEquationOES = (glBlendEquationOES_client_proc_t) getProc("glBlendEquationOES", userData);
glDrawTexsOES = (glDrawTexsOES_client_proc_t) getProc("glDrawTexsOES", userData);
glDrawTexiOES = (glDrawTexiOES_client_proc_t) getProc("glDrawTexiOES", userData);
glDrawTexxOES = (glDrawTexxOES_client_proc_t) getProc("glDrawTexxOES", userData);
glDrawTexsvOES = (glDrawTexsvOES_client_proc_t) getProc("glDrawTexsvOES", userData);
glDrawTexivOES = (glDrawTexivOES_client_proc_t) getProc("glDrawTexivOES", userData);
glDrawTexxvOES = (glDrawTexxvOES_client_proc_t) getProc("glDrawTexxvOES", userData);
glDrawTexfOES = (glDrawTexfOES_client_proc_t) getProc("glDrawTexfOES", userData);
glDrawTexfvOES = (glDrawTexfvOES_client_proc_t) getProc("glDrawTexfvOES", userData);
glEGLImageTargetTexture2DOES = (glEGLImageTargetTexture2DOES_client_proc_t) getProc("glEGLImageTargetTexture2DOES", userData);
glEGLImageTargetRenderbufferStorageOES = (glEGLImageTargetRenderbufferStorageOES_client_proc_t) getProc("glEGLImageTargetRenderbufferStorageOES", userData);
glAlphaFuncxOES = (glAlphaFuncxOES_client_proc_t) getProc("glAlphaFuncxOES", userData);
glClearColorxOES = (glClearColorxOES_client_proc_t) getProc("glClearColorxOES", userData);
glClearDepthxOES = (glClearDepthxOES_client_proc_t) getProc("glClearDepthxOES", userData);
glClipPlanexOES = (glClipPlanexOES_client_proc_t) getProc("glClipPlanexOES", userData);
glClipPlanexIMG = (glClipPlanexIMG_client_proc_t) getProc("glClipPlanexIMG", userData);
glColor4xOES = (glColor4xOES_client_proc_t) getProc("glColor4xOES", userData);
glDepthRangexOES = (glDepthRangexOES_client_proc_t) getProc("glDepthRangexOES", userData);
glFogxOES = (glFogxOES_client_proc_t) getProc("glFogxOES", userData);
glFogxvOES = (glFogxvOES_client_proc_t) getProc("glFogxvOES", userData);
glFrustumxOES = (glFrustumxOES_client_proc_t) getProc("glFrustumxOES", userData);
glGetClipPlanexOES = (glGetClipPlanexOES_client_proc_t) getProc("glGetClipPlanexOES", userData);
glGetClipPlanex = (glGetClipPlanex_client_proc_t) getProc("glGetClipPlanex", userData);
glGetFixedvOES = (glGetFixedvOES_client_proc_t) getProc("glGetFixedvOES", userData);
glGetLightxvOES = (glGetLightxvOES_client_proc_t) getProc("glGetLightxvOES", userData);
glGetMaterialxvOES = (glGetMaterialxvOES_client_proc_t) getProc("glGetMaterialxvOES", userData);
glGetTexEnvxvOES = (glGetTexEnvxvOES_client_proc_t) getProc("glGetTexEnvxvOES", userData);
glGetTexParameterxvOES = (glGetTexParameterxvOES_client_proc_t) getProc("glGetTexParameterxvOES", userData);
glLightModelxOES = (glLightModelxOES_client_proc_t) getProc("glLightModelxOES", userData);
glLightModelxvOES = (glLightModelxvOES_client_proc_t) getProc("glLightModelxvOES", userData);
glLightxOES = (glLightxOES_client_proc_t) getProc("glLightxOES", userData);
glLightxvOES = (glLightxvOES_client_proc_t) getProc("glLightxvOES", userData);
glLineWidthxOES = (glLineWidthxOES_client_proc_t) getProc("glLineWidthxOES", userData);
glLoadMatrixxOES = (glLoadMatrixxOES_client_proc_t) getProc("glLoadMatrixxOES", userData);
glMaterialxOES = (glMaterialxOES_client_proc_t) getProc("glMaterialxOES", userData);
glMaterialxvOES = (glMaterialxvOES_client_proc_t) getProc("glMaterialxvOES", userData);
glMultMatrixxOES = (glMultMatrixxOES_client_proc_t) getProc("glMultMatrixxOES", userData);
glMultiTexCoord4xOES = (glMultiTexCoord4xOES_client_proc_t) getProc("glMultiTexCoord4xOES", userData);
glNormal3xOES = (glNormal3xOES_client_proc_t) getProc("glNormal3xOES", userData);
glOrthoxOES = (glOrthoxOES_client_proc_t) getProc("glOrthoxOES", userData);
glPointParameterxOES = (glPointParameterxOES_client_proc_t) getProc("glPointParameterxOES", userData);
glPointParameterxvOES = (glPointParameterxvOES_client_proc_t) getProc("glPointParameterxvOES", userData);
glPointSizexOES = (glPointSizexOES_client_proc_t) getProc("glPointSizexOES", userData);
glPolygonOffsetxOES = (glPolygonOffsetxOES_client_proc_t) getProc("glPolygonOffsetxOES", userData);
glRotatexOES = (glRotatexOES_client_proc_t) getProc("glRotatexOES", userData);
glSampleCoveragexOES = (glSampleCoveragexOES_client_proc_t) getProc("glSampleCoveragexOES", userData);
glScalexOES = (glScalexOES_client_proc_t) getProc("glScalexOES", userData);
glTexEnvxOES = (glTexEnvxOES_client_proc_t) getProc("glTexEnvxOES", userData);
glTexEnvxvOES = (glTexEnvxvOES_client_proc_t) getProc("glTexEnvxvOES", userData);
glTexParameterxOES = (glTexParameterxOES_client_proc_t) getProc("glTexParameterxOES", userData);
glTexParameterxvOES = (glTexParameterxvOES_client_proc_t) getProc("glTexParameterxvOES", userData);
glTranslatexOES = (glTranslatexOES_client_proc_t) getProc("glTranslatexOES", userData);
glIsRenderbufferOES = (glIsRenderbufferOES_client_proc_t) getProc("glIsRenderbufferOES", userData);
glBindRenderbufferOES = (glBindRenderbufferOES_client_proc_t) getProc("glBindRenderbufferOES", userData);
glDeleteRenderbuffersOES = (glDeleteRenderbuffersOES_client_proc_t) getProc("glDeleteRenderbuffersOES", userData);
glGenRenderbuffersOES = (glGenRenderbuffersOES_client_proc_t) getProc("glGenRenderbuffersOES", userData);
glRenderbufferStorageOES = (glRenderbufferStorageOES_client_proc_t) getProc("glRenderbufferStorageOES", userData);
glGetRenderbufferParameterivOES = (glGetRenderbufferParameterivOES_client_proc_t) getProc("glGetRenderbufferParameterivOES", userData);
glIsFramebufferOES = (glIsFramebufferOES_client_proc_t) getProc("glIsFramebufferOES", userData);
glBindFramebufferOES = (glBindFramebufferOES_client_proc_t) getProc("glBindFramebufferOES", userData);
glDeleteFramebuffersOES = (glDeleteFramebuffersOES_client_proc_t) getProc("glDeleteFramebuffersOES", userData);
glGenFramebuffersOES = (glGenFramebuffersOES_client_proc_t) getProc("glGenFramebuffersOES", userData);
glCheckFramebufferStatusOES = (glCheckFramebufferStatusOES_client_proc_t) getProc("glCheckFramebufferStatusOES", userData);
glFramebufferRenderbufferOES = (glFramebufferRenderbufferOES_client_proc_t) getProc("glFramebufferRenderbufferOES", userData);
glFramebufferTexture2DOES = (glFramebufferTexture2DOES_client_proc_t) getProc("glFramebufferTexture2DOES", userData);
glGetFramebufferAttachmentParameterivOES = (glGetFramebufferAttachmentParameterivOES_client_proc_t) getProc("glGetFramebufferAttachmentParameterivOES", userData);
glGenerateMipmapOES = (glGenerateMipmapOES_client_proc_t) getProc("glGenerateMipmapOES", userData);
glMapBufferOES = (glMapBufferOES_client_proc_t) getProc("glMapBufferOES", userData);
glUnmapBufferOES = (glUnmapBufferOES_client_proc_t) getProc("glUnmapBufferOES", userData);
glGetBufferPointervOES = (glGetBufferPointervOES_client_proc_t) getProc("glGetBufferPointervOES", userData);
glCurrentPaletteMatrixOES = (glCurrentPaletteMatrixOES_client_proc_t) getProc("glCurrentPaletteMatrixOES", userData);
glLoadPaletteFromModelViewMatrixOES = (glLoadPaletteFromModelViewMatrixOES_client_proc_t) getProc("glLoadPaletteFromModelViewMatrixOES", userData);
glMatrixIndexPointerOES = (glMatrixIndexPointerOES_client_proc_t) getProc("glMatrixIndexPointerOES", userData);
glWeightPointerOES = (glWeightPointerOES_client_proc_t) getProc("glWeightPointerOES", userData);
glQueryMatrixxOES = (glQueryMatrixxOES_client_proc_t) getProc("glQueryMatrixxOES", userData);
glDepthRangefOES = (glDepthRangefOES_client_proc_t) getProc("glDepthRangefOES", userData);
glFrustumfOES = (glFrustumfOES_client_proc_t) getProc("glFrustumfOES", userData);
glOrthofOES = (glOrthofOES_client_proc_t) getProc("glOrthofOES", userData);
glClipPlanefOES = (glClipPlanefOES_client_proc_t) getProc("glClipPlanefOES", userData);
glClipPlanefIMG = (glClipPlanefIMG_client_proc_t) getProc("glClipPlanefIMG", userData);
glGetClipPlanefOES = (glGetClipPlanefOES_client_proc_t) getProc("glGetClipPlanefOES", userData);
glClearDepthfOES = (glClearDepthfOES_client_proc_t) getProc("glClearDepthfOES", userData);
glTexGenfOES = (glTexGenfOES_client_proc_t) getProc("glTexGenfOES", userData);
glTexGenfvOES = (glTexGenfvOES_client_proc_t) getProc("glTexGenfvOES", userData);
glTexGeniOES = (glTexGeniOES_client_proc_t) getProc("glTexGeniOES", userData);
glTexGenivOES = (glTexGenivOES_client_proc_t) getProc("glTexGenivOES", userData);
glTexGenxOES = (glTexGenxOES_client_proc_t) getProc("glTexGenxOES", userData);
glTexGenxvOES = (glTexGenxvOES_client_proc_t) getProc("glTexGenxvOES", userData);
glGetTexGenfvOES = (glGetTexGenfvOES_client_proc_t) getProc("glGetTexGenfvOES", userData);
glGetTexGenivOES = (glGetTexGenivOES_client_proc_t) getProc("glGetTexGenivOES", userData);
glGetTexGenxvOES = (glGetTexGenxvOES_client_proc_t) getProc("glGetTexGenxvOES", userData);
glBindVertexArrayOES = (glBindVertexArrayOES_client_proc_t) getProc("glBindVertexArrayOES", userData);
glDeleteVertexArraysOES = (glDeleteVertexArraysOES_client_proc_t) getProc("glDeleteVertexArraysOES", userData);
glGenVertexArraysOES = (glGenVertexArraysOES_client_proc_t) getProc("glGenVertexArraysOES", userData);
glIsVertexArrayOES = (glIsVertexArrayOES_client_proc_t) getProc("glIsVertexArrayOES", userData);
glDiscardFramebufferEXT = (glDiscardFramebufferEXT_client_proc_t) getProc("glDiscardFramebufferEXT", userData);
glMultiDrawArraysEXT = (glMultiDrawArraysEXT_client_proc_t) getProc("glMultiDrawArraysEXT", userData);
glMultiDrawElementsEXT = (glMultiDrawElementsEXT_client_proc_t) getProc("glMultiDrawElementsEXT", userData);
glMultiDrawArraysSUN = (glMultiDrawArraysSUN_client_proc_t) getProc("glMultiDrawArraysSUN", userData);
glMultiDrawElementsSUN = (glMultiDrawElementsSUN_client_proc_t) getProc("glMultiDrawElementsSUN", userData);
glRenderbufferStorageMultisampleIMG = (glRenderbufferStorageMultisampleIMG_client_proc_t) getProc("glRenderbufferStorageMultisampleIMG", userData);
glFramebufferTexture2DMultisampleIMG = (glFramebufferTexture2DMultisampleIMG_client_proc_t) getProc("glFramebufferTexture2DMultisampleIMG", userData);
glDeleteFencesNV = (glDeleteFencesNV_client_proc_t) getProc("glDeleteFencesNV", userData);
glGenFencesNV = (glGenFencesNV_client_proc_t) getProc("glGenFencesNV", userData);
glIsFenceNV = (glIsFenceNV_client_proc_t) getProc("glIsFenceNV", userData);
glTestFenceNV = (glTestFenceNV_client_proc_t) getProc("glTestFenceNV", userData);
glGetFenceivNV = (glGetFenceivNV_client_proc_t) getProc("glGetFenceivNV", userData);
glFinishFenceNV = (glFinishFenceNV_client_proc_t) getProc("glFinishFenceNV", userData);
glSetFenceNV = (glSetFenceNV_client_proc_t) getProc("glSetFenceNV", userData);
glGetDriverControlsQCOM = (glGetDriverControlsQCOM_client_proc_t) getProc("glGetDriverControlsQCOM", userData);
glGetDriverControlStringQCOM = (glGetDriverControlStringQCOM_client_proc_t) getProc("glGetDriverControlStringQCOM", userData);
glEnableDriverControlQCOM = (glEnableDriverControlQCOM_client_proc_t) getProc("glEnableDriverControlQCOM", userData);
glDisableDriverControlQCOM = (glDisableDriverControlQCOM_client_proc_t) getProc("glDisableDriverControlQCOM", userData);
glExtGetTexturesQCOM = (glExtGetTexturesQCOM_client_proc_t) getProc("glExtGetTexturesQCOM", userData);
glExtGetBuffersQCOM = (glExtGetBuffersQCOM_client_proc_t) getProc("glExtGetBuffersQCOM", userData);
glExtGetRenderbuffersQCOM = (glExtGetRenderbuffersQCOM_client_proc_t) getProc("glExtGetRenderbuffersQCOM", userData);
glExtGetFramebuffersQCOM = (glExtGetFramebuffersQCOM_client_proc_t) getProc("glExtGetFramebuffersQCOM", userData);
glExtGetTexLevelParameterivQCOM = (glExtGetTexLevelParameterivQCOM_client_proc_t) getProc("glExtGetTexLevelParameterivQCOM", userData);
glExtTexObjectStateOverrideiQCOM = (glExtTexObjectStateOverrideiQCOM_client_proc_t) getProc("glExtTexObjectStateOverrideiQCOM", userData);
glExtGetTexSubImageQCOM = (glExtGetTexSubImageQCOM_client_proc_t) getProc("glExtGetTexSubImageQCOM", userData);
glExtGetBufferPointervQCOM = (glExtGetBufferPointervQCOM_client_proc_t) getProc("glExtGetBufferPointervQCOM", userData);
glExtGetShadersQCOM = (glExtGetShadersQCOM_client_proc_t) getProc("glExtGetShadersQCOM", userData);
glExtGetProgramsQCOM = (glExtGetProgramsQCOM_client_proc_t) getProc("glExtGetProgramsQCOM", userData);
glExtIsProgramBinaryQCOM = (glExtIsProgramBinaryQCOM_client_proc_t) getProc("glExtIsProgramBinaryQCOM", userData);
glExtGetProgramBinarySourceQCOM = (glExtGetProgramBinarySourceQCOM_client_proc_t) getProc("glExtGetProgramBinarySourceQCOM", userData);
glStartTilingQCOM = (glStartTilingQCOM_client_proc_t) getProc("glStartTilingQCOM", userData);
glEndTilingQCOM = (glEndTilingQCOM_client_proc_t) getProc("glEndTilingQCOM", userData);
return 0;
}

View file

@ -0,0 +1,313 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __gl_client_context_t_h
#define __gl_client_context_t_h
#include "gl_client_proc.h"
#include "gl_types.h"
struct gl_client_context_t {
glAlphaFunc_client_proc_t glAlphaFunc;
glClearColor_client_proc_t glClearColor;
glClearDepthf_client_proc_t glClearDepthf;
glClipPlanef_client_proc_t glClipPlanef;
glColor4f_client_proc_t glColor4f;
glDepthRangef_client_proc_t glDepthRangef;
glFogf_client_proc_t glFogf;
glFogfv_client_proc_t glFogfv;
glFrustumf_client_proc_t glFrustumf;
glGetClipPlanef_client_proc_t glGetClipPlanef;
glGetFloatv_client_proc_t glGetFloatv;
glGetLightfv_client_proc_t glGetLightfv;
glGetMaterialfv_client_proc_t glGetMaterialfv;
glGetTexEnvfv_client_proc_t glGetTexEnvfv;
glGetTexParameterfv_client_proc_t glGetTexParameterfv;
glLightModelf_client_proc_t glLightModelf;
glLightModelfv_client_proc_t glLightModelfv;
glLightf_client_proc_t glLightf;
glLightfv_client_proc_t glLightfv;
glLineWidth_client_proc_t glLineWidth;
glLoadMatrixf_client_proc_t glLoadMatrixf;
glMaterialf_client_proc_t glMaterialf;
glMaterialfv_client_proc_t glMaterialfv;
glMultMatrixf_client_proc_t glMultMatrixf;
glMultiTexCoord4f_client_proc_t glMultiTexCoord4f;
glNormal3f_client_proc_t glNormal3f;
glOrthof_client_proc_t glOrthof;
glPointParameterf_client_proc_t glPointParameterf;
glPointParameterfv_client_proc_t glPointParameterfv;
glPointSize_client_proc_t glPointSize;
glPolygonOffset_client_proc_t glPolygonOffset;
glRotatef_client_proc_t glRotatef;
glScalef_client_proc_t glScalef;
glTexEnvf_client_proc_t glTexEnvf;
glTexEnvfv_client_proc_t glTexEnvfv;
glTexParameterf_client_proc_t glTexParameterf;
glTexParameterfv_client_proc_t glTexParameterfv;
glTranslatef_client_proc_t glTranslatef;
glActiveTexture_client_proc_t glActiveTexture;
glAlphaFuncx_client_proc_t glAlphaFuncx;
glBindBuffer_client_proc_t glBindBuffer;
glBindTexture_client_proc_t glBindTexture;
glBlendFunc_client_proc_t glBlendFunc;
glBufferData_client_proc_t glBufferData;
glBufferSubData_client_proc_t glBufferSubData;
glClear_client_proc_t glClear;
glClearColorx_client_proc_t glClearColorx;
glClearDepthx_client_proc_t glClearDepthx;
glClearStencil_client_proc_t glClearStencil;
glClientActiveTexture_client_proc_t glClientActiveTexture;
glColor4ub_client_proc_t glColor4ub;
glColor4x_client_proc_t glColor4x;
glColorMask_client_proc_t glColorMask;
glColorPointer_client_proc_t glColorPointer;
glCompressedTexImage2D_client_proc_t glCompressedTexImage2D;
glCompressedTexSubImage2D_client_proc_t glCompressedTexSubImage2D;
glCopyTexImage2D_client_proc_t glCopyTexImage2D;
glCopyTexSubImage2D_client_proc_t glCopyTexSubImage2D;
glCullFace_client_proc_t glCullFace;
glDeleteBuffers_client_proc_t glDeleteBuffers;
glDeleteTextures_client_proc_t glDeleteTextures;
glDepthFunc_client_proc_t glDepthFunc;
glDepthMask_client_proc_t glDepthMask;
glDepthRangex_client_proc_t glDepthRangex;
glDisable_client_proc_t glDisable;
glDisableClientState_client_proc_t glDisableClientState;
glDrawArrays_client_proc_t glDrawArrays;
glDrawElements_client_proc_t glDrawElements;
glEnable_client_proc_t glEnable;
glEnableClientState_client_proc_t glEnableClientState;
glFinish_client_proc_t glFinish;
glFlush_client_proc_t glFlush;
glFogx_client_proc_t glFogx;
glFogxv_client_proc_t glFogxv;
glFrontFace_client_proc_t glFrontFace;
glFrustumx_client_proc_t glFrustumx;
glGetBooleanv_client_proc_t glGetBooleanv;
glGetBufferParameteriv_client_proc_t glGetBufferParameteriv;
glClipPlanex_client_proc_t glClipPlanex;
glGenBuffers_client_proc_t glGenBuffers;
glGenTextures_client_proc_t glGenTextures;
glGetError_client_proc_t glGetError;
glGetFixedv_client_proc_t glGetFixedv;
glGetIntegerv_client_proc_t glGetIntegerv;
glGetLightxv_client_proc_t glGetLightxv;
glGetMaterialxv_client_proc_t glGetMaterialxv;
glGetPointerv_client_proc_t glGetPointerv;
glGetString_client_proc_t glGetString;
glGetTexEnviv_client_proc_t glGetTexEnviv;
glGetTexEnvxv_client_proc_t glGetTexEnvxv;
glGetTexParameteriv_client_proc_t glGetTexParameteriv;
glGetTexParameterxv_client_proc_t glGetTexParameterxv;
glHint_client_proc_t glHint;
glIsBuffer_client_proc_t glIsBuffer;
glIsEnabled_client_proc_t glIsEnabled;
glIsTexture_client_proc_t glIsTexture;
glLightModelx_client_proc_t glLightModelx;
glLightModelxv_client_proc_t glLightModelxv;
glLightx_client_proc_t glLightx;
glLightxv_client_proc_t glLightxv;
glLineWidthx_client_proc_t glLineWidthx;
glLoadIdentity_client_proc_t glLoadIdentity;
glLoadMatrixx_client_proc_t glLoadMatrixx;
glLogicOp_client_proc_t glLogicOp;
glMaterialx_client_proc_t glMaterialx;
glMaterialxv_client_proc_t glMaterialxv;
glMatrixMode_client_proc_t glMatrixMode;
glMultMatrixx_client_proc_t glMultMatrixx;
glMultiTexCoord4x_client_proc_t glMultiTexCoord4x;
glNormal3x_client_proc_t glNormal3x;
glNormalPointer_client_proc_t glNormalPointer;
glOrthox_client_proc_t glOrthox;
glPixelStorei_client_proc_t glPixelStorei;
glPointParameterx_client_proc_t glPointParameterx;
glPointParameterxv_client_proc_t glPointParameterxv;
glPointSizex_client_proc_t glPointSizex;
glPolygonOffsetx_client_proc_t glPolygonOffsetx;
glPopMatrix_client_proc_t glPopMatrix;
glPushMatrix_client_proc_t glPushMatrix;
glReadPixels_client_proc_t glReadPixels;
glRotatex_client_proc_t glRotatex;
glSampleCoverage_client_proc_t glSampleCoverage;
glSampleCoveragex_client_proc_t glSampleCoveragex;
glScalex_client_proc_t glScalex;
glScissor_client_proc_t glScissor;
glShadeModel_client_proc_t glShadeModel;
glStencilFunc_client_proc_t glStencilFunc;
glStencilMask_client_proc_t glStencilMask;
glStencilOp_client_proc_t glStencilOp;
glTexCoordPointer_client_proc_t glTexCoordPointer;
glTexEnvi_client_proc_t glTexEnvi;
glTexEnvx_client_proc_t glTexEnvx;
glTexEnviv_client_proc_t glTexEnviv;
glTexEnvxv_client_proc_t glTexEnvxv;
glTexImage2D_client_proc_t glTexImage2D;
glTexParameteri_client_proc_t glTexParameteri;
glTexParameterx_client_proc_t glTexParameterx;
glTexParameteriv_client_proc_t glTexParameteriv;
glTexParameterxv_client_proc_t glTexParameterxv;
glTexSubImage2D_client_proc_t glTexSubImage2D;
glTranslatex_client_proc_t glTranslatex;
glVertexPointer_client_proc_t glVertexPointer;
glViewport_client_proc_t glViewport;
glPointSizePointerOES_client_proc_t glPointSizePointerOES;
glVertexPointerOffset_client_proc_t glVertexPointerOffset;
glColorPointerOffset_client_proc_t glColorPointerOffset;
glNormalPointerOffset_client_proc_t glNormalPointerOffset;
glPointSizePointerOffset_client_proc_t glPointSizePointerOffset;
glTexCoordPointerOffset_client_proc_t glTexCoordPointerOffset;
glWeightPointerOffset_client_proc_t glWeightPointerOffset;
glMatrixIndexPointerOffset_client_proc_t glMatrixIndexPointerOffset;
glVertexPointerData_client_proc_t glVertexPointerData;
glColorPointerData_client_proc_t glColorPointerData;
glNormalPointerData_client_proc_t glNormalPointerData;
glTexCoordPointerData_client_proc_t glTexCoordPointerData;
glPointSizePointerData_client_proc_t glPointSizePointerData;
glWeightPointerData_client_proc_t glWeightPointerData;
glMatrixIndexPointerData_client_proc_t glMatrixIndexPointerData;
glDrawElementsOffset_client_proc_t glDrawElementsOffset;
glDrawElementsData_client_proc_t glDrawElementsData;
glGetCompressedTextureFormats_client_proc_t glGetCompressedTextureFormats;
glFinishRoundTrip_client_proc_t glFinishRoundTrip;
glBlendEquationSeparateOES_client_proc_t glBlendEquationSeparateOES;
glBlendFuncSeparateOES_client_proc_t glBlendFuncSeparateOES;
glBlendEquationOES_client_proc_t glBlendEquationOES;
glDrawTexsOES_client_proc_t glDrawTexsOES;
glDrawTexiOES_client_proc_t glDrawTexiOES;
glDrawTexxOES_client_proc_t glDrawTexxOES;
glDrawTexsvOES_client_proc_t glDrawTexsvOES;
glDrawTexivOES_client_proc_t glDrawTexivOES;
glDrawTexxvOES_client_proc_t glDrawTexxvOES;
glDrawTexfOES_client_proc_t glDrawTexfOES;
glDrawTexfvOES_client_proc_t glDrawTexfvOES;
glEGLImageTargetTexture2DOES_client_proc_t glEGLImageTargetTexture2DOES;
glEGLImageTargetRenderbufferStorageOES_client_proc_t glEGLImageTargetRenderbufferStorageOES;
glAlphaFuncxOES_client_proc_t glAlphaFuncxOES;
glClearColorxOES_client_proc_t glClearColorxOES;
glClearDepthxOES_client_proc_t glClearDepthxOES;
glClipPlanexOES_client_proc_t glClipPlanexOES;
glClipPlanexIMG_client_proc_t glClipPlanexIMG;
glColor4xOES_client_proc_t glColor4xOES;
glDepthRangexOES_client_proc_t glDepthRangexOES;
glFogxOES_client_proc_t glFogxOES;
glFogxvOES_client_proc_t glFogxvOES;
glFrustumxOES_client_proc_t glFrustumxOES;
glGetClipPlanexOES_client_proc_t glGetClipPlanexOES;
glGetClipPlanex_client_proc_t glGetClipPlanex;
glGetFixedvOES_client_proc_t glGetFixedvOES;
glGetLightxvOES_client_proc_t glGetLightxvOES;
glGetMaterialxvOES_client_proc_t glGetMaterialxvOES;
glGetTexEnvxvOES_client_proc_t glGetTexEnvxvOES;
glGetTexParameterxvOES_client_proc_t glGetTexParameterxvOES;
glLightModelxOES_client_proc_t glLightModelxOES;
glLightModelxvOES_client_proc_t glLightModelxvOES;
glLightxOES_client_proc_t glLightxOES;
glLightxvOES_client_proc_t glLightxvOES;
glLineWidthxOES_client_proc_t glLineWidthxOES;
glLoadMatrixxOES_client_proc_t glLoadMatrixxOES;
glMaterialxOES_client_proc_t glMaterialxOES;
glMaterialxvOES_client_proc_t glMaterialxvOES;
glMultMatrixxOES_client_proc_t glMultMatrixxOES;
glMultiTexCoord4xOES_client_proc_t glMultiTexCoord4xOES;
glNormal3xOES_client_proc_t glNormal3xOES;
glOrthoxOES_client_proc_t glOrthoxOES;
glPointParameterxOES_client_proc_t glPointParameterxOES;
glPointParameterxvOES_client_proc_t glPointParameterxvOES;
glPointSizexOES_client_proc_t glPointSizexOES;
glPolygonOffsetxOES_client_proc_t glPolygonOffsetxOES;
glRotatexOES_client_proc_t glRotatexOES;
glSampleCoveragexOES_client_proc_t glSampleCoveragexOES;
glScalexOES_client_proc_t glScalexOES;
glTexEnvxOES_client_proc_t glTexEnvxOES;
glTexEnvxvOES_client_proc_t glTexEnvxvOES;
glTexParameterxOES_client_proc_t glTexParameterxOES;
glTexParameterxvOES_client_proc_t glTexParameterxvOES;
glTranslatexOES_client_proc_t glTranslatexOES;
glIsRenderbufferOES_client_proc_t glIsRenderbufferOES;
glBindRenderbufferOES_client_proc_t glBindRenderbufferOES;
glDeleteRenderbuffersOES_client_proc_t glDeleteRenderbuffersOES;
glGenRenderbuffersOES_client_proc_t glGenRenderbuffersOES;
glRenderbufferStorageOES_client_proc_t glRenderbufferStorageOES;
glGetRenderbufferParameterivOES_client_proc_t glGetRenderbufferParameterivOES;
glIsFramebufferOES_client_proc_t glIsFramebufferOES;
glBindFramebufferOES_client_proc_t glBindFramebufferOES;
glDeleteFramebuffersOES_client_proc_t glDeleteFramebuffersOES;
glGenFramebuffersOES_client_proc_t glGenFramebuffersOES;
glCheckFramebufferStatusOES_client_proc_t glCheckFramebufferStatusOES;
glFramebufferRenderbufferOES_client_proc_t glFramebufferRenderbufferOES;
glFramebufferTexture2DOES_client_proc_t glFramebufferTexture2DOES;
glGetFramebufferAttachmentParameterivOES_client_proc_t glGetFramebufferAttachmentParameterivOES;
glGenerateMipmapOES_client_proc_t glGenerateMipmapOES;
glMapBufferOES_client_proc_t glMapBufferOES;
glUnmapBufferOES_client_proc_t glUnmapBufferOES;
glGetBufferPointervOES_client_proc_t glGetBufferPointervOES;
glCurrentPaletteMatrixOES_client_proc_t glCurrentPaletteMatrixOES;
glLoadPaletteFromModelViewMatrixOES_client_proc_t glLoadPaletteFromModelViewMatrixOES;
glMatrixIndexPointerOES_client_proc_t glMatrixIndexPointerOES;
glWeightPointerOES_client_proc_t glWeightPointerOES;
glQueryMatrixxOES_client_proc_t glQueryMatrixxOES;
glDepthRangefOES_client_proc_t glDepthRangefOES;
glFrustumfOES_client_proc_t glFrustumfOES;
glOrthofOES_client_proc_t glOrthofOES;
glClipPlanefOES_client_proc_t glClipPlanefOES;
glClipPlanefIMG_client_proc_t glClipPlanefIMG;
glGetClipPlanefOES_client_proc_t glGetClipPlanefOES;
glClearDepthfOES_client_proc_t glClearDepthfOES;
glTexGenfOES_client_proc_t glTexGenfOES;
glTexGenfvOES_client_proc_t glTexGenfvOES;
glTexGeniOES_client_proc_t glTexGeniOES;
glTexGenivOES_client_proc_t glTexGenivOES;
glTexGenxOES_client_proc_t glTexGenxOES;
glTexGenxvOES_client_proc_t glTexGenxvOES;
glGetTexGenfvOES_client_proc_t glGetTexGenfvOES;
glGetTexGenivOES_client_proc_t glGetTexGenivOES;
glGetTexGenxvOES_client_proc_t glGetTexGenxvOES;
glBindVertexArrayOES_client_proc_t glBindVertexArrayOES;
glDeleteVertexArraysOES_client_proc_t glDeleteVertexArraysOES;
glGenVertexArraysOES_client_proc_t glGenVertexArraysOES;
glIsVertexArrayOES_client_proc_t glIsVertexArrayOES;
glDiscardFramebufferEXT_client_proc_t glDiscardFramebufferEXT;
glMultiDrawArraysEXT_client_proc_t glMultiDrawArraysEXT;
glMultiDrawElementsEXT_client_proc_t glMultiDrawElementsEXT;
glMultiDrawArraysSUN_client_proc_t glMultiDrawArraysSUN;
glMultiDrawElementsSUN_client_proc_t glMultiDrawElementsSUN;
glRenderbufferStorageMultisampleIMG_client_proc_t glRenderbufferStorageMultisampleIMG;
glFramebufferTexture2DMultisampleIMG_client_proc_t glFramebufferTexture2DMultisampleIMG;
glDeleteFencesNV_client_proc_t glDeleteFencesNV;
glGenFencesNV_client_proc_t glGenFencesNV;
glIsFenceNV_client_proc_t glIsFenceNV;
glTestFenceNV_client_proc_t glTestFenceNV;
glGetFenceivNV_client_proc_t glGetFenceivNV;
glFinishFenceNV_client_proc_t glFinishFenceNV;
glSetFenceNV_client_proc_t glSetFenceNV;
glGetDriverControlsQCOM_client_proc_t glGetDriverControlsQCOM;
glGetDriverControlStringQCOM_client_proc_t glGetDriverControlStringQCOM;
glEnableDriverControlQCOM_client_proc_t glEnableDriverControlQCOM;
glDisableDriverControlQCOM_client_proc_t glDisableDriverControlQCOM;
glExtGetTexturesQCOM_client_proc_t glExtGetTexturesQCOM;
glExtGetBuffersQCOM_client_proc_t glExtGetBuffersQCOM;
glExtGetRenderbuffersQCOM_client_proc_t glExtGetRenderbuffersQCOM;
glExtGetFramebuffersQCOM_client_proc_t glExtGetFramebuffersQCOM;
glExtGetTexLevelParameterivQCOM_client_proc_t glExtGetTexLevelParameterivQCOM;
glExtTexObjectStateOverrideiQCOM_client_proc_t glExtTexObjectStateOverrideiQCOM;
glExtGetTexSubImageQCOM_client_proc_t glExtGetTexSubImageQCOM;
glExtGetBufferPointervQCOM_client_proc_t glExtGetBufferPointervQCOM;
glExtGetShadersQCOM_client_proc_t glExtGetShadersQCOM;
glExtGetProgramsQCOM_client_proc_t glExtGetProgramsQCOM;
glExtIsProgramBinaryQCOM_client_proc_t glExtIsProgramBinaryQCOM;
glExtGetProgramBinarySourceQCOM_client_proc_t glExtGetProgramBinarySourceQCOM;
glStartTilingQCOM_client_proc_t glStartTilingQCOM;
glEndTilingQCOM_client_proc_t glEndTilingQCOM;
virtual ~gl_client_context_t() {}
typedef gl_client_context_t *CONTEXT_ACCESSOR_TYPE(void);
static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f);
int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData);
virtual void setError(unsigned int error){ (void)error; };
virtual unsigned int getError(){ return 0; };
};
#endif

View file

@ -0,0 +1,305 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __gl_client_proc_t_h
#define __gl_client_proc_t_h
#include "gl_types.h"
#ifndef gl_APIENTRY
#define gl_APIENTRY
#endif
typedef void (gl_APIENTRY *glAlphaFunc_client_proc_t) (void * ctx, GLenum, GLclampf);
typedef void (gl_APIENTRY *glClearColor_client_proc_t) (void * ctx, GLclampf, GLclampf, GLclampf, GLclampf);
typedef void (gl_APIENTRY *glClearDepthf_client_proc_t) (void * ctx, GLclampf);
typedef void (gl_APIENTRY *glClipPlanef_client_proc_t) (void * ctx, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glColor4f_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glDepthRangef_client_proc_t) (void * ctx, GLclampf, GLclampf);
typedef void (gl_APIENTRY *glFogf_client_proc_t) (void * ctx, GLenum, GLfloat);
typedef void (gl_APIENTRY *glFogfv_client_proc_t) (void * ctx, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glFrustumf_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glGetClipPlanef_client_proc_t) (void * ctx, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glGetFloatv_client_proc_t) (void * ctx, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glGetLightfv_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glGetMaterialfv_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glGetTexEnvfv_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glGetTexParameterfv_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glLightModelf_client_proc_t) (void * ctx, GLenum, GLfloat);
typedef void (gl_APIENTRY *glLightModelfv_client_proc_t) (void * ctx, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glLightf_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat);
typedef void (gl_APIENTRY *glLightfv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glLineWidth_client_proc_t) (void * ctx, GLfloat);
typedef void (gl_APIENTRY *glLoadMatrixf_client_proc_t) (void * ctx, const GLfloat*);
typedef void (gl_APIENTRY *glMaterialf_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat);
typedef void (gl_APIENTRY *glMaterialfv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glMultMatrixf_client_proc_t) (void * ctx, const GLfloat*);
typedef void (gl_APIENTRY *glMultiTexCoord4f_client_proc_t) (void * ctx, GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glNormal3f_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glOrthof_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glPointParameterf_client_proc_t) (void * ctx, GLenum, GLfloat);
typedef void (gl_APIENTRY *glPointParameterfv_client_proc_t) (void * ctx, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glPointSize_client_proc_t) (void * ctx, GLfloat);
typedef void (gl_APIENTRY *glPolygonOffset_client_proc_t) (void * ctx, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glRotatef_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glScalef_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glTexEnvf_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat);
typedef void (gl_APIENTRY *glTexEnvfv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glTexParameterf_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat);
typedef void (gl_APIENTRY *glTexParameterfv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glTranslatef_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glActiveTexture_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glAlphaFuncx_client_proc_t) (void * ctx, GLenum, GLclampx);
typedef void (gl_APIENTRY *glBindBuffer_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl_APIENTRY *glBindTexture_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl_APIENTRY *glBlendFunc_client_proc_t) (void * ctx, GLenum, GLenum);
typedef void (gl_APIENTRY *glBufferData_client_proc_t) (void * ctx, GLenum, GLsizeiptr, const GLvoid*, GLenum);
typedef void (gl_APIENTRY *glBufferSubData_client_proc_t) (void * ctx, GLenum, GLintptr, GLsizeiptr, const GLvoid*);
typedef void (gl_APIENTRY *glClear_client_proc_t) (void * ctx, GLbitfield);
typedef void (gl_APIENTRY *glClearColorx_client_proc_t) (void * ctx, GLclampx, GLclampx, GLclampx, GLclampx);
typedef void (gl_APIENTRY *glClearDepthx_client_proc_t) (void * ctx, GLclampx);
typedef void (gl_APIENTRY *glClearStencil_client_proc_t) (void * ctx, GLint);
typedef void (gl_APIENTRY *glClientActiveTexture_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glColor4ub_client_proc_t) (void * ctx, GLubyte, GLubyte, GLubyte, GLubyte);
typedef void (gl_APIENTRY *glColor4x_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glColorMask_client_proc_t) (void * ctx, GLboolean, GLboolean, GLboolean, GLboolean);
typedef void (gl_APIENTRY *glColorPointer_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glCompressedTexImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glCompressedTexSubImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glCopyTexImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
typedef void (gl_APIENTRY *glCopyTexSubImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
typedef void (gl_APIENTRY *glCullFace_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glDeleteBuffers_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl_APIENTRY *glDeleteTextures_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl_APIENTRY *glDepthFunc_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glDepthMask_client_proc_t) (void * ctx, GLboolean);
typedef void (gl_APIENTRY *glDepthRangex_client_proc_t) (void * ctx, GLclampx, GLclampx);
typedef void (gl_APIENTRY *glDisable_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glDisableClientState_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glDrawArrays_client_proc_t) (void * ctx, GLenum, GLint, GLsizei);
typedef void (gl_APIENTRY *glDrawElements_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, const GLvoid*);
typedef void (gl_APIENTRY *glEnable_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glEnableClientState_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glFinish_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glFlush_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glFogx_client_proc_t) (void * ctx, GLenum, GLfixed);
typedef void (gl_APIENTRY *glFogxv_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glFrontFace_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glFrustumx_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glGetBooleanv_client_proc_t) (void * ctx, GLenum, GLboolean*);
typedef void (gl_APIENTRY *glGetBufferParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef void (gl_APIENTRY *glClipPlanex_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glGenBuffers_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl_APIENTRY *glGenTextures_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef GLenum (gl_APIENTRY *glGetError_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glGetFixedv_client_proc_t) (void * ctx, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetIntegerv_client_proc_t) (void * ctx, GLenum, GLint*);
typedef void (gl_APIENTRY *glGetLightxv_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetMaterialxv_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetPointerv_client_proc_t) (void * ctx, GLenum, GLvoid**);
typedef const GLubyte* (gl_APIENTRY *glGetString_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glGetTexEnviv_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef void (gl_APIENTRY *glGetTexEnvxv_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetTexParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef void (gl_APIENTRY *glGetTexParameterxv_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glHint_client_proc_t) (void * ctx, GLenum, GLenum);
typedef GLboolean (gl_APIENTRY *glIsBuffer_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl_APIENTRY *glIsEnabled_client_proc_t) (void * ctx, GLenum);
typedef GLboolean (gl_APIENTRY *glIsTexture_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glLightModelx_client_proc_t) (void * ctx, GLenum, GLfixed);
typedef void (gl_APIENTRY *glLightModelxv_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glLightx_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glLightxv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glLineWidthx_client_proc_t) (void * ctx, GLfixed);
typedef void (gl_APIENTRY *glLoadIdentity_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glLoadMatrixx_client_proc_t) (void * ctx, const GLfixed*);
typedef void (gl_APIENTRY *glLogicOp_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glMaterialx_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glMaterialxv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glMatrixMode_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glMultMatrixx_client_proc_t) (void * ctx, const GLfixed*);
typedef void (gl_APIENTRY *glMultiTexCoord4x_client_proc_t) (void * ctx, GLenum, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glNormal3x_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glNormalPointer_client_proc_t) (void * ctx, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glOrthox_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glPixelStorei_client_proc_t) (void * ctx, GLenum, GLint);
typedef void (gl_APIENTRY *glPointParameterx_client_proc_t) (void * ctx, GLenum, GLfixed);
typedef void (gl_APIENTRY *glPointParameterxv_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glPointSizex_client_proc_t) (void * ctx, GLfixed);
typedef void (gl_APIENTRY *glPolygonOffsetx_client_proc_t) (void * ctx, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glPopMatrix_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glPushMatrix_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glReadPixels_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (gl_APIENTRY *glRotatex_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glSampleCoverage_client_proc_t) (void * ctx, GLclampf, GLboolean);
typedef void (gl_APIENTRY *glSampleCoveragex_client_proc_t) (void * ctx, GLclampx, GLboolean);
typedef void (gl_APIENTRY *glScalex_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glScissor_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei);
typedef void (gl_APIENTRY *glShadeModel_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glStencilFunc_client_proc_t) (void * ctx, GLenum, GLint, GLuint);
typedef void (gl_APIENTRY *glStencilMask_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glStencilOp_client_proc_t) (void * ctx, GLenum, GLenum, GLenum);
typedef void (gl_APIENTRY *glTexCoordPointer_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glTexEnvi_client_proc_t) (void * ctx, GLenum, GLenum, GLint);
typedef void (gl_APIENTRY *glTexEnvx_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glTexEnviv_client_proc_t) (void * ctx, GLenum, GLenum, const GLint*);
typedef void (gl_APIENTRY *glTexEnvxv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glTexImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*);
typedef void (gl_APIENTRY *glTexParameteri_client_proc_t) (void * ctx, GLenum, GLenum, GLint);
typedef void (gl_APIENTRY *glTexParameterx_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glTexParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, const GLint*);
typedef void (gl_APIENTRY *glTexParameterxv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glTexSubImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*);
typedef void (gl_APIENTRY *glTranslatex_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glVertexPointer_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glViewport_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei);
typedef void (gl_APIENTRY *glPointSizePointerOES_client_proc_t) (void * ctx, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glVertexPointerOffset_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glColorPointerOffset_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glNormalPointerOffset_client_proc_t) (void * ctx, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glPointSizePointerOffset_client_proc_t) (void * ctx, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glTexCoordPointerOffset_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glWeightPointerOffset_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glMatrixIndexPointerOffset_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, GLuint);
typedef void (gl_APIENTRY *glVertexPointerData_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glColorPointerData_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glNormalPointerData_client_proc_t) (void * ctx, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glTexCoordPointerData_client_proc_t) (void * ctx, GLint, GLint, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glPointSizePointerData_client_proc_t) (void * ctx, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glWeightPointerData_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glMatrixIndexPointerData_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, void*, GLuint);
typedef void (gl_APIENTRY *glDrawElementsOffset_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, GLuint);
typedef void (gl_APIENTRY *glDrawElementsData_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, void*, GLuint);
typedef void (gl_APIENTRY *glGetCompressedTextureFormats_client_proc_t) (void * ctx, int, GLint*);
typedef int (gl_APIENTRY *glFinishRoundTrip_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glBlendEquationSeparateOES_client_proc_t) (void * ctx, GLenum, GLenum);
typedef void (gl_APIENTRY *glBlendFuncSeparateOES_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLenum);
typedef void (gl_APIENTRY *glBlendEquationOES_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glDrawTexsOES_client_proc_t) (void * ctx, GLshort, GLshort, GLshort, GLshort, GLshort);
typedef void (gl_APIENTRY *glDrawTexiOES_client_proc_t) (void * ctx, GLint, GLint, GLint, GLint, GLint);
typedef void (gl_APIENTRY *glDrawTexxOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glDrawTexsvOES_client_proc_t) (void * ctx, const GLshort*);
typedef void (gl_APIENTRY *glDrawTexivOES_client_proc_t) (void * ctx, const GLint*);
typedef void (gl_APIENTRY *glDrawTexxvOES_client_proc_t) (void * ctx, const GLfixed*);
typedef void (gl_APIENTRY *glDrawTexfOES_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glDrawTexfvOES_client_proc_t) (void * ctx, const GLfloat*);
typedef void (gl_APIENTRY *glEGLImageTargetTexture2DOES_client_proc_t) (void * ctx, GLenum, GLeglImageOES);
typedef void (gl_APIENTRY *glEGLImageTargetRenderbufferStorageOES_client_proc_t) (void * ctx, GLenum, GLeglImageOES);
typedef void (gl_APIENTRY *glAlphaFuncxOES_client_proc_t) (void * ctx, GLenum, GLclampx);
typedef void (gl_APIENTRY *glClearColorxOES_client_proc_t) (void * ctx, GLclampx, GLclampx, GLclampx, GLclampx);
typedef void (gl_APIENTRY *glClearDepthxOES_client_proc_t) (void * ctx, GLclampx);
typedef void (gl_APIENTRY *glClipPlanexOES_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glClipPlanexIMG_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glColor4xOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glDepthRangexOES_client_proc_t) (void * ctx, GLclampx, GLclampx);
typedef void (gl_APIENTRY *glFogxOES_client_proc_t) (void * ctx, GLenum, GLfixed);
typedef void (gl_APIENTRY *glFogxvOES_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glFrustumxOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glGetClipPlanexOES_client_proc_t) (void * ctx, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetClipPlanex_client_proc_t) (void * ctx, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetFixedvOES_client_proc_t) (void * ctx, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetLightxvOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetMaterialxvOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetTexEnvxvOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glGetTexParameterxvOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glLightModelxOES_client_proc_t) (void * ctx, GLenum, GLfixed);
typedef void (gl_APIENTRY *glLightModelxvOES_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glLightxOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glLightxvOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glLineWidthxOES_client_proc_t) (void * ctx, GLfixed);
typedef void (gl_APIENTRY *glLoadMatrixxOES_client_proc_t) (void * ctx, const GLfixed*);
typedef void (gl_APIENTRY *glMaterialxOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glMaterialxvOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glMultMatrixxOES_client_proc_t) (void * ctx, const GLfixed*);
typedef void (gl_APIENTRY *glMultiTexCoord4xOES_client_proc_t) (void * ctx, GLenum, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glNormal3xOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glOrthoxOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glPointParameterxOES_client_proc_t) (void * ctx, GLenum, GLfixed);
typedef void (gl_APIENTRY *glPointParameterxvOES_client_proc_t) (void * ctx, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glPointSizexOES_client_proc_t) (void * ctx, GLfixed);
typedef void (gl_APIENTRY *glPolygonOffsetxOES_client_proc_t) (void * ctx, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glRotatexOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glSampleCoveragexOES_client_proc_t) (void * ctx, GLclampx, GLboolean);
typedef void (gl_APIENTRY *glScalexOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed);
typedef void (gl_APIENTRY *glTexEnvxOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glTexEnvxvOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glTexParameterxOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glTexParameterxvOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glTranslatexOES_client_proc_t) (void * ctx, GLfixed, GLfixed, GLfixed);
typedef GLboolean (gl_APIENTRY *glIsRenderbufferOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glBindRenderbufferOES_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl_APIENTRY *glDeleteRenderbuffersOES_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl_APIENTRY *glGenRenderbuffersOES_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl_APIENTRY *glRenderbufferStorageOES_client_proc_t) (void * ctx, GLenum, GLenum, GLsizei, GLsizei);
typedef void (gl_APIENTRY *glGetRenderbufferParameterivOES_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef GLboolean (gl_APIENTRY *glIsFramebufferOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glBindFramebufferOES_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl_APIENTRY *glDeleteFramebuffersOES_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl_APIENTRY *glGenFramebuffersOES_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef GLenum (gl_APIENTRY *glCheckFramebufferStatusOES_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glFramebufferRenderbufferOES_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint);
typedef void (gl_APIENTRY *glFramebufferTexture2DOES_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint, GLint);
typedef void (gl_APIENTRY *glGetFramebufferAttachmentParameterivOES_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLint*);
typedef void (gl_APIENTRY *glGenerateMipmapOES_client_proc_t) (void * ctx, GLenum);
typedef void* (gl_APIENTRY *glMapBufferOES_client_proc_t) (void * ctx, GLenum, GLenum);
typedef GLboolean (gl_APIENTRY *glUnmapBufferOES_client_proc_t) (void * ctx, GLenum);
typedef void (gl_APIENTRY *glGetBufferPointervOES_client_proc_t) (void * ctx, GLenum, GLenum, GLvoid**);
typedef void (gl_APIENTRY *glCurrentPaletteMatrixOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glLoadPaletteFromModelViewMatrixOES_client_proc_t) (void * ctx);
typedef void (gl_APIENTRY *glMatrixIndexPointerOES_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, const GLvoid*);
typedef void (gl_APIENTRY *glWeightPointerOES_client_proc_t) (void * ctx, GLint, GLenum, GLsizei, const GLvoid*);
typedef GLbitfield (gl_APIENTRY *glQueryMatrixxOES_client_proc_t) (void * ctx, GLfixed*, GLint*);
typedef void (gl_APIENTRY *glDepthRangefOES_client_proc_t) (void * ctx, GLclampf, GLclampf);
typedef void (gl_APIENTRY *glFrustumfOES_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glOrthofOES_client_proc_t) (void * ctx, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl_APIENTRY *glClipPlanefOES_client_proc_t) (void * ctx, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glClipPlanefIMG_client_proc_t) (void * ctx, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glGetClipPlanefOES_client_proc_t) (void * ctx, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glClearDepthfOES_client_proc_t) (void * ctx, GLclampf);
typedef void (gl_APIENTRY *glTexGenfOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat);
typedef void (gl_APIENTRY *glTexGenfvOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLfloat*);
typedef void (gl_APIENTRY *glTexGeniOES_client_proc_t) (void * ctx, GLenum, GLenum, GLint);
typedef void (gl_APIENTRY *glTexGenivOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLint*);
typedef void (gl_APIENTRY *glTexGenxOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed);
typedef void (gl_APIENTRY *glTexGenxvOES_client_proc_t) (void * ctx, GLenum, GLenum, const GLfixed*);
typedef void (gl_APIENTRY *glGetTexGenfvOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat*);
typedef void (gl_APIENTRY *glGetTexGenivOES_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef void (gl_APIENTRY *glGetTexGenxvOES_client_proc_t) (void * ctx, GLenum, GLenum, GLfixed*);
typedef void (gl_APIENTRY *glBindVertexArrayOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glDeleteVertexArraysOES_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl_APIENTRY *glGenVertexArraysOES_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef GLboolean (gl_APIENTRY *glIsVertexArrayOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glDiscardFramebufferEXT_client_proc_t) (void * ctx, GLenum, GLsizei, const GLenum*);
typedef void (gl_APIENTRY *glMultiDrawArraysEXT_client_proc_t) (void * ctx, GLenum, const GLint*, const GLsizei*, GLsizei);
typedef void (gl_APIENTRY *glMultiDrawElementsEXT_client_proc_t) (void * ctx, GLenum, const GLsizei*, GLenum, const GLvoid* const*, GLsizei);
typedef void (gl_APIENTRY *glMultiDrawArraysSUN_client_proc_t) (void * ctx, GLenum, GLint*, GLsizei*, GLsizei);
typedef void (gl_APIENTRY *glMultiDrawElementsSUN_client_proc_t) (void * ctx, GLenum, const GLsizei*, GLenum, const GLvoid**, GLsizei);
typedef void (gl_APIENTRY *glRenderbufferStorageMultisampleIMG_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, GLsizei, GLsizei);
typedef void (gl_APIENTRY *glFramebufferTexture2DMultisampleIMG_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
typedef void (gl_APIENTRY *glDeleteFencesNV_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl_APIENTRY *glGenFencesNV_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef GLboolean (gl_APIENTRY *glIsFenceNV_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl_APIENTRY *glTestFenceNV_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glGetFenceivNV_client_proc_t) (void * ctx, GLuint, GLenum, GLint*);
typedef void (gl_APIENTRY *glFinishFenceNV_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glSetFenceNV_client_proc_t) (void * ctx, GLuint, GLenum);
typedef void (gl_APIENTRY *glGetDriverControlsQCOM_client_proc_t) (void * ctx, GLint*, GLsizei, GLuint*);
typedef void (gl_APIENTRY *glGetDriverControlStringQCOM_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (gl_APIENTRY *glEnableDriverControlQCOM_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glDisableDriverControlQCOM_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glExtGetTexturesQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl_APIENTRY *glExtGetBuffersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl_APIENTRY *glExtGetRenderbuffersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl_APIENTRY *glExtGetFramebuffersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl_APIENTRY *glExtGetTexLevelParameterivQCOM_client_proc_t) (void * ctx, GLuint, GLenum, GLint, GLenum, GLint*);
typedef void (gl_APIENTRY *glExtTexObjectStateOverrideiQCOM_client_proc_t) (void * ctx, GLenum, GLenum, GLint);
typedef void (gl_APIENTRY *glExtGetTexSubImageQCOM_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (gl_APIENTRY *glExtGetBufferPointervQCOM_client_proc_t) (void * ctx, GLenum, GLvoid**);
typedef void (gl_APIENTRY *glExtGetShadersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl_APIENTRY *glExtGetProgramsQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef GLboolean (gl_APIENTRY *glExtIsProgramBinaryQCOM_client_proc_t) (void * ctx, GLuint);
typedef void (gl_APIENTRY *glExtGetProgramBinarySourceQCOM_client_proc_t) (void * ctx, GLuint, GLenum, GLchar*, GLint*);
typedef void (gl_APIENTRY *glStartTilingQCOM_client_proc_t) (void * ctx, GLuint, GLuint, GLuint, GLuint, GLbitfield);
typedef void (gl_APIENTRY *glEndTilingQCOM_client_proc_t) (void * ctx, GLbitfield);
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef GUARD_gl_encoder_context_t
#define GUARD_gl_encoder_context_t
#include "IOStream.h"
#include "ChecksumCalculator.h"
#include "gl_client_context.h"
#include "glUtils.h"
#include "GLEncoderUtils.h"
struct gl_encoder_context_t : public gl_client_context_t {
IOStream *m_stream;
ChecksumCalculator *m_checksumCalculator;
gl_encoder_context_t(IOStream *stream, ChecksumCalculator *checksumCalculator);
};
#endif // GUARD_gl_encoder_context_t

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,288 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __gl_client_ftable_t_h
#define __gl_client_ftable_t_h
static const struct _gl_funcs_by_name {
const char *name;
void *proc;
} gl_funcs_by_name[] = {
{"glAlphaFunc", (void*)glAlphaFunc},
{"glClearColor", (void*)glClearColor},
{"glClearDepthf", (void*)glClearDepthf},
{"glClipPlanef", (void*)glClipPlanef},
{"glColor4f", (void*)glColor4f},
{"glDepthRangef", (void*)glDepthRangef},
{"glFogf", (void*)glFogf},
{"glFogfv", (void*)glFogfv},
{"glFrustumf", (void*)glFrustumf},
{"glGetClipPlanef", (void*)glGetClipPlanef},
{"glGetFloatv", (void*)glGetFloatv},
{"glGetLightfv", (void*)glGetLightfv},
{"glGetMaterialfv", (void*)glGetMaterialfv},
{"glGetTexEnvfv", (void*)glGetTexEnvfv},
{"glGetTexParameterfv", (void*)glGetTexParameterfv},
{"glLightModelf", (void*)glLightModelf},
{"glLightModelfv", (void*)glLightModelfv},
{"glLightf", (void*)glLightf},
{"glLightfv", (void*)glLightfv},
{"glLineWidth", (void*)glLineWidth},
{"glLoadMatrixf", (void*)glLoadMatrixf},
{"glMaterialf", (void*)glMaterialf},
{"glMaterialfv", (void*)glMaterialfv},
{"glMultMatrixf", (void*)glMultMatrixf},
{"glMultiTexCoord4f", (void*)glMultiTexCoord4f},
{"glNormal3f", (void*)glNormal3f},
{"glOrthof", (void*)glOrthof},
{"glPointParameterf", (void*)glPointParameterf},
{"glPointParameterfv", (void*)glPointParameterfv},
{"glPointSize", (void*)glPointSize},
{"glPolygonOffset", (void*)glPolygonOffset},
{"glRotatef", (void*)glRotatef},
{"glScalef", (void*)glScalef},
{"glTexEnvf", (void*)glTexEnvf},
{"glTexEnvfv", (void*)glTexEnvfv},
{"glTexParameterf", (void*)glTexParameterf},
{"glTexParameterfv", (void*)glTexParameterfv},
{"glTranslatef", (void*)glTranslatef},
{"glActiveTexture", (void*)glActiveTexture},
{"glAlphaFuncx", (void*)glAlphaFuncx},
{"glBindBuffer", (void*)glBindBuffer},
{"glBindTexture", (void*)glBindTexture},
{"glBlendFunc", (void*)glBlendFunc},
{"glBufferData", (void*)glBufferData},
{"glBufferSubData", (void*)glBufferSubData},
{"glClear", (void*)glClear},
{"glClearColorx", (void*)glClearColorx},
{"glClearDepthx", (void*)glClearDepthx},
{"glClearStencil", (void*)glClearStencil},
{"glClientActiveTexture", (void*)glClientActiveTexture},
{"glColor4ub", (void*)glColor4ub},
{"glColor4x", (void*)glColor4x},
{"glColorMask", (void*)glColorMask},
{"glColorPointer", (void*)glColorPointer},
{"glCompressedTexImage2D", (void*)glCompressedTexImage2D},
{"glCompressedTexSubImage2D", (void*)glCompressedTexSubImage2D},
{"glCopyTexImage2D", (void*)glCopyTexImage2D},
{"glCopyTexSubImage2D", (void*)glCopyTexSubImage2D},
{"glCullFace", (void*)glCullFace},
{"glDeleteBuffers", (void*)glDeleteBuffers},
{"glDeleteTextures", (void*)glDeleteTextures},
{"glDepthFunc", (void*)glDepthFunc},
{"glDepthMask", (void*)glDepthMask},
{"glDepthRangex", (void*)glDepthRangex},
{"glDisable", (void*)glDisable},
{"glDisableClientState", (void*)glDisableClientState},
{"glDrawArrays", (void*)glDrawArrays},
{"glDrawElements", (void*)glDrawElements},
{"glEnable", (void*)glEnable},
{"glEnableClientState", (void*)glEnableClientState},
{"glFinish", (void*)glFinish},
{"glFlush", (void*)glFlush},
{"glFogx", (void*)glFogx},
{"glFogxv", (void*)glFogxv},
{"glFrontFace", (void*)glFrontFace},
{"glFrustumx", (void*)glFrustumx},
{"glGetBooleanv", (void*)glGetBooleanv},
{"glGetBufferParameteriv", (void*)glGetBufferParameteriv},
{"glClipPlanex", (void*)glClipPlanex},
{"glGenBuffers", (void*)glGenBuffers},
{"glGenTextures", (void*)glGenTextures},
{"glGetError", (void*)glGetError},
{"glGetFixedv", (void*)glGetFixedv},
{"glGetIntegerv", (void*)glGetIntegerv},
{"glGetLightxv", (void*)glGetLightxv},
{"glGetMaterialxv", (void*)glGetMaterialxv},
{"glGetPointerv", (void*)glGetPointerv},
{"glGetString", (void*)glGetString},
{"glGetTexEnviv", (void*)glGetTexEnviv},
{"glGetTexEnvxv", (void*)glGetTexEnvxv},
{"glGetTexParameteriv", (void*)glGetTexParameteriv},
{"glGetTexParameterxv", (void*)glGetTexParameterxv},
{"glHint", (void*)glHint},
{"glIsBuffer", (void*)glIsBuffer},
{"glIsEnabled", (void*)glIsEnabled},
{"glIsTexture", (void*)glIsTexture},
{"glLightModelx", (void*)glLightModelx},
{"glLightModelxv", (void*)glLightModelxv},
{"glLightx", (void*)glLightx},
{"glLightxv", (void*)glLightxv},
{"glLineWidthx", (void*)glLineWidthx},
{"glLoadIdentity", (void*)glLoadIdentity},
{"glLoadMatrixx", (void*)glLoadMatrixx},
{"glLogicOp", (void*)glLogicOp},
{"glMaterialx", (void*)glMaterialx},
{"glMaterialxv", (void*)glMaterialxv},
{"glMatrixMode", (void*)glMatrixMode},
{"glMultMatrixx", (void*)glMultMatrixx},
{"glMultiTexCoord4x", (void*)glMultiTexCoord4x},
{"glNormal3x", (void*)glNormal3x},
{"glNormalPointer", (void*)glNormalPointer},
{"glOrthox", (void*)glOrthox},
{"glPixelStorei", (void*)glPixelStorei},
{"glPointParameterx", (void*)glPointParameterx},
{"glPointParameterxv", (void*)glPointParameterxv},
{"glPointSizex", (void*)glPointSizex},
{"glPolygonOffsetx", (void*)glPolygonOffsetx},
{"glPopMatrix", (void*)glPopMatrix},
{"glPushMatrix", (void*)glPushMatrix},
{"glReadPixels", (void*)glReadPixels},
{"glRotatex", (void*)glRotatex},
{"glSampleCoverage", (void*)glSampleCoverage},
{"glSampleCoveragex", (void*)glSampleCoveragex},
{"glScalex", (void*)glScalex},
{"glScissor", (void*)glScissor},
{"glShadeModel", (void*)glShadeModel},
{"glStencilFunc", (void*)glStencilFunc},
{"glStencilMask", (void*)glStencilMask},
{"glStencilOp", (void*)glStencilOp},
{"glTexCoordPointer", (void*)glTexCoordPointer},
{"glTexEnvi", (void*)glTexEnvi},
{"glTexEnvx", (void*)glTexEnvx},
{"glTexEnviv", (void*)glTexEnviv},
{"glTexEnvxv", (void*)glTexEnvxv},
{"glTexImage2D", (void*)glTexImage2D},
{"glTexParameteri", (void*)glTexParameteri},
{"glTexParameterx", (void*)glTexParameterx},
{"glTexParameteriv", (void*)glTexParameteriv},
{"glTexParameterxv", (void*)glTexParameterxv},
{"glTexSubImage2D", (void*)glTexSubImage2D},
{"glTranslatex", (void*)glTranslatex},
{"glVertexPointer", (void*)glVertexPointer},
{"glViewport", (void*)glViewport},
{"glPointSizePointerOES", (void*)glPointSizePointerOES},
{"glBlendEquationSeparateOES", (void*)glBlendEquationSeparateOES},
{"glBlendFuncSeparateOES", (void*)glBlendFuncSeparateOES},
{"glBlendEquationOES", (void*)glBlendEquationOES},
{"glDrawTexsOES", (void*)glDrawTexsOES},
{"glDrawTexiOES", (void*)glDrawTexiOES},
{"glDrawTexxOES", (void*)glDrawTexxOES},
{"glDrawTexsvOES", (void*)glDrawTexsvOES},
{"glDrawTexivOES", (void*)glDrawTexivOES},
{"glDrawTexxvOES", (void*)glDrawTexxvOES},
{"glDrawTexfOES", (void*)glDrawTexfOES},
{"glDrawTexfvOES", (void*)glDrawTexfvOES},
{"glEGLImageTargetTexture2DOES", (void*)glEGLImageTargetTexture2DOES},
{"glEGLImageTargetRenderbufferStorageOES", (void*)glEGLImageTargetRenderbufferStorageOES},
{"glAlphaFuncxOES", (void*)glAlphaFuncxOES},
{"glClearColorxOES", (void*)glClearColorxOES},
{"glClearDepthxOES", (void*)glClearDepthxOES},
{"glClipPlanexOES", (void*)glClipPlanexOES},
{"glClipPlanexIMG", (void*)glClipPlanexIMG},
{"glColor4xOES", (void*)glColor4xOES},
{"glDepthRangexOES", (void*)glDepthRangexOES},
{"glFogxOES", (void*)glFogxOES},
{"glFogxvOES", (void*)glFogxvOES},
{"glFrustumxOES", (void*)glFrustumxOES},
{"glGetClipPlanexOES", (void*)glGetClipPlanexOES},
{"glGetClipPlanex", (void*)glGetClipPlanex},
{"glGetFixedvOES", (void*)glGetFixedvOES},
{"glGetLightxvOES", (void*)glGetLightxvOES},
{"glGetMaterialxvOES", (void*)glGetMaterialxvOES},
{"glGetTexEnvxvOES", (void*)glGetTexEnvxvOES},
{"glGetTexParameterxvOES", (void*)glGetTexParameterxvOES},
{"glLightModelxOES", (void*)glLightModelxOES},
{"glLightModelxvOES", (void*)glLightModelxvOES},
{"glLightxOES", (void*)glLightxOES},
{"glLightxvOES", (void*)glLightxvOES},
{"glLineWidthxOES", (void*)glLineWidthxOES},
{"glLoadMatrixxOES", (void*)glLoadMatrixxOES},
{"glMaterialxOES", (void*)glMaterialxOES},
{"glMaterialxvOES", (void*)glMaterialxvOES},
{"glMultMatrixxOES", (void*)glMultMatrixxOES},
{"glMultiTexCoord4xOES", (void*)glMultiTexCoord4xOES},
{"glNormal3xOES", (void*)glNormal3xOES},
{"glOrthoxOES", (void*)glOrthoxOES},
{"glPointParameterxOES", (void*)glPointParameterxOES},
{"glPointParameterxvOES", (void*)glPointParameterxvOES},
{"glPointSizexOES", (void*)glPointSizexOES},
{"glPolygonOffsetxOES", (void*)glPolygonOffsetxOES},
{"glRotatexOES", (void*)glRotatexOES},
{"glSampleCoveragexOES", (void*)glSampleCoveragexOES},
{"glScalexOES", (void*)glScalexOES},
{"glTexEnvxOES", (void*)glTexEnvxOES},
{"glTexEnvxvOES", (void*)glTexEnvxvOES},
{"glTexParameterxOES", (void*)glTexParameterxOES},
{"glTexParameterxvOES", (void*)glTexParameterxvOES},
{"glTranslatexOES", (void*)glTranslatexOES},
{"glIsRenderbufferOES", (void*)glIsRenderbufferOES},
{"glBindRenderbufferOES", (void*)glBindRenderbufferOES},
{"glDeleteRenderbuffersOES", (void*)glDeleteRenderbuffersOES},
{"glGenRenderbuffersOES", (void*)glGenRenderbuffersOES},
{"glRenderbufferStorageOES", (void*)glRenderbufferStorageOES},
{"glGetRenderbufferParameterivOES", (void*)glGetRenderbufferParameterivOES},
{"glIsFramebufferOES", (void*)glIsFramebufferOES},
{"glBindFramebufferOES", (void*)glBindFramebufferOES},
{"glDeleteFramebuffersOES", (void*)glDeleteFramebuffersOES},
{"glGenFramebuffersOES", (void*)glGenFramebuffersOES},
{"glCheckFramebufferStatusOES", (void*)glCheckFramebufferStatusOES},
{"glFramebufferRenderbufferOES", (void*)glFramebufferRenderbufferOES},
{"glFramebufferTexture2DOES", (void*)glFramebufferTexture2DOES},
{"glGetFramebufferAttachmentParameterivOES", (void*)glGetFramebufferAttachmentParameterivOES},
{"glGenerateMipmapOES", (void*)glGenerateMipmapOES},
{"glMapBufferOES", (void*)glMapBufferOES},
{"glUnmapBufferOES", (void*)glUnmapBufferOES},
{"glGetBufferPointervOES", (void*)glGetBufferPointervOES},
{"glCurrentPaletteMatrixOES", (void*)glCurrentPaletteMatrixOES},
{"glLoadPaletteFromModelViewMatrixOES", (void*)glLoadPaletteFromModelViewMatrixOES},
{"glMatrixIndexPointerOES", (void*)glMatrixIndexPointerOES},
{"glWeightPointerOES", (void*)glWeightPointerOES},
{"glQueryMatrixxOES", (void*)glQueryMatrixxOES},
{"glDepthRangefOES", (void*)glDepthRangefOES},
{"glFrustumfOES", (void*)glFrustumfOES},
{"glOrthofOES", (void*)glOrthofOES},
{"glClipPlanefOES", (void*)glClipPlanefOES},
{"glClipPlanefIMG", (void*)glClipPlanefIMG},
{"glGetClipPlanefOES", (void*)glGetClipPlanefOES},
{"glClearDepthfOES", (void*)glClearDepthfOES},
{"glTexGenfOES", (void*)glTexGenfOES},
{"glTexGenfvOES", (void*)glTexGenfvOES},
{"glTexGeniOES", (void*)glTexGeniOES},
{"glTexGenivOES", (void*)glTexGenivOES},
{"glTexGenxOES", (void*)glTexGenxOES},
{"glTexGenxvOES", (void*)glTexGenxvOES},
{"glGetTexGenfvOES", (void*)glGetTexGenfvOES},
{"glGetTexGenivOES", (void*)glGetTexGenivOES},
{"glGetTexGenxvOES", (void*)glGetTexGenxvOES},
{"glBindVertexArrayOES", (void*)glBindVertexArrayOES},
{"glDeleteVertexArraysOES", (void*)glDeleteVertexArraysOES},
{"glGenVertexArraysOES", (void*)glGenVertexArraysOES},
{"glIsVertexArrayOES", (void*)glIsVertexArrayOES},
{"glDiscardFramebufferEXT", (void*)glDiscardFramebufferEXT},
{"glMultiDrawArraysEXT", (void*)glMultiDrawArraysEXT},
{"glMultiDrawElementsEXT", (void*)glMultiDrawElementsEXT},
{"glMultiDrawArraysSUN", (void*)glMultiDrawArraysSUN},
{"glMultiDrawElementsSUN", (void*)glMultiDrawElementsSUN},
{"glRenderbufferStorageMultisampleIMG", (void*)glRenderbufferStorageMultisampleIMG},
{"glFramebufferTexture2DMultisampleIMG", (void*)glFramebufferTexture2DMultisampleIMG},
{"glDeleteFencesNV", (void*)glDeleteFencesNV},
{"glGenFencesNV", (void*)glGenFencesNV},
{"glIsFenceNV", (void*)glIsFenceNV},
{"glTestFenceNV", (void*)glTestFenceNV},
{"glGetFenceivNV", (void*)glGetFenceivNV},
{"glFinishFenceNV", (void*)glFinishFenceNV},
{"glSetFenceNV", (void*)glSetFenceNV},
{"glGetDriverControlsQCOM", (void*)glGetDriverControlsQCOM},
{"glGetDriverControlStringQCOM", (void*)glGetDriverControlStringQCOM},
{"glEnableDriverControlQCOM", (void*)glEnableDriverControlQCOM},
{"glDisableDriverControlQCOM", (void*)glDisableDriverControlQCOM},
{"glExtGetTexturesQCOM", (void*)glExtGetTexturesQCOM},
{"glExtGetBuffersQCOM", (void*)glExtGetBuffersQCOM},
{"glExtGetRenderbuffersQCOM", (void*)glExtGetRenderbuffersQCOM},
{"glExtGetFramebuffersQCOM", (void*)glExtGetFramebuffersQCOM},
{"glExtGetTexLevelParameterivQCOM", (void*)glExtGetTexLevelParameterivQCOM},
{"glExtTexObjectStateOverrideiQCOM", (void*)glExtTexObjectStateOverrideiQCOM},
{"glExtGetTexSubImageQCOM", (void*)glExtGetTexSubImageQCOM},
{"glExtGetBufferPointervQCOM", (void*)glExtGetBufferPointervQCOM},
{"glExtGetShadersQCOM", (void*)glExtGetShadersQCOM},
{"glExtGetProgramsQCOM", (void*)glExtGetProgramsQCOM},
{"glExtIsProgramBinaryQCOM", (void*)glExtIsProgramBinaryQCOM},
{"glExtGetProgramBinarySourceQCOM", (void*)glExtGetProgramBinarySourceQCOM},
{"glStartTilingQCOM", (void*)glStartTilingQCOM},
{"glEndTilingQCOM", (void*)glEndTilingQCOM},
};
static const int gl_num_funcs = sizeof(gl_funcs_by_name) / sizeof(struct _gl_funcs_by_name);
#endif

View file

@ -0,0 +1,300 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __GUARD_gl_opcodes_h_
#define __GUARD_gl_opcodes_h_
#define OP_glAlphaFunc 1024
#define OP_glClearColor 1025
#define OP_glClearDepthf 1026
#define OP_glClipPlanef 1027
#define OP_glColor4f 1028
#define OP_glDepthRangef 1029
#define OP_glFogf 1030
#define OP_glFogfv 1031
#define OP_glFrustumf 1032
#define OP_glGetClipPlanef 1033
#define OP_glGetFloatv 1034
#define OP_glGetLightfv 1035
#define OP_glGetMaterialfv 1036
#define OP_glGetTexEnvfv 1037
#define OP_glGetTexParameterfv 1038
#define OP_glLightModelf 1039
#define OP_glLightModelfv 1040
#define OP_glLightf 1041
#define OP_glLightfv 1042
#define OP_glLineWidth 1043
#define OP_glLoadMatrixf 1044
#define OP_glMaterialf 1045
#define OP_glMaterialfv 1046
#define OP_glMultMatrixf 1047
#define OP_glMultiTexCoord4f 1048
#define OP_glNormal3f 1049
#define OP_glOrthof 1050
#define OP_glPointParameterf 1051
#define OP_glPointParameterfv 1052
#define OP_glPointSize 1053
#define OP_glPolygonOffset 1054
#define OP_glRotatef 1055
#define OP_glScalef 1056
#define OP_glTexEnvf 1057
#define OP_glTexEnvfv 1058
#define OP_glTexParameterf 1059
#define OP_glTexParameterfv 1060
#define OP_glTranslatef 1061
#define OP_glActiveTexture 1062
#define OP_glAlphaFuncx 1063
#define OP_glBindBuffer 1064
#define OP_glBindTexture 1065
#define OP_glBlendFunc 1066
#define OP_glBufferData 1067
#define OP_glBufferSubData 1068
#define OP_glClear 1069
#define OP_glClearColorx 1070
#define OP_glClearDepthx 1071
#define OP_glClearStencil 1072
#define OP_glClientActiveTexture 1073
#define OP_glColor4ub 1074
#define OP_glColor4x 1075
#define OP_glColorMask 1076
#define OP_glColorPointer 1077
#define OP_glCompressedTexImage2D 1078
#define OP_glCompressedTexSubImage2D 1079
#define OP_glCopyTexImage2D 1080
#define OP_glCopyTexSubImage2D 1081
#define OP_glCullFace 1082
#define OP_glDeleteBuffers 1083
#define OP_glDeleteTextures 1084
#define OP_glDepthFunc 1085
#define OP_glDepthMask 1086
#define OP_glDepthRangex 1087
#define OP_glDisable 1088
#define OP_glDisableClientState 1089
#define OP_glDrawArrays 1090
#define OP_glDrawElements 1091
#define OP_glEnable 1092
#define OP_glEnableClientState 1093
#define OP_glFinish 1094
#define OP_glFlush 1095
#define OP_glFogx 1096
#define OP_glFogxv 1097
#define OP_glFrontFace 1098
#define OP_glFrustumx 1099
#define OP_glGetBooleanv 1100
#define OP_glGetBufferParameteriv 1101
#define OP_glClipPlanex 1102
#define OP_glGenBuffers 1103
#define OP_glGenTextures 1104
#define OP_glGetError 1105
#define OP_glGetFixedv 1106
#define OP_glGetIntegerv 1107
#define OP_glGetLightxv 1108
#define OP_glGetMaterialxv 1109
#define OP_glGetPointerv 1110
#define OP_glGetString 1111
#define OP_glGetTexEnviv 1112
#define OP_glGetTexEnvxv 1113
#define OP_glGetTexParameteriv 1114
#define OP_glGetTexParameterxv 1115
#define OP_glHint 1116
#define OP_glIsBuffer 1117
#define OP_glIsEnabled 1118
#define OP_glIsTexture 1119
#define OP_glLightModelx 1120
#define OP_glLightModelxv 1121
#define OP_glLightx 1122
#define OP_glLightxv 1123
#define OP_glLineWidthx 1124
#define OP_glLoadIdentity 1125
#define OP_glLoadMatrixx 1126
#define OP_glLogicOp 1127
#define OP_glMaterialx 1128
#define OP_glMaterialxv 1129
#define OP_glMatrixMode 1130
#define OP_glMultMatrixx 1131
#define OP_glMultiTexCoord4x 1132
#define OP_glNormal3x 1133
#define OP_glNormalPointer 1134
#define OP_glOrthox 1135
#define OP_glPixelStorei 1136
#define OP_glPointParameterx 1137
#define OP_glPointParameterxv 1138
#define OP_glPointSizex 1139
#define OP_glPolygonOffsetx 1140
#define OP_glPopMatrix 1141
#define OP_glPushMatrix 1142
#define OP_glReadPixels 1143
#define OP_glRotatex 1144
#define OP_glSampleCoverage 1145
#define OP_glSampleCoveragex 1146
#define OP_glScalex 1147
#define OP_glScissor 1148
#define OP_glShadeModel 1149
#define OP_glStencilFunc 1150
#define OP_glStencilMask 1151
#define OP_glStencilOp 1152
#define OP_glTexCoordPointer 1153
#define OP_glTexEnvi 1154
#define OP_glTexEnvx 1155
#define OP_glTexEnviv 1156
#define OP_glTexEnvxv 1157
#define OP_glTexImage2D 1158
#define OP_glTexParameteri 1159
#define OP_glTexParameterx 1160
#define OP_glTexParameteriv 1161
#define OP_glTexParameterxv 1162
#define OP_glTexSubImage2D 1163
#define OP_glTranslatex 1164
#define OP_glVertexPointer 1165
#define OP_glViewport 1166
#define OP_glPointSizePointerOES 1167
#define OP_glVertexPointerOffset 1168
#define OP_glColorPointerOffset 1169
#define OP_glNormalPointerOffset 1170
#define OP_glPointSizePointerOffset 1171
#define OP_glTexCoordPointerOffset 1172
#define OP_glWeightPointerOffset 1173
#define OP_glMatrixIndexPointerOffset 1174
#define OP_glVertexPointerData 1175
#define OP_glColorPointerData 1176
#define OP_glNormalPointerData 1177
#define OP_glTexCoordPointerData 1178
#define OP_glPointSizePointerData 1179
#define OP_glWeightPointerData 1180
#define OP_glMatrixIndexPointerData 1181
#define OP_glDrawElementsOffset 1182
#define OP_glDrawElementsData 1183
#define OP_glGetCompressedTextureFormats 1184
#define OP_glFinishRoundTrip 1185
#define OP_glBlendEquationSeparateOES 1186
#define OP_glBlendFuncSeparateOES 1187
#define OP_glBlendEquationOES 1188
#define OP_glDrawTexsOES 1189
#define OP_glDrawTexiOES 1190
#define OP_glDrawTexxOES 1191
#define OP_glDrawTexsvOES 1192
#define OP_glDrawTexivOES 1193
#define OP_glDrawTexxvOES 1194
#define OP_glDrawTexfOES 1195
#define OP_glDrawTexfvOES 1196
#define OP_glEGLImageTargetTexture2DOES 1197
#define OP_glEGLImageTargetRenderbufferStorageOES 1198
#define OP_glAlphaFuncxOES 1199
#define OP_glClearColorxOES 1200
#define OP_glClearDepthxOES 1201
#define OP_glClipPlanexOES 1202
#define OP_glClipPlanexIMG 1203
#define OP_glColor4xOES 1204
#define OP_glDepthRangexOES 1205
#define OP_glFogxOES 1206
#define OP_glFogxvOES 1207
#define OP_glFrustumxOES 1208
#define OP_glGetClipPlanexOES 1209
#define OP_glGetClipPlanex 1210
#define OP_glGetFixedvOES 1211
#define OP_glGetLightxvOES 1212
#define OP_glGetMaterialxvOES 1213
#define OP_glGetTexEnvxvOES 1214
#define OP_glGetTexParameterxvOES 1215
#define OP_glLightModelxOES 1216
#define OP_glLightModelxvOES 1217
#define OP_glLightxOES 1218
#define OP_glLightxvOES 1219
#define OP_glLineWidthxOES 1220
#define OP_glLoadMatrixxOES 1221
#define OP_glMaterialxOES 1222
#define OP_glMaterialxvOES 1223
#define OP_glMultMatrixxOES 1224
#define OP_glMultiTexCoord4xOES 1225
#define OP_glNormal3xOES 1226
#define OP_glOrthoxOES 1227
#define OP_glPointParameterxOES 1228
#define OP_glPointParameterxvOES 1229
#define OP_glPointSizexOES 1230
#define OP_glPolygonOffsetxOES 1231
#define OP_glRotatexOES 1232
#define OP_glSampleCoveragexOES 1233
#define OP_glScalexOES 1234
#define OP_glTexEnvxOES 1235
#define OP_glTexEnvxvOES 1236
#define OP_glTexParameterxOES 1237
#define OP_glTexParameterxvOES 1238
#define OP_glTranslatexOES 1239
#define OP_glIsRenderbufferOES 1240
#define OP_glBindRenderbufferOES 1241
#define OP_glDeleteRenderbuffersOES 1242
#define OP_glGenRenderbuffersOES 1243
#define OP_glRenderbufferStorageOES 1244
#define OP_glGetRenderbufferParameterivOES 1245
#define OP_glIsFramebufferOES 1246
#define OP_glBindFramebufferOES 1247
#define OP_glDeleteFramebuffersOES 1248
#define OP_glGenFramebuffersOES 1249
#define OP_glCheckFramebufferStatusOES 1250
#define OP_glFramebufferRenderbufferOES 1251
#define OP_glFramebufferTexture2DOES 1252
#define OP_glGetFramebufferAttachmentParameterivOES 1253
#define OP_glGenerateMipmapOES 1254
#define OP_glMapBufferOES 1255
#define OP_glUnmapBufferOES 1256
#define OP_glGetBufferPointervOES 1257
#define OP_glCurrentPaletteMatrixOES 1258
#define OP_glLoadPaletteFromModelViewMatrixOES 1259
#define OP_glMatrixIndexPointerOES 1260
#define OP_glWeightPointerOES 1261
#define OP_glQueryMatrixxOES 1262
#define OP_glDepthRangefOES 1263
#define OP_glFrustumfOES 1264
#define OP_glOrthofOES 1265
#define OP_glClipPlanefOES 1266
#define OP_glClipPlanefIMG 1267
#define OP_glGetClipPlanefOES 1268
#define OP_glClearDepthfOES 1269
#define OP_glTexGenfOES 1270
#define OP_glTexGenfvOES 1271
#define OP_glTexGeniOES 1272
#define OP_glTexGenivOES 1273
#define OP_glTexGenxOES 1274
#define OP_glTexGenxvOES 1275
#define OP_glGetTexGenfvOES 1276
#define OP_glGetTexGenivOES 1277
#define OP_glGetTexGenxvOES 1278
#define OP_glBindVertexArrayOES 1279
#define OP_glDeleteVertexArraysOES 1280
#define OP_glGenVertexArraysOES 1281
#define OP_glIsVertexArrayOES 1282
#define OP_glDiscardFramebufferEXT 1283
#define OP_glMultiDrawArraysEXT 1284
#define OP_glMultiDrawElementsEXT 1285
#define OP_glMultiDrawArraysSUN 1286
#define OP_glMultiDrawElementsSUN 1287
#define OP_glRenderbufferStorageMultisampleIMG 1288
#define OP_glFramebufferTexture2DMultisampleIMG 1289
#define OP_glDeleteFencesNV 1290
#define OP_glGenFencesNV 1291
#define OP_glIsFenceNV 1292
#define OP_glTestFenceNV 1293
#define OP_glGetFenceivNV 1294
#define OP_glFinishFenceNV 1295
#define OP_glSetFenceNV 1296
#define OP_glGetDriverControlsQCOM 1297
#define OP_glGetDriverControlStringQCOM 1298
#define OP_glEnableDriverControlQCOM 1299
#define OP_glDisableDriverControlQCOM 1300
#define OP_glExtGetTexturesQCOM 1301
#define OP_glExtGetBuffersQCOM 1302
#define OP_glExtGetRenderbuffersQCOM 1303
#define OP_glExtGetFramebuffersQCOM 1304
#define OP_glExtGetTexLevelParameterivQCOM 1305
#define OP_glExtTexObjectStateOverrideiQCOM 1306
#define OP_glExtGetTexSubImageQCOM 1307
#define OP_glExtGetBufferPointervQCOM 1308
#define OP_glExtGetShadersQCOM 1309
#define OP_glExtGetProgramsQCOM 1310
#define OP_glExtIsProgramBinaryQCOM 1311
#define OP_glExtGetProgramBinarySourceQCOM 1312
#define OP_glStartTilingQCOM 1313
#define OP_glEndTilingQCOM 1314
#define OP_last 1315
#endif

View file

@ -0,0 +1,20 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __GL_TYPES__H
#define __GL_TYPES__H
#include "gl_base_types.h"
#endif

View file

@ -0,0 +1,12 @@
LOCAL_PATH := $(call my-dir)
### GLESv2 implementation ###########################################
$(call emugl-begin-shared-library,libGLESv2_emulation)
$(call emugl-import,libOpenglSystemCommon libGLESv2_enc lib_renderControl_enc)
LOCAL_CFLAGS += -DLOG_TAG=\"GLESv2_emulation\" -DGL_GLEXT_PROTOTYPES
LOCAL_SRC_FILES := gl2.cpp
LOCAL_MODULE_RELATIVE_PATH := egl
$(call emugl-end-module)

View file

@ -0,0 +1,177 @@
/*
* Copyright 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "EGLClientIface.h"
#include "HostConnection.h"
#include "GL2Encoder.h"
#include "GLES/gl.h"
#include "GLES/glext.h"
#include "ErrorLog.h"
#include "gralloc_cb.h"
#include "ThreadInfo.h"
#include "EGLImage.h"
//XXX: fix this macro to get the context from fast tls path
#define GET_CONTEXT GL2Encoder * ctx = getEGLThreadInfo()->hostConn->gl2Encoder();
#include "gl2_entry.cpp"
//The functions table
#include "gl2_ftable.h"
static EGLClient_eglInterface * s_egl = NULL;
static EGLClient_glesInterface * s_gl = NULL;
#define DEFINE_AND_VALIDATE_HOST_CONNECTION(ret) \
HostConnection *hostCon = HostConnection::get(); \
if (!hostCon) { \
ALOGE("egl: Failed to get host connection\n"); \
return ret; \
} \
renderControl_encoder_context_t *rcEnc = hostCon->rcEncoder(); \
if (!rcEnc) { \
ALOGE("egl: Failed to get renderControl encoder context\n"); \
return ret; \
}
//GL extensions
void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES img)
{
(void)self;
(void)target;
DBG("glEGLImageTargetTexture2DOES v2 target=%#x img=%p\n", target, img);
EGLImage_t *image = (EGLImage_t*)img;
if (image->target == EGL_NATIVE_BUFFER_ANDROID) {
//TODO: check error - we don't have a way to set gl error
android_native_buffer_t* native_buffer = image->native_buffer;
if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) {
return;
}
if (native_buffer->common.version != sizeof(android_native_buffer_t)) {
return;
}
GET_CONTEXT;
DEFINE_AND_VALIDATE_HOST_CONNECTION();
ctx->override2DTextureTarget(target);
rcEnc->rcBindTexture(rcEnc, ((cb_handle_t *)(native_buffer->handle))->hostHandle);
ctx->restore2DTextureTarget();
}
else if (image->target == EGL_GL_TEXTURE_2D_KHR) {
GET_CONTEXT;
ctx->override2DTextureTarget(target);
GLeglImageOES hostImage = reinterpret_cast<GLeglImageOES>((intptr_t)image->host_egl_image);
ctx->m_glEGLImageTargetTexture2DOES_enc(self, target, hostImage);
ctx->restore2DTextureTarget();
}
}
void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES image)
{
(void)self;
(void)target;
DBG("glEGLImageTargetRenderbufferStorageOES v2 image=%p\n", image);
//TODO: check error - we don't have a way to set gl error
android_native_buffer_t* native_buffer = (android_native_buffer_t*)image;
if (native_buffer->common.magic != ANDROID_NATIVE_BUFFER_MAGIC) {
return;
}
if (native_buffer->common.version != sizeof(android_native_buffer_t)) {
return;
}
DEFINE_AND_VALIDATE_HOST_CONNECTION();
rcEnc->rcBindRenderbuffer(rcEnc, ((cb_handle_t *)(native_buffer->handle))->hostHandle);
return;
}
void * getProcAddress(const char * procname)
{
// search in GL function table
for (int i=0; i<gl2_num_funcs; i++) {
if (!strcmp(gl2_funcs_by_name[i].name, procname)) {
return gl2_funcs_by_name[i].proc;
}
}
return NULL;
}
void finish()
{
glFinish();
}
const GLubyte *my_glGetString (void *self, GLenum name)
{
(void)self;
//see ref in https://www.khronos.org/opengles/sdk/docs/man
//name in glGetString can be one of the following five values
switch (name) {
case GL_VERSION:
case GL_VENDOR:
case GL_RENDERER:
case GL_SHADING_LANGUAGE_VERSION:
case GL_EXTENSIONS:
if (s_egl) {
return (const GLubyte*)s_egl->getGLString(name);
}
break;
default:
GET_CONTEXT;
ctx->setError(GL_INVALID_ENUM);
break;
}
return NULL;
}
void init()
{
GET_CONTEXT;
ctx->m_glEGLImageTargetTexture2DOES_enc = ctx->glEGLImageTargetTexture2DOES;
ctx->glEGLImageTargetTexture2DOES = &glEGLImageTargetTexture2DOES;
ctx->glEGLImageTargetRenderbufferStorageOES = &glEGLImageTargetRenderbufferStorageOES;
ctx->glGetString = &my_glGetString;
}
extern "C" {
EGLClient_glesInterface * init_emul_gles(EGLClient_eglInterface *eglIface)
{
s_egl = eglIface;
if (!s_gl) {
s_gl = new EGLClient_glesInterface();
s_gl->getProcAddress = getProcAddress;
s_gl->finish = finish;
s_gl->init = init;
}
return s_gl;
}
} //extern

View file

@ -0,0 +1,20 @@
LOCAL_PATH := $(call my-dir)
### GLESv2_enc Encoder ###########################################
$(call emugl-begin-shared-library,libGLESv2_enc)
LOCAL_SRC_FILES := \
GL2EncoderUtils.cpp \
GL2Encoder.cpp \
gl2_client_context.cpp \
gl2_enc.cpp \
gl2_entry.cpp
LOCAL_CFLAGS += -DLOG_TAG=\"emuglGLESv2_enc\"
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
$(call emugl-import,libOpenglCodecCommon)
$(call emugl-end-module)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,251 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _GL2_ENCODER_H_
#define _GL2_ENCODER_H_
#include "gl2_enc.h"
#include "GLClientState.h"
#include "GLSharedGroup.h"
#include "FixedBuffer.h"
class GL2Encoder : public gl2_encoder_context_t {
public:
GL2Encoder(IOStream *stream, ChecksumCalculator* protocol);
virtual ~GL2Encoder();
void setClientState(GLClientState *state) {
m_state = state;
}
void setSharedGroup(GLSharedGroupPtr shared){ m_shared = shared; }
const GLClientState *state() { return m_state; }
const GLSharedGroupPtr shared() { return m_shared; }
void flush() { m_stream->flush(); }
void setInitialized(){ m_initialized = true; };
bool isInitialized(){ return m_initialized; };
virtual void setError(GLenum error){ m_error = error; };
virtual GLenum getError() { return m_error; };
void override2DTextureTarget(GLenum target);
void restore2DTextureTarget();
private:
bool m_initialized;
GLClientState *m_state;
GLSharedGroupPtr m_shared;
GLenum m_error;
GLint *m_compressedTextureFormats;
GLint m_num_compressedTextureFormats;
GLint *getCompressedTextureFormats();
GLint m_max_cubeMapTextureSize;
GLint m_max_renderBufferSize;
GLint m_max_textureSize;
FixedBuffer m_fixedBuffer;
void sendVertexAttributes(GLint first, GLsizei count);
bool updateHostTexture2DBinding(GLenum texUnit, GLenum newTarget);
void checkValidUniformParam(void * self, GLsizei count, GLboolean transpose);
void getHostLocation(void *self, GLint location, GLint *hostLoc);
glGetError_client_proc_t m_glGetError_enc;
static GLenum s_glGetError(void * self);
glFlush_client_proc_t m_glFlush_enc;
static void s_glFlush(void * self);
glPixelStorei_client_proc_t m_glPixelStorei_enc;
static void s_glPixelStorei(void *self, GLenum param, GLint value);
glGetString_client_proc_t m_glGetString_enc;
static const GLubyte * s_glGetString(void *self, GLenum name);
glBindBuffer_client_proc_t m_glBindBuffer_enc;
static void s_glBindBuffer(void *self, GLenum target, GLuint id);
glBufferData_client_proc_t m_glBufferData_enc;
static void s_glBufferData(void *self, GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
glBufferSubData_client_proc_t m_glBufferSubData_enc;
static void s_glBufferSubData(void *self, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
glDeleteBuffers_client_proc_t m_glDeleteBuffers_enc;
static void s_glDeleteBuffers(void *self, GLsizei n, const GLuint * buffers);
glDrawArrays_client_proc_t m_glDrawArrays_enc;
static void s_glDrawArrays(void *self, GLenum mode, GLint first, GLsizei count);
glDrawElements_client_proc_t m_glDrawElements_enc;
static void s_glDrawElements(void *self, GLenum mode, GLsizei count, GLenum type, const void *indices);
glGetIntegerv_client_proc_t m_glGetIntegerv_enc;
static void s_glGetIntegerv(void *self, GLenum pname, GLint *ptr);
glGetFloatv_client_proc_t m_glGetFloatv_enc;
static void s_glGetFloatv(void *self, GLenum pname, GLfloat *ptr);
glGetBooleanv_client_proc_t m_glGetBooleanv_enc;
static void s_glGetBooleanv(void *self, GLenum pname, GLboolean *ptr);
glVertexAttribPointer_client_proc_t m_glVertexAttribPointer_enc;
static void s_glVertexAttribPointer(void *self, GLuint indx, GLint size, GLenum type,
GLboolean normalized, GLsizei stride, const GLvoid * ptr);
glEnableVertexAttribArray_client_proc_t m_glEnableVertexAttribArray_enc;
static void s_glEnableVertexAttribArray(void *self, GLuint index);
glDisableVertexAttribArray_client_proc_t m_glDisableVertexAttribArray_enc;
static void s_glDisableVertexAttribArray(void *self, GLuint index);
glGetVertexAttribiv_client_proc_t m_glGetVertexAttribiv_enc;
static void s_glGetVertexAttribiv(void *self, GLuint index, GLenum pname, GLint *params);
glGetVertexAttribfv_client_proc_t m_glGetVertexAttribfv_enc;
static void s_glGetVertexAttribfv(void *self, GLuint index, GLenum pname, GLfloat *params);
glGetVertexAttribPointerv_client_proc_t m_glGetVertexAttribPointerv_enc;
static void s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pname, GLvoid **pointer);
static void s_glShaderBinary(void *self, GLsizei n, const GLuint *shaders, GLenum binaryformat, const void* binary, GLsizei length);
static void s_glShaderSource(void *self, GLuint shader, GLsizei count, const GLchar * const *string, const GLint *length);
static void s_glFinish(void *self);
glLinkProgram_client_proc_t m_glLinkProgram_enc;
static void s_glLinkProgram(void *self, GLuint program);
glDeleteProgram_client_proc_t m_glDeleteProgram_enc;
static void s_glDeleteProgram(void * self, GLuint program);
glGetUniformiv_client_proc_t m_glGetUniformiv_enc;
static void s_glGetUniformiv(void *self, GLuint program, GLint location , GLint *params);
glGetUniformfv_client_proc_t m_glGetUniformfv_enc;
static void s_glGetUniformfv(void *self, GLuint program, GLint location , GLfloat *params);
glCreateProgram_client_proc_t m_glCreateProgram_enc;
static GLuint s_glCreateProgram(void *self);
glCreateShader_client_proc_t m_glCreateShader_enc;
static GLuint s_glCreateShader(void *self, GLenum shaderType);
glDeleteShader_client_proc_t m_glDeleteShader_enc;
static void s_glDeleteShader(void *self, GLuint shader);
glAttachShader_client_proc_t m_glAttachShader_enc;
static void s_glAttachShader(void *self, GLuint program, GLuint shader);
glDetachShader_client_proc_t m_glDetachShader_enc;
static void s_glDetachShader(void *self, GLuint program, GLuint shader);
glGetAttachedShaders_client_proc_t m_glGetAttachedShaders_enc;
static void s_glGetAttachedShaders(void *self, GLuint program, GLsizei maxCount,
GLsizei* count, GLuint* shaders);
glGetShaderSource_client_proc_t m_glGetShaderSource_enc;
static void s_glGetShaderSource(void *self, GLuint shader, GLsizei bufsize,
GLsizei* length, GLchar* source);
glGetShaderInfoLog_client_proc_t m_glGetShaderInfoLog_enc;
static void s_glGetShaderInfoLog(void *self,GLuint shader,
GLsizei bufsize, GLsizei* length, GLchar* infolog);
glGetProgramInfoLog_client_proc_t m_glGetProgramInfoLog_enc;
static void s_glGetProgramInfoLog(void *self,GLuint program,
GLsizei bufsize, GLsizei* length, GLchar* infolog);
glGetUniformLocation_client_proc_t m_glGetUniformLocation_enc;
static int s_glGetUniformLocation(void *self, GLuint program, const GLchar *name);
glUseProgram_client_proc_t m_glUseProgram_enc;
glUniform1f_client_proc_t m_glUniform1f_enc;
glUniform1fv_client_proc_t m_glUniform1fv_enc;
glUniform1i_client_proc_t m_glUniform1i_enc;
glUniform1iv_client_proc_t m_glUniform1iv_enc;
glUniform2f_client_proc_t m_glUniform2f_enc;
glUniform2fv_client_proc_t m_glUniform2fv_enc;
glUniform2i_client_proc_t m_glUniform2i_enc;
glUniform2iv_client_proc_t m_glUniform2iv_enc;
glUniform3f_client_proc_t m_glUniform3f_enc;
glUniform3fv_client_proc_t m_glUniform3fv_enc;
glUniform3i_client_proc_t m_glUniform3i_enc;
glUniform3iv_client_proc_t m_glUniform3iv_enc;
glUniform4f_client_proc_t m_glUniform4f_enc;
glUniform4fv_client_proc_t m_glUniform4fv_enc;
glUniform4i_client_proc_t m_glUniform4i_enc;
glUniform4iv_client_proc_t m_glUniform4iv_enc;
glUniformMatrix2fv_client_proc_t m_glUniformMatrix2fv_enc;
glUniformMatrix3fv_client_proc_t m_glUniformMatrix3fv_enc;
glUniformMatrix4fv_client_proc_t m_glUniformMatrix4fv_enc;
static void s_glUseProgram(void *self, GLuint program);
static void s_glUniform1f(void *self , GLint location, GLfloat x);
static void s_glUniform1fv(void *self , GLint location, GLsizei count, const GLfloat* v);
static void s_glUniform1i(void *self , GLint location, GLint x);
static void s_glUniform1iv(void *self , GLint location, GLsizei count, const GLint* v);
static void s_glUniform2f(void *self , GLint location, GLfloat x, GLfloat y);
static void s_glUniform2fv(void *self , GLint location, GLsizei count, const GLfloat* v);
static void s_glUniform2i(void *self , GLint location, GLint x, GLint y);
static void s_glUniform2iv(void *self , GLint location, GLsizei count, const GLint* v);
static void s_glUniform3f(void *self , GLint location, GLfloat x, GLfloat y, GLfloat z);
static void s_glUniform3fv(void *self , GLint location, GLsizei count, const GLfloat* v);
static void s_glUniform3i(void *self , GLint location, GLint x, GLint y, GLint z);
static void s_glUniform3iv(void *self , GLint location, GLsizei count, const GLint* v);
static void s_glUniform4f(void *self , GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
static void s_glUniform4fv(void *self , GLint location, GLsizei count, const GLfloat* v);
static void s_glUniform4i(void *self , GLint location, GLint x, GLint y, GLint z, GLint w);
static void s_glUniform4iv(void *self , GLint location, GLsizei count, const GLint* v);
static void s_glUniformMatrix2fv(void *self , GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
static void s_glUniformMatrix3fv(void *self , GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
static void s_glUniformMatrix4fv(void *self , GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
glActiveTexture_client_proc_t m_glActiveTexture_enc;
glBindTexture_client_proc_t m_glBindTexture_enc;
glDeleteTextures_client_proc_t m_glDeleteTextures_enc;
glGetTexParameterfv_client_proc_t m_glGetTexParameterfv_enc;
glGetTexParameteriv_client_proc_t m_glGetTexParameteriv_enc;
glTexParameterf_client_proc_t m_glTexParameterf_enc;
glTexParameterfv_client_proc_t m_glTexParameterfv_enc;
glTexParameteri_client_proc_t m_glTexParameteri_enc;
glTexParameteriv_client_proc_t m_glTexParameteriv_enc;
glTexImage2D_client_proc_t m_glTexImage2D_enc;
glTexSubImage2D_client_proc_t m_glTexSubImage2D_enc;
static void s_glActiveTexture(void* self, GLenum texture);
static void s_glBindTexture(void* self, GLenum target, GLuint texture);
static void s_glDeleteTextures(void* self, GLsizei n, const GLuint* textures);
static void s_glGetTexParameterfv(void* self, GLenum target, GLenum pname, GLfloat* params);
static void s_glGetTexParameteriv(void* self, GLenum target, GLenum pname, GLint* params);
static void s_glTexParameterf(void* self, GLenum target, GLenum pname, GLfloat param);
static void s_glTexParameterfv(void* self, GLenum target, GLenum pname, const GLfloat* params);
static void s_glTexParameteri(void* self, GLenum target, GLenum pname, GLint param);
static void s_glTexParameteriv(void* self, GLenum target, GLenum pname, const GLint* params);
static void s_glTexImage2D(void* self, GLenum target, GLint level, GLint internalformat,
GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
const GLvoid* pixels);
static void s_glTexSubImage2D(void* self, GLenum target, GLint level, GLint xoffset,
GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
const GLvoid* pixels);
public:
glEGLImageTargetTexture2DOES_client_proc_t m_glEGLImageTargetTexture2DOES_enc;
};
#endif

View file

@ -0,0 +1,43 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include "GL2Encoder.h"
#include <assert.h>
namespace glesv2_enc {
size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, GLenum type, int pack)
{
GL2Encoder *ctx = (GL2Encoder *)self;
assert (ctx->state() != NULL);
return ctx->state()->pixelDataSize(width, height, format, type, pack);
}
size_t pixelDataSize3D(void *self, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, int pack)
{
size_t layerSize = pixelDataSize(self, width, height, format, type, pack);
return layerSize * depth;
}
GLenum uniformType(void * self, GLuint program, GLint location)
{
GL2Encoder * ctx = (GL2Encoder *) self;
assert (ctx->shared() != NULL);
return ctx->shared()->getProgramUniformType(program, location);
}
} // namespace glesv2_enc

View file

@ -0,0 +1,27 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GL2_ENCODER_UTILS_H
#define GL2_ENCODER_UTILS_H
namespace glesv2_enc {
size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, GLenum type, int pack);
size_t pixelDataSize3D(void *self, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, int pack);
GLenum uniformType(void * self, GLuint program, GLint location);
} // namespace glesv2_enc
#endif

View file

@ -0,0 +1,223 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#include <string.h>
#include "gl2_client_context.h"
#include <stdio.h>
int gl2_client_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData)
{
glActiveTexture = (glActiveTexture_client_proc_t) getProc("glActiveTexture", userData);
glAttachShader = (glAttachShader_client_proc_t) getProc("glAttachShader", userData);
glBindAttribLocation = (glBindAttribLocation_client_proc_t) getProc("glBindAttribLocation", userData);
glBindBuffer = (glBindBuffer_client_proc_t) getProc("glBindBuffer", userData);
glBindFramebuffer = (glBindFramebuffer_client_proc_t) getProc("glBindFramebuffer", userData);
glBindRenderbuffer = (glBindRenderbuffer_client_proc_t) getProc("glBindRenderbuffer", userData);
glBindTexture = (glBindTexture_client_proc_t) getProc("glBindTexture", userData);
glBlendColor = (glBlendColor_client_proc_t) getProc("glBlendColor", userData);
glBlendEquation = (glBlendEquation_client_proc_t) getProc("glBlendEquation", userData);
glBlendEquationSeparate = (glBlendEquationSeparate_client_proc_t) getProc("glBlendEquationSeparate", userData);
glBlendFunc = (glBlendFunc_client_proc_t) getProc("glBlendFunc", userData);
glBlendFuncSeparate = (glBlendFuncSeparate_client_proc_t) getProc("glBlendFuncSeparate", userData);
glBufferData = (glBufferData_client_proc_t) getProc("glBufferData", userData);
glBufferSubData = (glBufferSubData_client_proc_t) getProc("glBufferSubData", userData);
glCheckFramebufferStatus = (glCheckFramebufferStatus_client_proc_t) getProc("glCheckFramebufferStatus", userData);
glClear = (glClear_client_proc_t) getProc("glClear", userData);
glClearColor = (glClearColor_client_proc_t) getProc("glClearColor", userData);
glClearDepthf = (glClearDepthf_client_proc_t) getProc("glClearDepthf", userData);
glClearStencil = (glClearStencil_client_proc_t) getProc("glClearStencil", userData);
glColorMask = (glColorMask_client_proc_t) getProc("glColorMask", userData);
glCompileShader = (glCompileShader_client_proc_t) getProc("glCompileShader", userData);
glCompressedTexImage2D = (glCompressedTexImage2D_client_proc_t) getProc("glCompressedTexImage2D", userData);
glCompressedTexSubImage2D = (glCompressedTexSubImage2D_client_proc_t) getProc("glCompressedTexSubImage2D", userData);
glCopyTexImage2D = (glCopyTexImage2D_client_proc_t) getProc("glCopyTexImage2D", userData);
glCopyTexSubImage2D = (glCopyTexSubImage2D_client_proc_t) getProc("glCopyTexSubImage2D", userData);
glCreateProgram = (glCreateProgram_client_proc_t) getProc("glCreateProgram", userData);
glCreateShader = (glCreateShader_client_proc_t) getProc("glCreateShader", userData);
glCullFace = (glCullFace_client_proc_t) getProc("glCullFace", userData);
glDeleteBuffers = (glDeleteBuffers_client_proc_t) getProc("glDeleteBuffers", userData);
glDeleteFramebuffers = (glDeleteFramebuffers_client_proc_t) getProc("glDeleteFramebuffers", userData);
glDeleteProgram = (glDeleteProgram_client_proc_t) getProc("glDeleteProgram", userData);
glDeleteRenderbuffers = (glDeleteRenderbuffers_client_proc_t) getProc("glDeleteRenderbuffers", userData);
glDeleteShader = (glDeleteShader_client_proc_t) getProc("glDeleteShader", userData);
glDeleteTextures = (glDeleteTextures_client_proc_t) getProc("glDeleteTextures", userData);
glDepthFunc = (glDepthFunc_client_proc_t) getProc("glDepthFunc", userData);
glDepthMask = (glDepthMask_client_proc_t) getProc("glDepthMask", userData);
glDepthRangef = (glDepthRangef_client_proc_t) getProc("glDepthRangef", userData);
glDetachShader = (glDetachShader_client_proc_t) getProc("glDetachShader", userData);
glDisable = (glDisable_client_proc_t) getProc("glDisable", userData);
glDisableVertexAttribArray = (glDisableVertexAttribArray_client_proc_t) getProc("glDisableVertexAttribArray", userData);
glDrawArrays = (glDrawArrays_client_proc_t) getProc("glDrawArrays", userData);
glDrawElements = (glDrawElements_client_proc_t) getProc("glDrawElements", userData);
glEnable = (glEnable_client_proc_t) getProc("glEnable", userData);
glEnableVertexAttribArray = (glEnableVertexAttribArray_client_proc_t) getProc("glEnableVertexAttribArray", userData);
glFinish = (glFinish_client_proc_t) getProc("glFinish", userData);
glFlush = (glFlush_client_proc_t) getProc("glFlush", userData);
glFramebufferRenderbuffer = (glFramebufferRenderbuffer_client_proc_t) getProc("glFramebufferRenderbuffer", userData);
glFramebufferTexture2D = (glFramebufferTexture2D_client_proc_t) getProc("glFramebufferTexture2D", userData);
glFrontFace = (glFrontFace_client_proc_t) getProc("glFrontFace", userData);
glGenBuffers = (glGenBuffers_client_proc_t) getProc("glGenBuffers", userData);
glGenerateMipmap = (glGenerateMipmap_client_proc_t) getProc("glGenerateMipmap", userData);
glGenFramebuffers = (glGenFramebuffers_client_proc_t) getProc("glGenFramebuffers", userData);
glGenRenderbuffers = (glGenRenderbuffers_client_proc_t) getProc("glGenRenderbuffers", userData);
glGenTextures = (glGenTextures_client_proc_t) getProc("glGenTextures", userData);
glGetActiveAttrib = (glGetActiveAttrib_client_proc_t) getProc("glGetActiveAttrib", userData);
glGetActiveUniform = (glGetActiveUniform_client_proc_t) getProc("glGetActiveUniform", userData);
glGetAttachedShaders = (glGetAttachedShaders_client_proc_t) getProc("glGetAttachedShaders", userData);
glGetAttribLocation = (glGetAttribLocation_client_proc_t) getProc("glGetAttribLocation", userData);
glGetBooleanv = (glGetBooleanv_client_proc_t) getProc("glGetBooleanv", userData);
glGetBufferParameteriv = (glGetBufferParameteriv_client_proc_t) getProc("glGetBufferParameteriv", userData);
glGetError = (glGetError_client_proc_t) getProc("glGetError", userData);
glGetFloatv = (glGetFloatv_client_proc_t) getProc("glGetFloatv", userData);
glGetFramebufferAttachmentParameteriv = (glGetFramebufferAttachmentParameteriv_client_proc_t) getProc("glGetFramebufferAttachmentParameteriv", userData);
glGetIntegerv = (glGetIntegerv_client_proc_t) getProc("glGetIntegerv", userData);
glGetProgramiv = (glGetProgramiv_client_proc_t) getProc("glGetProgramiv", userData);
glGetProgramInfoLog = (glGetProgramInfoLog_client_proc_t) getProc("glGetProgramInfoLog", userData);
glGetRenderbufferParameteriv = (glGetRenderbufferParameteriv_client_proc_t) getProc("glGetRenderbufferParameteriv", userData);
glGetShaderiv = (glGetShaderiv_client_proc_t) getProc("glGetShaderiv", userData);
glGetShaderInfoLog = (glGetShaderInfoLog_client_proc_t) getProc("glGetShaderInfoLog", userData);
glGetShaderPrecisionFormat = (glGetShaderPrecisionFormat_client_proc_t) getProc("glGetShaderPrecisionFormat", userData);
glGetShaderSource = (glGetShaderSource_client_proc_t) getProc("glGetShaderSource", userData);
glGetString = (glGetString_client_proc_t) getProc("glGetString", userData);
glGetTexParameterfv = (glGetTexParameterfv_client_proc_t) getProc("glGetTexParameterfv", userData);
glGetTexParameteriv = (glGetTexParameteriv_client_proc_t) getProc("glGetTexParameteriv", userData);
glGetUniformfv = (glGetUniformfv_client_proc_t) getProc("glGetUniformfv", userData);
glGetUniformiv = (glGetUniformiv_client_proc_t) getProc("glGetUniformiv", userData);
glGetUniformLocation = (glGetUniformLocation_client_proc_t) getProc("glGetUniformLocation", userData);
glGetVertexAttribfv = (glGetVertexAttribfv_client_proc_t) getProc("glGetVertexAttribfv", userData);
glGetVertexAttribiv = (glGetVertexAttribiv_client_proc_t) getProc("glGetVertexAttribiv", userData);
glGetVertexAttribPointerv = (glGetVertexAttribPointerv_client_proc_t) getProc("glGetVertexAttribPointerv", userData);
glHint = (glHint_client_proc_t) getProc("glHint", userData);
glIsBuffer = (glIsBuffer_client_proc_t) getProc("glIsBuffer", userData);
glIsEnabled = (glIsEnabled_client_proc_t) getProc("glIsEnabled", userData);
glIsFramebuffer = (glIsFramebuffer_client_proc_t) getProc("glIsFramebuffer", userData);
glIsProgram = (glIsProgram_client_proc_t) getProc("glIsProgram", userData);
glIsRenderbuffer = (glIsRenderbuffer_client_proc_t) getProc("glIsRenderbuffer", userData);
glIsShader = (glIsShader_client_proc_t) getProc("glIsShader", userData);
glIsTexture = (glIsTexture_client_proc_t) getProc("glIsTexture", userData);
glLineWidth = (glLineWidth_client_proc_t) getProc("glLineWidth", userData);
glLinkProgram = (glLinkProgram_client_proc_t) getProc("glLinkProgram", userData);
glPixelStorei = (glPixelStorei_client_proc_t) getProc("glPixelStorei", userData);
glPolygonOffset = (glPolygonOffset_client_proc_t) getProc("glPolygonOffset", userData);
glReadPixels = (glReadPixels_client_proc_t) getProc("glReadPixels", userData);
glReleaseShaderCompiler = (glReleaseShaderCompiler_client_proc_t) getProc("glReleaseShaderCompiler", userData);
glRenderbufferStorage = (glRenderbufferStorage_client_proc_t) getProc("glRenderbufferStorage", userData);
glSampleCoverage = (glSampleCoverage_client_proc_t) getProc("glSampleCoverage", userData);
glScissor = (glScissor_client_proc_t) getProc("glScissor", userData);
glShaderBinary = (glShaderBinary_client_proc_t) getProc("glShaderBinary", userData);
glShaderSource = (glShaderSource_client_proc_t) getProc("glShaderSource", userData);
glStencilFunc = (glStencilFunc_client_proc_t) getProc("glStencilFunc", userData);
glStencilFuncSeparate = (glStencilFuncSeparate_client_proc_t) getProc("glStencilFuncSeparate", userData);
glStencilMask = (glStencilMask_client_proc_t) getProc("glStencilMask", userData);
glStencilMaskSeparate = (glStencilMaskSeparate_client_proc_t) getProc("glStencilMaskSeparate", userData);
glStencilOp = (glStencilOp_client_proc_t) getProc("glStencilOp", userData);
glStencilOpSeparate = (glStencilOpSeparate_client_proc_t) getProc("glStencilOpSeparate", userData);
glTexImage2D = (glTexImage2D_client_proc_t) getProc("glTexImage2D", userData);
glTexParameterf = (glTexParameterf_client_proc_t) getProc("glTexParameterf", userData);
glTexParameterfv = (glTexParameterfv_client_proc_t) getProc("glTexParameterfv", userData);
glTexParameteri = (glTexParameteri_client_proc_t) getProc("glTexParameteri", userData);
glTexParameteriv = (glTexParameteriv_client_proc_t) getProc("glTexParameteriv", userData);
glTexSubImage2D = (glTexSubImage2D_client_proc_t) getProc("glTexSubImage2D", userData);
glUniform1f = (glUniform1f_client_proc_t) getProc("glUniform1f", userData);
glUniform1fv = (glUniform1fv_client_proc_t) getProc("glUniform1fv", userData);
glUniform1i = (glUniform1i_client_proc_t) getProc("glUniform1i", userData);
glUniform1iv = (glUniform1iv_client_proc_t) getProc("glUniform1iv", userData);
glUniform2f = (glUniform2f_client_proc_t) getProc("glUniform2f", userData);
glUniform2fv = (glUniform2fv_client_proc_t) getProc("glUniform2fv", userData);
glUniform2i = (glUniform2i_client_proc_t) getProc("glUniform2i", userData);
glUniform2iv = (glUniform2iv_client_proc_t) getProc("glUniform2iv", userData);
glUniform3f = (glUniform3f_client_proc_t) getProc("glUniform3f", userData);
glUniform3fv = (glUniform3fv_client_proc_t) getProc("glUniform3fv", userData);
glUniform3i = (glUniform3i_client_proc_t) getProc("glUniform3i", userData);
glUniform3iv = (glUniform3iv_client_proc_t) getProc("glUniform3iv", userData);
glUniform4f = (glUniform4f_client_proc_t) getProc("glUniform4f", userData);
glUniform4fv = (glUniform4fv_client_proc_t) getProc("glUniform4fv", userData);
glUniform4i = (glUniform4i_client_proc_t) getProc("glUniform4i", userData);
glUniform4iv = (glUniform4iv_client_proc_t) getProc("glUniform4iv", userData);
glUniformMatrix2fv = (glUniformMatrix2fv_client_proc_t) getProc("glUniformMatrix2fv", userData);
glUniformMatrix3fv = (glUniformMatrix3fv_client_proc_t) getProc("glUniformMatrix3fv", userData);
glUniformMatrix4fv = (glUniformMatrix4fv_client_proc_t) getProc("glUniformMatrix4fv", userData);
glUseProgram = (glUseProgram_client_proc_t) getProc("glUseProgram", userData);
glValidateProgram = (glValidateProgram_client_proc_t) getProc("glValidateProgram", userData);
glVertexAttrib1f = (glVertexAttrib1f_client_proc_t) getProc("glVertexAttrib1f", userData);
glVertexAttrib1fv = (glVertexAttrib1fv_client_proc_t) getProc("glVertexAttrib1fv", userData);
glVertexAttrib2f = (glVertexAttrib2f_client_proc_t) getProc("glVertexAttrib2f", userData);
glVertexAttrib2fv = (glVertexAttrib2fv_client_proc_t) getProc("glVertexAttrib2fv", userData);
glVertexAttrib3f = (glVertexAttrib3f_client_proc_t) getProc("glVertexAttrib3f", userData);
glVertexAttrib3fv = (glVertexAttrib3fv_client_proc_t) getProc("glVertexAttrib3fv", userData);
glVertexAttrib4f = (glVertexAttrib4f_client_proc_t) getProc("glVertexAttrib4f", userData);
glVertexAttrib4fv = (glVertexAttrib4fv_client_proc_t) getProc("glVertexAttrib4fv", userData);
glVertexAttribPointer = (glVertexAttribPointer_client_proc_t) getProc("glVertexAttribPointer", userData);
glViewport = (glViewport_client_proc_t) getProc("glViewport", userData);
glEGLImageTargetTexture2DOES = (glEGLImageTargetTexture2DOES_client_proc_t) getProc("glEGLImageTargetTexture2DOES", userData);
glEGLImageTargetRenderbufferStorageOES = (glEGLImageTargetRenderbufferStorageOES_client_proc_t) getProc("glEGLImageTargetRenderbufferStorageOES", userData);
glGetProgramBinaryOES = (glGetProgramBinaryOES_client_proc_t) getProc("glGetProgramBinaryOES", userData);
glProgramBinaryOES = (glProgramBinaryOES_client_proc_t) getProc("glProgramBinaryOES", userData);
glMapBufferOES = (glMapBufferOES_client_proc_t) getProc("glMapBufferOES", userData);
glUnmapBufferOES = (glUnmapBufferOES_client_proc_t) getProc("glUnmapBufferOES", userData);
glTexImage3DOES = (glTexImage3DOES_client_proc_t) getProc("glTexImage3DOES", userData);
glTexSubImage3DOES = (glTexSubImage3DOES_client_proc_t) getProc("glTexSubImage3DOES", userData);
glCopyTexSubImage3DOES = (glCopyTexSubImage3DOES_client_proc_t) getProc("glCopyTexSubImage3DOES", userData);
glCompressedTexImage3DOES = (glCompressedTexImage3DOES_client_proc_t) getProc("glCompressedTexImage3DOES", userData);
glCompressedTexSubImage3DOES = (glCompressedTexSubImage3DOES_client_proc_t) getProc("glCompressedTexSubImage3DOES", userData);
glFramebufferTexture3DOES = (glFramebufferTexture3DOES_client_proc_t) getProc("glFramebufferTexture3DOES", userData);
glBindVertexArrayOES = (glBindVertexArrayOES_client_proc_t) getProc("glBindVertexArrayOES", userData);
glDeleteVertexArraysOES = (glDeleteVertexArraysOES_client_proc_t) getProc("glDeleteVertexArraysOES", userData);
glGenVertexArraysOES = (glGenVertexArraysOES_client_proc_t) getProc("glGenVertexArraysOES", userData);
glIsVertexArrayOES = (glIsVertexArrayOES_client_proc_t) getProc("glIsVertexArrayOES", userData);
glDiscardFramebufferEXT = (glDiscardFramebufferEXT_client_proc_t) getProc("glDiscardFramebufferEXT", userData);
glMultiDrawArraysEXT = (glMultiDrawArraysEXT_client_proc_t) getProc("glMultiDrawArraysEXT", userData);
glMultiDrawElementsEXT = (glMultiDrawElementsEXT_client_proc_t) getProc("glMultiDrawElementsEXT", userData);
glGetPerfMonitorGroupsAMD = (glGetPerfMonitorGroupsAMD_client_proc_t) getProc("glGetPerfMonitorGroupsAMD", userData);
glGetPerfMonitorCountersAMD = (glGetPerfMonitorCountersAMD_client_proc_t) getProc("glGetPerfMonitorCountersAMD", userData);
glGetPerfMonitorGroupStringAMD = (glGetPerfMonitorGroupStringAMD_client_proc_t) getProc("glGetPerfMonitorGroupStringAMD", userData);
glGetPerfMonitorCounterStringAMD = (glGetPerfMonitorCounterStringAMD_client_proc_t) getProc("glGetPerfMonitorCounterStringAMD", userData);
glGetPerfMonitorCounterInfoAMD = (glGetPerfMonitorCounterInfoAMD_client_proc_t) getProc("glGetPerfMonitorCounterInfoAMD", userData);
glGenPerfMonitorsAMD = (glGenPerfMonitorsAMD_client_proc_t) getProc("glGenPerfMonitorsAMD", userData);
glDeletePerfMonitorsAMD = (glDeletePerfMonitorsAMD_client_proc_t) getProc("glDeletePerfMonitorsAMD", userData);
glSelectPerfMonitorCountersAMD = (glSelectPerfMonitorCountersAMD_client_proc_t) getProc("glSelectPerfMonitorCountersAMD", userData);
glBeginPerfMonitorAMD = (glBeginPerfMonitorAMD_client_proc_t) getProc("glBeginPerfMonitorAMD", userData);
glEndPerfMonitorAMD = (glEndPerfMonitorAMD_client_proc_t) getProc("glEndPerfMonitorAMD", userData);
glGetPerfMonitorCounterDataAMD = (glGetPerfMonitorCounterDataAMD_client_proc_t) getProc("glGetPerfMonitorCounterDataAMD", userData);
glRenderbufferStorageMultisampleIMG = (glRenderbufferStorageMultisampleIMG_client_proc_t) getProc("glRenderbufferStorageMultisampleIMG", userData);
glFramebufferTexture2DMultisampleIMG = (glFramebufferTexture2DMultisampleIMG_client_proc_t) getProc("glFramebufferTexture2DMultisampleIMG", userData);
glDeleteFencesNV = (glDeleteFencesNV_client_proc_t) getProc("glDeleteFencesNV", userData);
glGenFencesNV = (glGenFencesNV_client_proc_t) getProc("glGenFencesNV", userData);
glIsFenceNV = (glIsFenceNV_client_proc_t) getProc("glIsFenceNV", userData);
glTestFenceNV = (glTestFenceNV_client_proc_t) getProc("glTestFenceNV", userData);
glGetFenceivNV = (glGetFenceivNV_client_proc_t) getProc("glGetFenceivNV", userData);
glFinishFenceNV = (glFinishFenceNV_client_proc_t) getProc("glFinishFenceNV", userData);
glSetFenceNV = (glSetFenceNV_client_proc_t) getProc("glSetFenceNV", userData);
glCoverageMaskNV = (glCoverageMaskNV_client_proc_t) getProc("glCoverageMaskNV", userData);
glCoverageOperationNV = (glCoverageOperationNV_client_proc_t) getProc("glCoverageOperationNV", userData);
glGetDriverControlsQCOM = (glGetDriverControlsQCOM_client_proc_t) getProc("glGetDriverControlsQCOM", userData);
glGetDriverControlStringQCOM = (glGetDriverControlStringQCOM_client_proc_t) getProc("glGetDriverControlStringQCOM", userData);
glEnableDriverControlQCOM = (glEnableDriverControlQCOM_client_proc_t) getProc("glEnableDriverControlQCOM", userData);
glDisableDriverControlQCOM = (glDisableDriverControlQCOM_client_proc_t) getProc("glDisableDriverControlQCOM", userData);
glExtGetTexturesQCOM = (glExtGetTexturesQCOM_client_proc_t) getProc("glExtGetTexturesQCOM", userData);
glExtGetBuffersQCOM = (glExtGetBuffersQCOM_client_proc_t) getProc("glExtGetBuffersQCOM", userData);
glExtGetRenderbuffersQCOM = (glExtGetRenderbuffersQCOM_client_proc_t) getProc("glExtGetRenderbuffersQCOM", userData);
glExtGetFramebuffersQCOM = (glExtGetFramebuffersQCOM_client_proc_t) getProc("glExtGetFramebuffersQCOM", userData);
glExtGetTexLevelParameterivQCOM = (glExtGetTexLevelParameterivQCOM_client_proc_t) getProc("glExtGetTexLevelParameterivQCOM", userData);
glExtTexObjectStateOverrideiQCOM = (glExtTexObjectStateOverrideiQCOM_client_proc_t) getProc("glExtTexObjectStateOverrideiQCOM", userData);
glExtGetTexSubImageQCOM = (glExtGetTexSubImageQCOM_client_proc_t) getProc("glExtGetTexSubImageQCOM", userData);
glExtGetBufferPointervQCOM = (glExtGetBufferPointervQCOM_client_proc_t) getProc("glExtGetBufferPointervQCOM", userData);
glExtGetShadersQCOM = (glExtGetShadersQCOM_client_proc_t) getProc("glExtGetShadersQCOM", userData);
glExtGetProgramsQCOM = (glExtGetProgramsQCOM_client_proc_t) getProc("glExtGetProgramsQCOM", userData);
glExtIsProgramBinaryQCOM = (glExtIsProgramBinaryQCOM_client_proc_t) getProc("glExtIsProgramBinaryQCOM", userData);
glExtGetProgramBinarySourceQCOM = (glExtGetProgramBinarySourceQCOM_client_proc_t) getProc("glExtGetProgramBinarySourceQCOM", userData);
glStartTilingQCOM = (glStartTilingQCOM_client_proc_t) getProc("glStartTilingQCOM", userData);
glEndTilingQCOM = (glEndTilingQCOM_client_proc_t) getProc("glEndTilingQCOM", userData);
glVertexAttribPointerData = (glVertexAttribPointerData_client_proc_t) getProc("glVertexAttribPointerData", userData);
glVertexAttribPointerOffset = (glVertexAttribPointerOffset_client_proc_t) getProc("glVertexAttribPointerOffset", userData);
glDrawElementsOffset = (glDrawElementsOffset_client_proc_t) getProc("glDrawElementsOffset", userData);
glDrawElementsData = (glDrawElementsData_client_proc_t) getProc("glDrawElementsData", userData);
glGetCompressedTextureFormats = (glGetCompressedTextureFormats_client_proc_t) getProc("glGetCompressedTextureFormats", userData);
glShaderString = (glShaderString_client_proc_t) getProc("glShaderString", userData);
glFinishRoundTrip = (glFinishRoundTrip_client_proc_t) getProc("glFinishRoundTrip", userData);
return 0;
}

View file

@ -0,0 +1,230 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __gl2_client_context_t_h
#define __gl2_client_context_t_h
#include "gl2_client_proc.h"
#include "gl2_types.h"
struct gl2_client_context_t {
glActiveTexture_client_proc_t glActiveTexture;
glAttachShader_client_proc_t glAttachShader;
glBindAttribLocation_client_proc_t glBindAttribLocation;
glBindBuffer_client_proc_t glBindBuffer;
glBindFramebuffer_client_proc_t glBindFramebuffer;
glBindRenderbuffer_client_proc_t glBindRenderbuffer;
glBindTexture_client_proc_t glBindTexture;
glBlendColor_client_proc_t glBlendColor;
glBlendEquation_client_proc_t glBlendEquation;
glBlendEquationSeparate_client_proc_t glBlendEquationSeparate;
glBlendFunc_client_proc_t glBlendFunc;
glBlendFuncSeparate_client_proc_t glBlendFuncSeparate;
glBufferData_client_proc_t glBufferData;
glBufferSubData_client_proc_t glBufferSubData;
glCheckFramebufferStatus_client_proc_t glCheckFramebufferStatus;
glClear_client_proc_t glClear;
glClearColor_client_proc_t glClearColor;
glClearDepthf_client_proc_t glClearDepthf;
glClearStencil_client_proc_t glClearStencil;
glColorMask_client_proc_t glColorMask;
glCompileShader_client_proc_t glCompileShader;
glCompressedTexImage2D_client_proc_t glCompressedTexImage2D;
glCompressedTexSubImage2D_client_proc_t glCompressedTexSubImage2D;
glCopyTexImage2D_client_proc_t glCopyTexImage2D;
glCopyTexSubImage2D_client_proc_t glCopyTexSubImage2D;
glCreateProgram_client_proc_t glCreateProgram;
glCreateShader_client_proc_t glCreateShader;
glCullFace_client_proc_t glCullFace;
glDeleteBuffers_client_proc_t glDeleteBuffers;
glDeleteFramebuffers_client_proc_t glDeleteFramebuffers;
glDeleteProgram_client_proc_t glDeleteProgram;
glDeleteRenderbuffers_client_proc_t glDeleteRenderbuffers;
glDeleteShader_client_proc_t glDeleteShader;
glDeleteTextures_client_proc_t glDeleteTextures;
glDepthFunc_client_proc_t glDepthFunc;
glDepthMask_client_proc_t glDepthMask;
glDepthRangef_client_proc_t glDepthRangef;
glDetachShader_client_proc_t glDetachShader;
glDisable_client_proc_t glDisable;
glDisableVertexAttribArray_client_proc_t glDisableVertexAttribArray;
glDrawArrays_client_proc_t glDrawArrays;
glDrawElements_client_proc_t glDrawElements;
glEnable_client_proc_t glEnable;
glEnableVertexAttribArray_client_proc_t glEnableVertexAttribArray;
glFinish_client_proc_t glFinish;
glFlush_client_proc_t glFlush;
glFramebufferRenderbuffer_client_proc_t glFramebufferRenderbuffer;
glFramebufferTexture2D_client_proc_t glFramebufferTexture2D;
glFrontFace_client_proc_t glFrontFace;
glGenBuffers_client_proc_t glGenBuffers;
glGenerateMipmap_client_proc_t glGenerateMipmap;
glGenFramebuffers_client_proc_t glGenFramebuffers;
glGenRenderbuffers_client_proc_t glGenRenderbuffers;
glGenTextures_client_proc_t glGenTextures;
glGetActiveAttrib_client_proc_t glGetActiveAttrib;
glGetActiveUniform_client_proc_t glGetActiveUniform;
glGetAttachedShaders_client_proc_t glGetAttachedShaders;
glGetAttribLocation_client_proc_t glGetAttribLocation;
glGetBooleanv_client_proc_t glGetBooleanv;
glGetBufferParameteriv_client_proc_t glGetBufferParameteriv;
glGetError_client_proc_t glGetError;
glGetFloatv_client_proc_t glGetFloatv;
glGetFramebufferAttachmentParameteriv_client_proc_t glGetFramebufferAttachmentParameteriv;
glGetIntegerv_client_proc_t glGetIntegerv;
glGetProgramiv_client_proc_t glGetProgramiv;
glGetProgramInfoLog_client_proc_t glGetProgramInfoLog;
glGetRenderbufferParameteriv_client_proc_t glGetRenderbufferParameteriv;
glGetShaderiv_client_proc_t glGetShaderiv;
glGetShaderInfoLog_client_proc_t glGetShaderInfoLog;
glGetShaderPrecisionFormat_client_proc_t glGetShaderPrecisionFormat;
glGetShaderSource_client_proc_t glGetShaderSource;
glGetString_client_proc_t glGetString;
glGetTexParameterfv_client_proc_t glGetTexParameterfv;
glGetTexParameteriv_client_proc_t glGetTexParameteriv;
glGetUniformfv_client_proc_t glGetUniformfv;
glGetUniformiv_client_proc_t glGetUniformiv;
glGetUniformLocation_client_proc_t glGetUniformLocation;
glGetVertexAttribfv_client_proc_t glGetVertexAttribfv;
glGetVertexAttribiv_client_proc_t glGetVertexAttribiv;
glGetVertexAttribPointerv_client_proc_t glGetVertexAttribPointerv;
glHint_client_proc_t glHint;
glIsBuffer_client_proc_t glIsBuffer;
glIsEnabled_client_proc_t glIsEnabled;
glIsFramebuffer_client_proc_t glIsFramebuffer;
glIsProgram_client_proc_t glIsProgram;
glIsRenderbuffer_client_proc_t glIsRenderbuffer;
glIsShader_client_proc_t glIsShader;
glIsTexture_client_proc_t glIsTexture;
glLineWidth_client_proc_t glLineWidth;
glLinkProgram_client_proc_t glLinkProgram;
glPixelStorei_client_proc_t glPixelStorei;
glPolygonOffset_client_proc_t glPolygonOffset;
glReadPixels_client_proc_t glReadPixels;
glReleaseShaderCompiler_client_proc_t glReleaseShaderCompiler;
glRenderbufferStorage_client_proc_t glRenderbufferStorage;
glSampleCoverage_client_proc_t glSampleCoverage;
glScissor_client_proc_t glScissor;
glShaderBinary_client_proc_t glShaderBinary;
glShaderSource_client_proc_t glShaderSource;
glStencilFunc_client_proc_t glStencilFunc;
glStencilFuncSeparate_client_proc_t glStencilFuncSeparate;
glStencilMask_client_proc_t glStencilMask;
glStencilMaskSeparate_client_proc_t glStencilMaskSeparate;
glStencilOp_client_proc_t glStencilOp;
glStencilOpSeparate_client_proc_t glStencilOpSeparate;
glTexImage2D_client_proc_t glTexImage2D;
glTexParameterf_client_proc_t glTexParameterf;
glTexParameterfv_client_proc_t glTexParameterfv;
glTexParameteri_client_proc_t glTexParameteri;
glTexParameteriv_client_proc_t glTexParameteriv;
glTexSubImage2D_client_proc_t glTexSubImage2D;
glUniform1f_client_proc_t glUniform1f;
glUniform1fv_client_proc_t glUniform1fv;
glUniform1i_client_proc_t glUniform1i;
glUniform1iv_client_proc_t glUniform1iv;
glUniform2f_client_proc_t glUniform2f;
glUniform2fv_client_proc_t glUniform2fv;
glUniform2i_client_proc_t glUniform2i;
glUniform2iv_client_proc_t glUniform2iv;
glUniform3f_client_proc_t glUniform3f;
glUniform3fv_client_proc_t glUniform3fv;
glUniform3i_client_proc_t glUniform3i;
glUniform3iv_client_proc_t glUniform3iv;
glUniform4f_client_proc_t glUniform4f;
glUniform4fv_client_proc_t glUniform4fv;
glUniform4i_client_proc_t glUniform4i;
glUniform4iv_client_proc_t glUniform4iv;
glUniformMatrix2fv_client_proc_t glUniformMatrix2fv;
glUniformMatrix3fv_client_proc_t glUniformMatrix3fv;
glUniformMatrix4fv_client_proc_t glUniformMatrix4fv;
glUseProgram_client_proc_t glUseProgram;
glValidateProgram_client_proc_t glValidateProgram;
glVertexAttrib1f_client_proc_t glVertexAttrib1f;
glVertexAttrib1fv_client_proc_t glVertexAttrib1fv;
glVertexAttrib2f_client_proc_t glVertexAttrib2f;
glVertexAttrib2fv_client_proc_t glVertexAttrib2fv;
glVertexAttrib3f_client_proc_t glVertexAttrib3f;
glVertexAttrib3fv_client_proc_t glVertexAttrib3fv;
glVertexAttrib4f_client_proc_t glVertexAttrib4f;
glVertexAttrib4fv_client_proc_t glVertexAttrib4fv;
glVertexAttribPointer_client_proc_t glVertexAttribPointer;
glViewport_client_proc_t glViewport;
glEGLImageTargetTexture2DOES_client_proc_t glEGLImageTargetTexture2DOES;
glEGLImageTargetRenderbufferStorageOES_client_proc_t glEGLImageTargetRenderbufferStorageOES;
glGetProgramBinaryOES_client_proc_t glGetProgramBinaryOES;
glProgramBinaryOES_client_proc_t glProgramBinaryOES;
glMapBufferOES_client_proc_t glMapBufferOES;
glUnmapBufferOES_client_proc_t glUnmapBufferOES;
glTexImage3DOES_client_proc_t glTexImage3DOES;
glTexSubImage3DOES_client_proc_t glTexSubImage3DOES;
glCopyTexSubImage3DOES_client_proc_t glCopyTexSubImage3DOES;
glCompressedTexImage3DOES_client_proc_t glCompressedTexImage3DOES;
glCompressedTexSubImage3DOES_client_proc_t glCompressedTexSubImage3DOES;
glFramebufferTexture3DOES_client_proc_t glFramebufferTexture3DOES;
glBindVertexArrayOES_client_proc_t glBindVertexArrayOES;
glDeleteVertexArraysOES_client_proc_t glDeleteVertexArraysOES;
glGenVertexArraysOES_client_proc_t glGenVertexArraysOES;
glIsVertexArrayOES_client_proc_t glIsVertexArrayOES;
glDiscardFramebufferEXT_client_proc_t glDiscardFramebufferEXT;
glMultiDrawArraysEXT_client_proc_t glMultiDrawArraysEXT;
glMultiDrawElementsEXT_client_proc_t glMultiDrawElementsEXT;
glGetPerfMonitorGroupsAMD_client_proc_t glGetPerfMonitorGroupsAMD;
glGetPerfMonitorCountersAMD_client_proc_t glGetPerfMonitorCountersAMD;
glGetPerfMonitorGroupStringAMD_client_proc_t glGetPerfMonitorGroupStringAMD;
glGetPerfMonitorCounterStringAMD_client_proc_t glGetPerfMonitorCounterStringAMD;
glGetPerfMonitorCounterInfoAMD_client_proc_t glGetPerfMonitorCounterInfoAMD;
glGenPerfMonitorsAMD_client_proc_t glGenPerfMonitorsAMD;
glDeletePerfMonitorsAMD_client_proc_t glDeletePerfMonitorsAMD;
glSelectPerfMonitorCountersAMD_client_proc_t glSelectPerfMonitorCountersAMD;
glBeginPerfMonitorAMD_client_proc_t glBeginPerfMonitorAMD;
glEndPerfMonitorAMD_client_proc_t glEndPerfMonitorAMD;
glGetPerfMonitorCounterDataAMD_client_proc_t glGetPerfMonitorCounterDataAMD;
glRenderbufferStorageMultisampleIMG_client_proc_t glRenderbufferStorageMultisampleIMG;
glFramebufferTexture2DMultisampleIMG_client_proc_t glFramebufferTexture2DMultisampleIMG;
glDeleteFencesNV_client_proc_t glDeleteFencesNV;
glGenFencesNV_client_proc_t glGenFencesNV;
glIsFenceNV_client_proc_t glIsFenceNV;
glTestFenceNV_client_proc_t glTestFenceNV;
glGetFenceivNV_client_proc_t glGetFenceivNV;
glFinishFenceNV_client_proc_t glFinishFenceNV;
glSetFenceNV_client_proc_t glSetFenceNV;
glCoverageMaskNV_client_proc_t glCoverageMaskNV;
glCoverageOperationNV_client_proc_t glCoverageOperationNV;
glGetDriverControlsQCOM_client_proc_t glGetDriverControlsQCOM;
glGetDriverControlStringQCOM_client_proc_t glGetDriverControlStringQCOM;
glEnableDriverControlQCOM_client_proc_t glEnableDriverControlQCOM;
glDisableDriverControlQCOM_client_proc_t glDisableDriverControlQCOM;
glExtGetTexturesQCOM_client_proc_t glExtGetTexturesQCOM;
glExtGetBuffersQCOM_client_proc_t glExtGetBuffersQCOM;
glExtGetRenderbuffersQCOM_client_proc_t glExtGetRenderbuffersQCOM;
glExtGetFramebuffersQCOM_client_proc_t glExtGetFramebuffersQCOM;
glExtGetTexLevelParameterivQCOM_client_proc_t glExtGetTexLevelParameterivQCOM;
glExtTexObjectStateOverrideiQCOM_client_proc_t glExtTexObjectStateOverrideiQCOM;
glExtGetTexSubImageQCOM_client_proc_t glExtGetTexSubImageQCOM;
glExtGetBufferPointervQCOM_client_proc_t glExtGetBufferPointervQCOM;
glExtGetShadersQCOM_client_proc_t glExtGetShadersQCOM;
glExtGetProgramsQCOM_client_proc_t glExtGetProgramsQCOM;
glExtIsProgramBinaryQCOM_client_proc_t glExtIsProgramBinaryQCOM;
glExtGetProgramBinarySourceQCOM_client_proc_t glExtGetProgramBinarySourceQCOM;
glStartTilingQCOM_client_proc_t glStartTilingQCOM;
glEndTilingQCOM_client_proc_t glEndTilingQCOM;
glVertexAttribPointerData_client_proc_t glVertexAttribPointerData;
glVertexAttribPointerOffset_client_proc_t glVertexAttribPointerOffset;
glDrawElementsOffset_client_proc_t glDrawElementsOffset;
glDrawElementsData_client_proc_t glDrawElementsData;
glGetCompressedTextureFormats_client_proc_t glGetCompressedTextureFormats;
glShaderString_client_proc_t glShaderString;
glFinishRoundTrip_client_proc_t glFinishRoundTrip;
virtual ~gl2_client_context_t() {}
typedef gl2_client_context_t *CONTEXT_ACCESSOR_TYPE(void);
static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f);
int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData);
virtual void setError(unsigned int error){ (void)error; };
virtual unsigned int getError(){ return 0; };
};
#endif

View file

@ -0,0 +1,222 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __gl2_client_proc_t_h
#define __gl2_client_proc_t_h
#include "gl2_types.h"
#ifndef gl2_APIENTRY
#define gl2_APIENTRY
#endif
typedef void (gl2_APIENTRY *glActiveTexture_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glAttachShader_client_proc_t) (void * ctx, GLuint, GLuint);
typedef void (gl2_APIENTRY *glBindAttribLocation_client_proc_t) (void * ctx, GLuint, GLuint, const GLchar*);
typedef void (gl2_APIENTRY *glBindBuffer_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl2_APIENTRY *glBindFramebuffer_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl2_APIENTRY *glBindRenderbuffer_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl2_APIENTRY *glBindTexture_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl2_APIENTRY *glBlendColor_client_proc_t) (void * ctx, GLclampf, GLclampf, GLclampf, GLclampf);
typedef void (gl2_APIENTRY *glBlendEquation_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glBlendEquationSeparate_client_proc_t) (void * ctx, GLenum, GLenum);
typedef void (gl2_APIENTRY *glBlendFunc_client_proc_t) (void * ctx, GLenum, GLenum);
typedef void (gl2_APIENTRY *glBlendFuncSeparate_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLenum);
typedef void (gl2_APIENTRY *glBufferData_client_proc_t) (void * ctx, GLenum, GLsizeiptr, const GLvoid*, GLenum);
typedef void (gl2_APIENTRY *glBufferSubData_client_proc_t) (void * ctx, GLenum, GLintptr, GLsizeiptr, const GLvoid*);
typedef GLenum (gl2_APIENTRY *glCheckFramebufferStatus_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glClear_client_proc_t) (void * ctx, GLbitfield);
typedef void (gl2_APIENTRY *glClearColor_client_proc_t) (void * ctx, GLclampf, GLclampf, GLclampf, GLclampf);
typedef void (gl2_APIENTRY *glClearDepthf_client_proc_t) (void * ctx, GLclampf);
typedef void (gl2_APIENTRY *glClearStencil_client_proc_t) (void * ctx, GLint);
typedef void (gl2_APIENTRY *glColorMask_client_proc_t) (void * ctx, GLboolean, GLboolean, GLboolean, GLboolean);
typedef void (gl2_APIENTRY *glCompileShader_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glCompressedTexImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
typedef void (gl2_APIENTRY *glCompressedTexSubImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
typedef void (gl2_APIENTRY *glCopyTexImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
typedef void (gl2_APIENTRY *glCopyTexSubImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
typedef GLuint (gl2_APIENTRY *glCreateProgram_client_proc_t) (void * ctx);
typedef GLuint (gl2_APIENTRY *glCreateShader_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glCullFace_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glDeleteBuffers_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl2_APIENTRY *glDeleteFramebuffers_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl2_APIENTRY *glDeleteProgram_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glDeleteRenderbuffers_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl2_APIENTRY *glDeleteShader_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glDeleteTextures_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl2_APIENTRY *glDepthFunc_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glDepthMask_client_proc_t) (void * ctx, GLboolean);
typedef void (gl2_APIENTRY *glDepthRangef_client_proc_t) (void * ctx, GLclampf, GLclampf);
typedef void (gl2_APIENTRY *glDetachShader_client_proc_t) (void * ctx, GLuint, GLuint);
typedef void (gl2_APIENTRY *glDisable_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glDisableVertexAttribArray_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glDrawArrays_client_proc_t) (void * ctx, GLenum, GLint, GLsizei);
typedef void (gl2_APIENTRY *glDrawElements_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, const GLvoid*);
typedef void (gl2_APIENTRY *glEnable_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glEnableVertexAttribArray_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glFinish_client_proc_t) (void * ctx);
typedef void (gl2_APIENTRY *glFlush_client_proc_t) (void * ctx);
typedef void (gl2_APIENTRY *glFramebufferRenderbuffer_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint);
typedef void (gl2_APIENTRY *glFramebufferTexture2D_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint, GLint);
typedef void (gl2_APIENTRY *glFrontFace_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glGenBuffers_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGenerateMipmap_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glGenFramebuffers_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGenRenderbuffers_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGenTextures_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGetActiveAttrib_client_proc_t) (void * ctx, GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*);
typedef void (gl2_APIENTRY *glGetActiveUniform_client_proc_t) (void * ctx, GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*);
typedef void (gl2_APIENTRY *glGetAttachedShaders_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLuint*);
typedef int (gl2_APIENTRY *glGetAttribLocation_client_proc_t) (void * ctx, GLuint, const GLchar*);
typedef void (gl2_APIENTRY *glGetBooleanv_client_proc_t) (void * ctx, GLenum, GLboolean*);
typedef void (gl2_APIENTRY *glGetBufferParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef GLenum (gl2_APIENTRY *glGetError_client_proc_t) (void * ctx);
typedef void (gl2_APIENTRY *glGetFloatv_client_proc_t) (void * ctx, GLenum, GLfloat*);
typedef void (gl2_APIENTRY *glGetFramebufferAttachmentParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetIntegerv_client_proc_t) (void * ctx, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetProgramiv_client_proc_t) (void * ctx, GLuint, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetProgramInfoLog_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (gl2_APIENTRY *glGetRenderbufferParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetShaderiv_client_proc_t) (void * ctx, GLuint, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetShaderInfoLog_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (gl2_APIENTRY *glGetShaderPrecisionFormat_client_proc_t) (void * ctx, GLenum, GLenum, GLint*, GLint*);
typedef void (gl2_APIENTRY *glGetShaderSource_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLchar*);
typedef const GLubyte* (gl2_APIENTRY *glGetString_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glGetTexParameterfv_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat*);
typedef void (gl2_APIENTRY *glGetTexParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetUniformfv_client_proc_t) (void * ctx, GLuint, GLint, GLfloat*);
typedef void (gl2_APIENTRY *glGetUniformiv_client_proc_t) (void * ctx, GLuint, GLint, GLint*);
typedef int (gl2_APIENTRY *glGetUniformLocation_client_proc_t) (void * ctx, GLuint, const GLchar*);
typedef void (gl2_APIENTRY *glGetVertexAttribfv_client_proc_t) (void * ctx, GLuint, GLenum, GLfloat*);
typedef void (gl2_APIENTRY *glGetVertexAttribiv_client_proc_t) (void * ctx, GLuint, GLenum, GLint*);
typedef void (gl2_APIENTRY *glGetVertexAttribPointerv_client_proc_t) (void * ctx, GLuint, GLenum, GLvoid**);
typedef void (gl2_APIENTRY *glHint_client_proc_t) (void * ctx, GLenum, GLenum);
typedef GLboolean (gl2_APIENTRY *glIsBuffer_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl2_APIENTRY *glIsEnabled_client_proc_t) (void * ctx, GLenum);
typedef GLboolean (gl2_APIENTRY *glIsFramebuffer_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl2_APIENTRY *glIsProgram_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl2_APIENTRY *glIsRenderbuffer_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl2_APIENTRY *glIsShader_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl2_APIENTRY *glIsTexture_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glLineWidth_client_proc_t) (void * ctx, GLfloat);
typedef void (gl2_APIENTRY *glLinkProgram_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glPixelStorei_client_proc_t) (void * ctx, GLenum, GLint);
typedef void (gl2_APIENTRY *glPolygonOffset_client_proc_t) (void * ctx, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glReadPixels_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (gl2_APIENTRY *glReleaseShaderCompiler_client_proc_t) (void * ctx);
typedef void (gl2_APIENTRY *glRenderbufferStorage_client_proc_t) (void * ctx, GLenum, GLenum, GLsizei, GLsizei);
typedef void (gl2_APIENTRY *glSampleCoverage_client_proc_t) (void * ctx, GLclampf, GLboolean);
typedef void (gl2_APIENTRY *glScissor_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei);
typedef void (gl2_APIENTRY *glShaderBinary_client_proc_t) (void * ctx, GLsizei, const GLuint*, GLenum, const GLvoid*, GLsizei);
typedef void (gl2_APIENTRY *glShaderSource_client_proc_t) (void * ctx, GLuint, GLsizei, const GLchar* const*, const GLint*);
typedef void (gl2_APIENTRY *glStencilFunc_client_proc_t) (void * ctx, GLenum, GLint, GLuint);
typedef void (gl2_APIENTRY *glStencilFuncSeparate_client_proc_t) (void * ctx, GLenum, GLenum, GLint, GLuint);
typedef void (gl2_APIENTRY *glStencilMask_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glStencilMaskSeparate_client_proc_t) (void * ctx, GLenum, GLuint);
typedef void (gl2_APIENTRY *glStencilOp_client_proc_t) (void * ctx, GLenum, GLenum, GLenum);
typedef void (gl2_APIENTRY *glStencilOpSeparate_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLenum);
typedef void (gl2_APIENTRY *glTexImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*);
typedef void (gl2_APIENTRY *glTexParameterf_client_proc_t) (void * ctx, GLenum, GLenum, GLfloat);
typedef void (gl2_APIENTRY *glTexParameterfv_client_proc_t) (void * ctx, GLenum, GLenum, const GLfloat*);
typedef void (gl2_APIENTRY *glTexParameteri_client_proc_t) (void * ctx, GLenum, GLenum, GLint);
typedef void (gl2_APIENTRY *glTexParameteriv_client_proc_t) (void * ctx, GLenum, GLenum, const GLint*);
typedef void (gl2_APIENTRY *glTexSubImage2D_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*);
typedef void (gl2_APIENTRY *glUniform1f_client_proc_t) (void * ctx, GLint, GLfloat);
typedef void (gl2_APIENTRY *glUniform1fv_client_proc_t) (void * ctx, GLint, GLsizei, const GLfloat*);
typedef void (gl2_APIENTRY *glUniform1i_client_proc_t) (void * ctx, GLint, GLint);
typedef void (gl2_APIENTRY *glUniform1iv_client_proc_t) (void * ctx, GLint, GLsizei, const GLint*);
typedef void (gl2_APIENTRY *glUniform2f_client_proc_t) (void * ctx, GLint, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glUniform2fv_client_proc_t) (void * ctx, GLint, GLsizei, const GLfloat*);
typedef void (gl2_APIENTRY *glUniform2i_client_proc_t) (void * ctx, GLint, GLint, GLint);
typedef void (gl2_APIENTRY *glUniform2iv_client_proc_t) (void * ctx, GLint, GLsizei, const GLint*);
typedef void (gl2_APIENTRY *glUniform3f_client_proc_t) (void * ctx, GLint, GLfloat, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glUniform3fv_client_proc_t) (void * ctx, GLint, GLsizei, const GLfloat*);
typedef void (gl2_APIENTRY *glUniform3i_client_proc_t) (void * ctx, GLint, GLint, GLint, GLint);
typedef void (gl2_APIENTRY *glUniform3iv_client_proc_t) (void * ctx, GLint, GLsizei, const GLint*);
typedef void (gl2_APIENTRY *glUniform4f_client_proc_t) (void * ctx, GLint, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glUniform4fv_client_proc_t) (void * ctx, GLint, GLsizei, const GLfloat*);
typedef void (gl2_APIENTRY *glUniform4i_client_proc_t) (void * ctx, GLint, GLint, GLint, GLint, GLint);
typedef void (gl2_APIENTRY *glUniform4iv_client_proc_t) (void * ctx, GLint, GLsizei, const GLint*);
typedef void (gl2_APIENTRY *glUniformMatrix2fv_client_proc_t) (void * ctx, GLint, GLsizei, GLboolean, const GLfloat*);
typedef void (gl2_APIENTRY *glUniformMatrix3fv_client_proc_t) (void * ctx, GLint, GLsizei, GLboolean, const GLfloat*);
typedef void (gl2_APIENTRY *glUniformMatrix4fv_client_proc_t) (void * ctx, GLint, GLsizei, GLboolean, const GLfloat*);
typedef void (gl2_APIENTRY *glUseProgram_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glValidateProgram_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glVertexAttrib1f_client_proc_t) (void * ctx, GLuint, GLfloat);
typedef void (gl2_APIENTRY *glVertexAttrib1fv_client_proc_t) (void * ctx, GLuint, const GLfloat*);
typedef void (gl2_APIENTRY *glVertexAttrib2f_client_proc_t) (void * ctx, GLuint, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glVertexAttrib2fv_client_proc_t) (void * ctx, GLuint, const GLfloat*);
typedef void (gl2_APIENTRY *glVertexAttrib3f_client_proc_t) (void * ctx, GLuint, GLfloat, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glVertexAttrib3fv_client_proc_t) (void * ctx, GLuint, const GLfloat*);
typedef void (gl2_APIENTRY *glVertexAttrib4f_client_proc_t) (void * ctx, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
typedef void (gl2_APIENTRY *glVertexAttrib4fv_client_proc_t) (void * ctx, GLuint, const GLfloat*);
typedef void (gl2_APIENTRY *glVertexAttribPointer_client_proc_t) (void * ctx, GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*);
typedef void (gl2_APIENTRY *glViewport_client_proc_t) (void * ctx, GLint, GLint, GLsizei, GLsizei);
typedef void (gl2_APIENTRY *glEGLImageTargetTexture2DOES_client_proc_t) (void * ctx, GLenum, GLeglImageOES);
typedef void (gl2_APIENTRY *glEGLImageTargetRenderbufferStorageOES_client_proc_t) (void * ctx, GLenum, GLeglImageOES);
typedef void (gl2_APIENTRY *glGetProgramBinaryOES_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLenum*, GLvoid*);
typedef void (gl2_APIENTRY *glProgramBinaryOES_client_proc_t) (void * ctx, GLuint, GLenum, const GLvoid*, GLint);
typedef void* (gl2_APIENTRY *glMapBufferOES_client_proc_t) (void * ctx, GLenum, GLenum);
typedef GLboolean (gl2_APIENTRY *glUnmapBufferOES_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glTexImage3DOES_client_proc_t) (void * ctx, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*);
typedef void (gl2_APIENTRY *glTexSubImage3DOES_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*);
typedef void (gl2_APIENTRY *glCopyTexSubImage3DOES_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
typedef void (gl2_APIENTRY *glCompressedTexImage3DOES_client_proc_t) (void * ctx, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
typedef void (gl2_APIENTRY *glCompressedTexSubImage3DOES_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
typedef void (gl2_APIENTRY *glFramebufferTexture3DOES_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint, GLint, GLint);
typedef void (gl2_APIENTRY *glBindVertexArrayOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glDeleteVertexArraysOES_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl2_APIENTRY *glGenVertexArraysOES_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef GLboolean (gl2_APIENTRY *glIsVertexArrayOES_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glDiscardFramebufferEXT_client_proc_t) (void * ctx, GLenum, GLsizei, const GLenum*);
typedef void (gl2_APIENTRY *glMultiDrawArraysEXT_client_proc_t) (void * ctx, GLenum, const GLint*, const GLsizei*, GLsizei);
typedef void (gl2_APIENTRY *glMultiDrawElementsEXT_client_proc_t) (void * ctx, GLenum, const GLsizei*, GLenum, const GLvoid* const*, GLsizei);
typedef void (gl2_APIENTRY *glGetPerfMonitorGroupsAMD_client_proc_t) (void * ctx, GLint*, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGetPerfMonitorCountersAMD_client_proc_t) (void * ctx, GLuint, GLint*, GLint*, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGetPerfMonitorGroupStringAMD_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (gl2_APIENTRY *glGetPerfMonitorCounterStringAMD_client_proc_t) (void * ctx, GLuint, GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (gl2_APIENTRY *glGetPerfMonitorCounterInfoAMD_client_proc_t) (void * ctx, GLuint, GLuint, GLenum, GLvoid*);
typedef void (gl2_APIENTRY *glGenPerfMonitorsAMD_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glDeletePerfMonitorsAMD_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glSelectPerfMonitorCountersAMD_client_proc_t) (void * ctx, GLuint, GLboolean, GLuint, GLint, GLuint*);
typedef void (gl2_APIENTRY *glBeginPerfMonitorAMD_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glEndPerfMonitorAMD_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glGetPerfMonitorCounterDataAMD_client_proc_t) (void * ctx, GLuint, GLenum, GLsizei, GLuint*, GLint*);
typedef void (gl2_APIENTRY *glRenderbufferStorageMultisampleIMG_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, GLsizei, GLsizei);
typedef void (gl2_APIENTRY *glFramebufferTexture2DMultisampleIMG_client_proc_t) (void * ctx, GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
typedef void (gl2_APIENTRY *glDeleteFencesNV_client_proc_t) (void * ctx, GLsizei, const GLuint*);
typedef void (gl2_APIENTRY *glGenFencesNV_client_proc_t) (void * ctx, GLsizei, GLuint*);
typedef GLboolean (gl2_APIENTRY *glIsFenceNV_client_proc_t) (void * ctx, GLuint);
typedef GLboolean (gl2_APIENTRY *glTestFenceNV_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glGetFenceivNV_client_proc_t) (void * ctx, GLuint, GLenum, GLint*);
typedef void (gl2_APIENTRY *glFinishFenceNV_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glSetFenceNV_client_proc_t) (void * ctx, GLuint, GLenum);
typedef void (gl2_APIENTRY *glCoverageMaskNV_client_proc_t) (void * ctx, GLboolean);
typedef void (gl2_APIENTRY *glCoverageOperationNV_client_proc_t) (void * ctx, GLenum);
typedef void (gl2_APIENTRY *glGetDriverControlsQCOM_client_proc_t) (void * ctx, GLint*, GLsizei, GLuint*);
typedef void (gl2_APIENTRY *glGetDriverControlStringQCOM_client_proc_t) (void * ctx, GLuint, GLsizei, GLsizei*, GLchar*);
typedef void (gl2_APIENTRY *glEnableDriverControlQCOM_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glDisableDriverControlQCOM_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glExtGetTexturesQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl2_APIENTRY *glExtGetBuffersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl2_APIENTRY *glExtGetRenderbuffersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl2_APIENTRY *glExtGetFramebuffersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl2_APIENTRY *glExtGetTexLevelParameterivQCOM_client_proc_t) (void * ctx, GLuint, GLenum, GLint, GLenum, GLint*);
typedef void (gl2_APIENTRY *glExtTexObjectStateOverrideiQCOM_client_proc_t) (void * ctx, GLenum, GLenum, GLint);
typedef void (gl2_APIENTRY *glExtGetTexSubImageQCOM_client_proc_t) (void * ctx, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLvoid*);
typedef void (gl2_APIENTRY *glExtGetBufferPointervQCOM_client_proc_t) (void * ctx, GLenum, GLvoidptr*);
typedef void (gl2_APIENTRY *glExtGetShadersQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef void (gl2_APIENTRY *glExtGetProgramsQCOM_client_proc_t) (void * ctx, GLuint*, GLint, GLint*);
typedef GLboolean (gl2_APIENTRY *glExtIsProgramBinaryQCOM_client_proc_t) (void * ctx, GLuint);
typedef void (gl2_APIENTRY *glExtGetProgramBinarySourceQCOM_client_proc_t) (void * ctx, GLuint, GLenum, GLchar*, GLint*);
typedef void (gl2_APIENTRY *glStartTilingQCOM_client_proc_t) (void * ctx, GLuint, GLuint, GLuint, GLuint, GLbitfield);
typedef void (gl2_APIENTRY *glEndTilingQCOM_client_proc_t) (void * ctx, GLbitfield);
typedef void (gl2_APIENTRY *glVertexAttribPointerData_client_proc_t) (void * ctx, GLuint, GLint, GLenum, GLboolean, GLsizei, void*, GLuint);
typedef void (gl2_APIENTRY *glVertexAttribPointerOffset_client_proc_t) (void * ctx, GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint);
typedef void (gl2_APIENTRY *glDrawElementsOffset_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, GLuint);
typedef void (gl2_APIENTRY *glDrawElementsData_client_proc_t) (void * ctx, GLenum, GLsizei, GLenum, void*, GLuint);
typedef void (gl2_APIENTRY *glGetCompressedTextureFormats_client_proc_t) (void * ctx, int, GLint*);
typedef void (gl2_APIENTRY *glShaderString_client_proc_t) (void * ctx, GLuint, const GLchar*, GLsizei);
typedef int (gl2_APIENTRY *glFinishRoundTrip_client_proc_t) (void * ctx);
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef GUARD_gl2_encoder_context_t
#define GUARD_gl2_encoder_context_t
#include "IOStream.h"
#include "ChecksumCalculator.h"
#include "gl2_client_context.h"
#include <string.h>
#include "glUtils.h"
#include "GL2EncoderUtils.h"
struct gl2_encoder_context_t : public gl2_client_context_t {
IOStream *m_stream;
ChecksumCalculator *m_checksumCalculator;
gl2_encoder_context_t(IOStream *stream, ChecksumCalculator *checksumCalculator);
};
#endif // GUARD_gl2_encoder_context_t

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,216 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __gl2_client_ftable_t_h
#define __gl2_client_ftable_t_h
static const struct _gl2_funcs_by_name {
const char *name;
void *proc;
} gl2_funcs_by_name[] = {
{"glActiveTexture", (void*)glActiveTexture},
{"glAttachShader", (void*)glAttachShader},
{"glBindAttribLocation", (void*)glBindAttribLocation},
{"glBindBuffer", (void*)glBindBuffer},
{"glBindFramebuffer", (void*)glBindFramebuffer},
{"glBindRenderbuffer", (void*)glBindRenderbuffer},
{"glBindTexture", (void*)glBindTexture},
{"glBlendColor", (void*)glBlendColor},
{"glBlendEquation", (void*)glBlendEquation},
{"glBlendEquationSeparate", (void*)glBlendEquationSeparate},
{"glBlendFunc", (void*)glBlendFunc},
{"glBlendFuncSeparate", (void*)glBlendFuncSeparate},
{"glBufferData", (void*)glBufferData},
{"glBufferSubData", (void*)glBufferSubData},
{"glCheckFramebufferStatus", (void*)glCheckFramebufferStatus},
{"glClear", (void*)glClear},
{"glClearColor", (void*)glClearColor},
{"glClearDepthf", (void*)glClearDepthf},
{"glClearStencil", (void*)glClearStencil},
{"glColorMask", (void*)glColorMask},
{"glCompileShader", (void*)glCompileShader},
{"glCompressedTexImage2D", (void*)glCompressedTexImage2D},
{"glCompressedTexSubImage2D", (void*)glCompressedTexSubImage2D},
{"glCopyTexImage2D", (void*)glCopyTexImage2D},
{"glCopyTexSubImage2D", (void*)glCopyTexSubImage2D},
{"glCreateProgram", (void*)glCreateProgram},
{"glCreateShader", (void*)glCreateShader},
{"glCullFace", (void*)glCullFace},
{"glDeleteBuffers", (void*)glDeleteBuffers},
{"glDeleteFramebuffers", (void*)glDeleteFramebuffers},
{"glDeleteProgram", (void*)glDeleteProgram},
{"glDeleteRenderbuffers", (void*)glDeleteRenderbuffers},
{"glDeleteShader", (void*)glDeleteShader},
{"glDeleteTextures", (void*)glDeleteTextures},
{"glDepthFunc", (void*)glDepthFunc},
{"glDepthMask", (void*)glDepthMask},
{"glDepthRangef", (void*)glDepthRangef},
{"glDetachShader", (void*)glDetachShader},
{"glDisable", (void*)glDisable},
{"glDisableVertexAttribArray", (void*)glDisableVertexAttribArray},
{"glDrawArrays", (void*)glDrawArrays},
{"glDrawElements", (void*)glDrawElements},
{"glEnable", (void*)glEnable},
{"glEnableVertexAttribArray", (void*)glEnableVertexAttribArray},
{"glFinish", (void*)glFinish},
{"glFlush", (void*)glFlush},
{"glFramebufferRenderbuffer", (void*)glFramebufferRenderbuffer},
{"glFramebufferTexture2D", (void*)glFramebufferTexture2D},
{"glFrontFace", (void*)glFrontFace},
{"glGenBuffers", (void*)glGenBuffers},
{"glGenerateMipmap", (void*)glGenerateMipmap},
{"glGenFramebuffers", (void*)glGenFramebuffers},
{"glGenRenderbuffers", (void*)glGenRenderbuffers},
{"glGenTextures", (void*)glGenTextures},
{"glGetActiveAttrib", (void*)glGetActiveAttrib},
{"glGetActiveUniform", (void*)glGetActiveUniform},
{"glGetAttachedShaders", (void*)glGetAttachedShaders},
{"glGetAttribLocation", (void*)glGetAttribLocation},
{"glGetBooleanv", (void*)glGetBooleanv},
{"glGetBufferParameteriv", (void*)glGetBufferParameteriv},
{"glGetError", (void*)glGetError},
{"glGetFloatv", (void*)glGetFloatv},
{"glGetFramebufferAttachmentParameteriv", (void*)glGetFramebufferAttachmentParameteriv},
{"glGetIntegerv", (void*)glGetIntegerv},
{"glGetProgramiv", (void*)glGetProgramiv},
{"glGetProgramInfoLog", (void*)glGetProgramInfoLog},
{"glGetRenderbufferParameteriv", (void*)glGetRenderbufferParameteriv},
{"glGetShaderiv", (void*)glGetShaderiv},
{"glGetShaderInfoLog", (void*)glGetShaderInfoLog},
{"glGetShaderPrecisionFormat", (void*)glGetShaderPrecisionFormat},
{"glGetShaderSource", (void*)glGetShaderSource},
{"glGetString", (void*)glGetString},
{"glGetTexParameterfv", (void*)glGetTexParameterfv},
{"glGetTexParameteriv", (void*)glGetTexParameteriv},
{"glGetUniformfv", (void*)glGetUniformfv},
{"glGetUniformiv", (void*)glGetUniformiv},
{"glGetUniformLocation", (void*)glGetUniformLocation},
{"glGetVertexAttribfv", (void*)glGetVertexAttribfv},
{"glGetVertexAttribiv", (void*)glGetVertexAttribiv},
{"glGetVertexAttribPointerv", (void*)glGetVertexAttribPointerv},
{"glHint", (void*)glHint},
{"glIsBuffer", (void*)glIsBuffer},
{"glIsEnabled", (void*)glIsEnabled},
{"glIsFramebuffer", (void*)glIsFramebuffer},
{"glIsProgram", (void*)glIsProgram},
{"glIsRenderbuffer", (void*)glIsRenderbuffer},
{"glIsShader", (void*)glIsShader},
{"glIsTexture", (void*)glIsTexture},
{"glLineWidth", (void*)glLineWidth},
{"glLinkProgram", (void*)glLinkProgram},
{"glPixelStorei", (void*)glPixelStorei},
{"glPolygonOffset", (void*)glPolygonOffset},
{"glReadPixels", (void*)glReadPixels},
{"glReleaseShaderCompiler", (void*)glReleaseShaderCompiler},
{"glRenderbufferStorage", (void*)glRenderbufferStorage},
{"glSampleCoverage", (void*)glSampleCoverage},
{"glScissor", (void*)glScissor},
{"glShaderBinary", (void*)glShaderBinary},
{"glShaderSource", (void*)glShaderSource},
{"glStencilFunc", (void*)glStencilFunc},
{"glStencilFuncSeparate", (void*)glStencilFuncSeparate},
{"glStencilMask", (void*)glStencilMask},
{"glStencilMaskSeparate", (void*)glStencilMaskSeparate},
{"glStencilOp", (void*)glStencilOp},
{"glStencilOpSeparate", (void*)glStencilOpSeparate},
{"glTexImage2D", (void*)glTexImage2D},
{"glTexParameterf", (void*)glTexParameterf},
{"glTexParameterfv", (void*)glTexParameterfv},
{"glTexParameteri", (void*)glTexParameteri},
{"glTexParameteriv", (void*)glTexParameteriv},
{"glTexSubImage2D", (void*)glTexSubImage2D},
{"glUniform1f", (void*)glUniform1f},
{"glUniform1fv", (void*)glUniform1fv},
{"glUniform1i", (void*)glUniform1i},
{"glUniform1iv", (void*)glUniform1iv},
{"glUniform2f", (void*)glUniform2f},
{"glUniform2fv", (void*)glUniform2fv},
{"glUniform2i", (void*)glUniform2i},
{"glUniform2iv", (void*)glUniform2iv},
{"glUniform3f", (void*)glUniform3f},
{"glUniform3fv", (void*)glUniform3fv},
{"glUniform3i", (void*)glUniform3i},
{"glUniform3iv", (void*)glUniform3iv},
{"glUniform4f", (void*)glUniform4f},
{"glUniform4fv", (void*)glUniform4fv},
{"glUniform4i", (void*)glUniform4i},
{"glUniform4iv", (void*)glUniform4iv},
{"glUniformMatrix2fv", (void*)glUniformMatrix2fv},
{"glUniformMatrix3fv", (void*)glUniformMatrix3fv},
{"glUniformMatrix4fv", (void*)glUniformMatrix4fv},
{"glUseProgram", (void*)glUseProgram},
{"glValidateProgram", (void*)glValidateProgram},
{"glVertexAttrib1f", (void*)glVertexAttrib1f},
{"glVertexAttrib1fv", (void*)glVertexAttrib1fv},
{"glVertexAttrib2f", (void*)glVertexAttrib2f},
{"glVertexAttrib2fv", (void*)glVertexAttrib2fv},
{"glVertexAttrib3f", (void*)glVertexAttrib3f},
{"glVertexAttrib3fv", (void*)glVertexAttrib3fv},
{"glVertexAttrib4f", (void*)glVertexAttrib4f},
{"glVertexAttrib4fv", (void*)glVertexAttrib4fv},
{"glVertexAttribPointer", (void*)glVertexAttribPointer},
{"glViewport", (void*)glViewport},
{"glEGLImageTargetTexture2DOES", (void*)glEGLImageTargetTexture2DOES},
{"glEGLImageTargetRenderbufferStorageOES", (void*)glEGLImageTargetRenderbufferStorageOES},
{"glGetProgramBinaryOES", (void*)glGetProgramBinaryOES},
{"glProgramBinaryOES", (void*)glProgramBinaryOES},
{"glMapBufferOES", (void*)glMapBufferOES},
{"glUnmapBufferOES", (void*)glUnmapBufferOES},
{"glTexImage3DOES", (void*)glTexImage3DOES},
{"glTexSubImage3DOES", (void*)glTexSubImage3DOES},
{"glCopyTexSubImage3DOES", (void*)glCopyTexSubImage3DOES},
{"glCompressedTexImage3DOES", (void*)glCompressedTexImage3DOES},
{"glCompressedTexSubImage3DOES", (void*)glCompressedTexSubImage3DOES},
{"glFramebufferTexture3DOES", (void*)glFramebufferTexture3DOES},
{"glBindVertexArrayOES", (void*)glBindVertexArrayOES},
{"glDeleteVertexArraysOES", (void*)glDeleteVertexArraysOES},
{"glGenVertexArraysOES", (void*)glGenVertexArraysOES},
{"glIsVertexArrayOES", (void*)glIsVertexArrayOES},
{"glDiscardFramebufferEXT", (void*)glDiscardFramebufferEXT},
{"glMultiDrawArraysEXT", (void*)glMultiDrawArraysEXT},
{"glMultiDrawElementsEXT", (void*)glMultiDrawElementsEXT},
{"glGetPerfMonitorGroupsAMD", (void*)glGetPerfMonitorGroupsAMD},
{"glGetPerfMonitorCountersAMD", (void*)glGetPerfMonitorCountersAMD},
{"glGetPerfMonitorGroupStringAMD", (void*)glGetPerfMonitorGroupStringAMD},
{"glGetPerfMonitorCounterStringAMD", (void*)glGetPerfMonitorCounterStringAMD},
{"glGetPerfMonitorCounterInfoAMD", (void*)glGetPerfMonitorCounterInfoAMD},
{"glGenPerfMonitorsAMD", (void*)glGenPerfMonitorsAMD},
{"glDeletePerfMonitorsAMD", (void*)glDeletePerfMonitorsAMD},
{"glSelectPerfMonitorCountersAMD", (void*)glSelectPerfMonitorCountersAMD},
{"glBeginPerfMonitorAMD", (void*)glBeginPerfMonitorAMD},
{"glEndPerfMonitorAMD", (void*)glEndPerfMonitorAMD},
{"glGetPerfMonitorCounterDataAMD", (void*)glGetPerfMonitorCounterDataAMD},
{"glRenderbufferStorageMultisampleIMG", (void*)glRenderbufferStorageMultisampleIMG},
{"glFramebufferTexture2DMultisampleIMG", (void*)glFramebufferTexture2DMultisampleIMG},
{"glDeleteFencesNV", (void*)glDeleteFencesNV},
{"glGenFencesNV", (void*)glGenFencesNV},
{"glIsFenceNV", (void*)glIsFenceNV},
{"glTestFenceNV", (void*)glTestFenceNV},
{"glGetFenceivNV", (void*)glGetFenceivNV},
{"glFinishFenceNV", (void*)glFinishFenceNV},
{"glSetFenceNV", (void*)glSetFenceNV},
{"glCoverageMaskNV", (void*)glCoverageMaskNV},
{"glCoverageOperationNV", (void*)glCoverageOperationNV},
{"glGetDriverControlsQCOM", (void*)glGetDriverControlsQCOM},
{"glGetDriverControlStringQCOM", (void*)glGetDriverControlStringQCOM},
{"glEnableDriverControlQCOM", (void*)glEnableDriverControlQCOM},
{"glDisableDriverControlQCOM", (void*)glDisableDriverControlQCOM},
{"glExtGetTexturesQCOM", (void*)glExtGetTexturesQCOM},
{"glExtGetBuffersQCOM", (void*)glExtGetBuffersQCOM},
{"glExtGetRenderbuffersQCOM", (void*)glExtGetRenderbuffersQCOM},
{"glExtGetFramebuffersQCOM", (void*)glExtGetFramebuffersQCOM},
{"glExtGetTexLevelParameterivQCOM", (void*)glExtGetTexLevelParameterivQCOM},
{"glExtTexObjectStateOverrideiQCOM", (void*)glExtTexObjectStateOverrideiQCOM},
{"glExtGetTexSubImageQCOM", (void*)glExtGetTexSubImageQCOM},
{"glExtGetBufferPointervQCOM", (void*)glExtGetBufferPointervQCOM},
{"glExtGetShadersQCOM", (void*)glExtGetShadersQCOM},
{"glExtGetProgramsQCOM", (void*)glExtGetProgramsQCOM},
{"glExtIsProgramBinaryQCOM", (void*)glExtIsProgramBinaryQCOM},
{"glExtGetProgramBinarySourceQCOM", (void*)glExtGetProgramBinarySourceQCOM},
{"glStartTilingQCOM", (void*)glStartTilingQCOM},
{"glEndTilingQCOM", (void*)glEndTilingQCOM},
};
static const int gl2_num_funcs = sizeof(gl2_funcs_by_name) / sizeof(struct _gl2_funcs_by_name);
#endif

View file

@ -0,0 +1,217 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __GUARD_gl2_opcodes_h_
#define __GUARD_gl2_opcodes_h_
#define OP_glActiveTexture 2048
#define OP_glAttachShader 2049
#define OP_glBindAttribLocation 2050
#define OP_glBindBuffer 2051
#define OP_glBindFramebuffer 2052
#define OP_glBindRenderbuffer 2053
#define OP_glBindTexture 2054
#define OP_glBlendColor 2055
#define OP_glBlendEquation 2056
#define OP_glBlendEquationSeparate 2057
#define OP_glBlendFunc 2058
#define OP_glBlendFuncSeparate 2059
#define OP_glBufferData 2060
#define OP_glBufferSubData 2061
#define OP_glCheckFramebufferStatus 2062
#define OP_glClear 2063
#define OP_glClearColor 2064
#define OP_glClearDepthf 2065
#define OP_glClearStencil 2066
#define OP_glColorMask 2067
#define OP_glCompileShader 2068
#define OP_glCompressedTexImage2D 2069
#define OP_glCompressedTexSubImage2D 2070
#define OP_glCopyTexImage2D 2071
#define OP_glCopyTexSubImage2D 2072
#define OP_glCreateProgram 2073
#define OP_glCreateShader 2074
#define OP_glCullFace 2075
#define OP_glDeleteBuffers 2076
#define OP_glDeleteFramebuffers 2077
#define OP_glDeleteProgram 2078
#define OP_glDeleteRenderbuffers 2079
#define OP_glDeleteShader 2080
#define OP_glDeleteTextures 2081
#define OP_glDepthFunc 2082
#define OP_glDepthMask 2083
#define OP_glDepthRangef 2084
#define OP_glDetachShader 2085
#define OP_glDisable 2086
#define OP_glDisableVertexAttribArray 2087
#define OP_glDrawArrays 2088
#define OP_glDrawElements 2089
#define OP_glEnable 2090
#define OP_glEnableVertexAttribArray 2091
#define OP_glFinish 2092
#define OP_glFlush 2093
#define OP_glFramebufferRenderbuffer 2094
#define OP_glFramebufferTexture2D 2095
#define OP_glFrontFace 2096
#define OP_glGenBuffers 2097
#define OP_glGenerateMipmap 2098
#define OP_glGenFramebuffers 2099
#define OP_glGenRenderbuffers 2100
#define OP_glGenTextures 2101
#define OP_glGetActiveAttrib 2102
#define OP_glGetActiveUniform 2103
#define OP_glGetAttachedShaders 2104
#define OP_glGetAttribLocation 2105
#define OP_glGetBooleanv 2106
#define OP_glGetBufferParameteriv 2107
#define OP_glGetError 2108
#define OP_glGetFloatv 2109
#define OP_glGetFramebufferAttachmentParameteriv 2110
#define OP_glGetIntegerv 2111
#define OP_glGetProgramiv 2112
#define OP_glGetProgramInfoLog 2113
#define OP_glGetRenderbufferParameteriv 2114
#define OP_glGetShaderiv 2115
#define OP_glGetShaderInfoLog 2116
#define OP_glGetShaderPrecisionFormat 2117
#define OP_glGetShaderSource 2118
#define OP_glGetString 2119
#define OP_glGetTexParameterfv 2120
#define OP_glGetTexParameteriv 2121
#define OP_glGetUniformfv 2122
#define OP_glGetUniformiv 2123
#define OP_glGetUniformLocation 2124
#define OP_glGetVertexAttribfv 2125
#define OP_glGetVertexAttribiv 2126
#define OP_glGetVertexAttribPointerv 2127
#define OP_glHint 2128
#define OP_glIsBuffer 2129
#define OP_glIsEnabled 2130
#define OP_glIsFramebuffer 2131
#define OP_glIsProgram 2132
#define OP_glIsRenderbuffer 2133
#define OP_glIsShader 2134
#define OP_glIsTexture 2135
#define OP_glLineWidth 2136
#define OP_glLinkProgram 2137
#define OP_glPixelStorei 2138
#define OP_glPolygonOffset 2139
#define OP_glReadPixels 2140
#define OP_glReleaseShaderCompiler 2141
#define OP_glRenderbufferStorage 2142
#define OP_glSampleCoverage 2143
#define OP_glScissor 2144
#define OP_glShaderBinary 2145
#define OP_glShaderSource 2146
#define OP_glStencilFunc 2147
#define OP_glStencilFuncSeparate 2148
#define OP_glStencilMask 2149
#define OP_glStencilMaskSeparate 2150
#define OP_glStencilOp 2151
#define OP_glStencilOpSeparate 2152
#define OP_glTexImage2D 2153
#define OP_glTexParameterf 2154
#define OP_glTexParameterfv 2155
#define OP_glTexParameteri 2156
#define OP_glTexParameteriv 2157
#define OP_glTexSubImage2D 2158
#define OP_glUniform1f 2159
#define OP_glUniform1fv 2160
#define OP_glUniform1i 2161
#define OP_glUniform1iv 2162
#define OP_glUniform2f 2163
#define OP_glUniform2fv 2164
#define OP_glUniform2i 2165
#define OP_glUniform2iv 2166
#define OP_glUniform3f 2167
#define OP_glUniform3fv 2168
#define OP_glUniform3i 2169
#define OP_glUniform3iv 2170
#define OP_glUniform4f 2171
#define OP_glUniform4fv 2172
#define OP_glUniform4i 2173
#define OP_glUniform4iv 2174
#define OP_glUniformMatrix2fv 2175
#define OP_glUniformMatrix3fv 2176
#define OP_glUniformMatrix4fv 2177
#define OP_glUseProgram 2178
#define OP_glValidateProgram 2179
#define OP_glVertexAttrib1f 2180
#define OP_glVertexAttrib1fv 2181
#define OP_glVertexAttrib2f 2182
#define OP_glVertexAttrib2fv 2183
#define OP_glVertexAttrib3f 2184
#define OP_glVertexAttrib3fv 2185
#define OP_glVertexAttrib4f 2186
#define OP_glVertexAttrib4fv 2187
#define OP_glVertexAttribPointer 2188
#define OP_glViewport 2189
#define OP_glEGLImageTargetTexture2DOES 2190
#define OP_glEGLImageTargetRenderbufferStorageOES 2191
#define OP_glGetProgramBinaryOES 2192
#define OP_glProgramBinaryOES 2193
#define OP_glMapBufferOES 2194
#define OP_glUnmapBufferOES 2195
#define OP_glTexImage3DOES 2196
#define OP_glTexSubImage3DOES 2197
#define OP_glCopyTexSubImage3DOES 2198
#define OP_glCompressedTexImage3DOES 2199
#define OP_glCompressedTexSubImage3DOES 2200
#define OP_glFramebufferTexture3DOES 2201
#define OP_glBindVertexArrayOES 2202
#define OP_glDeleteVertexArraysOES 2203
#define OP_glGenVertexArraysOES 2204
#define OP_glIsVertexArrayOES 2205
#define OP_glDiscardFramebufferEXT 2206
#define OP_glMultiDrawArraysEXT 2207
#define OP_glMultiDrawElementsEXT 2208
#define OP_glGetPerfMonitorGroupsAMD 2209
#define OP_glGetPerfMonitorCountersAMD 2210
#define OP_glGetPerfMonitorGroupStringAMD 2211
#define OP_glGetPerfMonitorCounterStringAMD 2212
#define OP_glGetPerfMonitorCounterInfoAMD 2213
#define OP_glGenPerfMonitorsAMD 2214
#define OP_glDeletePerfMonitorsAMD 2215
#define OP_glSelectPerfMonitorCountersAMD 2216
#define OP_glBeginPerfMonitorAMD 2217
#define OP_glEndPerfMonitorAMD 2218
#define OP_glGetPerfMonitorCounterDataAMD 2219
#define OP_glRenderbufferStorageMultisampleIMG 2220
#define OP_glFramebufferTexture2DMultisampleIMG 2221
#define OP_glDeleteFencesNV 2222
#define OP_glGenFencesNV 2223
#define OP_glIsFenceNV 2224
#define OP_glTestFenceNV 2225
#define OP_glGetFenceivNV 2226
#define OP_glFinishFenceNV 2227
#define OP_glSetFenceNV 2228
#define OP_glCoverageMaskNV 2229
#define OP_glCoverageOperationNV 2230
#define OP_glGetDriverControlsQCOM 2231
#define OP_glGetDriverControlStringQCOM 2232
#define OP_glEnableDriverControlQCOM 2233
#define OP_glDisableDriverControlQCOM 2234
#define OP_glExtGetTexturesQCOM 2235
#define OP_glExtGetBuffersQCOM 2236
#define OP_glExtGetRenderbuffersQCOM 2237
#define OP_glExtGetFramebuffersQCOM 2238
#define OP_glExtGetTexLevelParameterivQCOM 2239
#define OP_glExtTexObjectStateOverrideiQCOM 2240
#define OP_glExtGetTexSubImageQCOM 2241
#define OP_glExtGetBufferPointervQCOM 2242
#define OP_glExtGetShadersQCOM 2243
#define OP_glExtGetProgramsQCOM 2244
#define OP_glExtIsProgramBinaryQCOM 2245
#define OP_glExtGetProgramBinarySourceQCOM 2246
#define OP_glStartTilingQCOM 2247
#define OP_glEndTilingQCOM 2248
#define OP_glVertexAttribPointerData 2249
#define OP_glVertexAttribPointerOffset 2250
#define OP_glDrawElementsOffset 2251
#define OP_glDrawElementsData 2252
#define OP_glGetCompressedTextureFormats 2253
#define OP_glShaderString 2254
#define OP_glFinishRoundTrip 2255
#define OP_last 2256
#endif

View file

@ -0,0 +1,21 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _GL_2_TYPES_H_
#define _GL_2_TYPES_H_
#include "gl_base_types.h"
typedef void *GLvoidptr;
#endif

View file

@ -0,0 +1,13 @@
LOCAL_PATH := $(call my-dir)
$(call emugl-begin-shared-library,libOpenglSystemCommon)
$(call emugl-import,libGLESv1_enc libGLESv2_enc lib_renderControl_enc)
LOCAL_SRC_FILES := \
HostConnection.cpp \
QemuPipeStream.cpp \
ThreadInfo.cpp
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH) bionic/libc/private)
$(call emugl-end-module)

View file

@ -0,0 +1,41 @@
/*
* Copyright 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _SYSTEM_COMMON_EGL_CLIENT_IFACE_H
#define _SYSTEM_COMMON_EGL_CLIENT_IFACE_H
struct EGLThreadInfo; // defined in ThreadInfo.h
typedef struct {
EGLThreadInfo* (*getThreadInfo)();
const char* (*getGLString)(int glEnum);
} EGLClient_eglInterface;
typedef struct {
void* (*getProcAddress)(const char *funcName);
void (*init)();
void (*finish)();
} EGLClient_glesInterface;
//
// Any GLES/GLES2 client API library should define a function named "init_emul_gles"
// with the following prototype,
// It will be called by EGL after loading the GLES library for initialization
// and exchanging interface function pointers.
//
typedef EGLClient_glesInterface *(*init_emul_gles_t)(EGLClient_eglInterface *eglIface);
#endif

View file

@ -0,0 +1,36 @@
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __COMMON_EGL_IMAGE_H
#define __COMMON_EGL_IMAGE_H
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES/gl.h>
#include <system/window.h>
struct EGLImage_t
{
EGLDisplay dpy;
EGLenum target;
union
{
android_native_buffer_t *native_buffer;
uint32_t host_egl_image;
};
};
#endif

View file

@ -0,0 +1,186 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "HostConnection.h"
#include "TcpStream.h"
#include "QemuPipeStream.h"
#include "ThreadInfo.h"
#include <cutils/log.h>
#include "GLEncoder.h"
#include "GL2Encoder.h"
#include <memory>
#define STREAM_BUFFER_SIZE 4*1024*1024
#define STREAM_PORT_NUM 22468
/* Set to 1 to use a QEMU pipe, or 0 for a TCP connection */
#define USE_QEMU_PIPE 1
HostConnection::HostConnection() :
m_stream(NULL),
m_glEnc(NULL),
m_gl2Enc(NULL),
m_rcEnc(NULL),
m_checksumHelper()
{
}
HostConnection::~HostConnection()
{
delete m_stream;
delete m_glEnc;
delete m_gl2Enc;
delete m_rcEnc;
}
HostConnection *HostConnection::get()
{
/* TODO: Make this configurable with a system property */
const int useQemuPipe = USE_QEMU_PIPE;
// Get thread info
EGLThreadInfo *tinfo = getEGLThreadInfo();
if (!tinfo) {
return NULL;
}
if (tinfo->hostConn == NULL) {
HostConnection *con = new HostConnection();
if (NULL == con) {
return NULL;
}
if (useQemuPipe) {
QemuPipeStream *stream = new QemuPipeStream(STREAM_BUFFER_SIZE);
if (!stream) {
ALOGE("Failed to create QemuPipeStream for host connection!!!\n");
delete con;
return NULL;
}
if (stream->connect() < 0) {
ALOGE("Failed to connect to host (QemuPipeStream)!!!\n");
delete stream;
delete con;
return NULL;
}
con->m_stream = stream;
}
else /* !useQemuPipe */
{
TcpStream *stream = new TcpStream(STREAM_BUFFER_SIZE);
if (!stream) {
ALOGE("Failed to create TcpStream for host connection!!!\n");
delete con;
return NULL;
}
if (stream->connect("10.0.2.2", STREAM_PORT_NUM) < 0) {
ALOGE("Failed to connect to host (TcpStream)!!!\n");
delete stream;
delete con;
return NULL;
}
con->m_stream = stream;
}
// send zero 'clientFlags' to the host.
unsigned int *pClientFlags =
(unsigned int *)con->m_stream->allocBuffer(sizeof(unsigned int));
*pClientFlags = 0;
con->m_stream->commitBuffer(sizeof(unsigned int));
ALOGD("HostConnection::get() New Host Connection established %p, tid %d\n", con, gettid());
tinfo->hostConn = con;
}
return tinfo->hostConn;
}
GLEncoder *HostConnection::glEncoder()
{
if (!m_glEnc) {
m_glEnc = new GLEncoder(m_stream, checksumHelper());
DBG("HostConnection::glEncoder new encoder %p, tid %d", m_glEnc, gettid());
m_glEnc->setContextAccessor(s_getGLContext);
}
return m_glEnc;
}
GL2Encoder *HostConnection::gl2Encoder()
{
if (!m_gl2Enc) {
m_gl2Enc = new GL2Encoder(m_stream, checksumHelper());
DBG("HostConnection::gl2Encoder new encoder %p, tid %d", m_gl2Enc, gettid());
m_gl2Enc->setContextAccessor(s_getGL2Context);
}
return m_gl2Enc;
}
renderControl_encoder_context_t *HostConnection::rcEncoder()
{
if (!m_rcEnc) {
m_rcEnc = new renderControl_encoder_context_t(m_stream, checksumHelper());
// TODO: disable checksum as a workaround in a glTexSubImage2D problem
// Uncomment the following line when the root cause is solved
//setChecksumHelper(m_rcEnc);
}
return m_rcEnc;
}
gl_client_context_t *HostConnection::s_getGLContext()
{
EGLThreadInfo *ti = getEGLThreadInfo();
if (ti->hostConn) {
return ti->hostConn->m_glEnc;
}
return NULL;
}
gl2_client_context_t *HostConnection::s_getGL2Context()
{
EGLThreadInfo *ti = getEGLThreadInfo();
if (ti->hostConn) {
return ti->hostConn->m_gl2Enc;
}
return NULL;
}
void HostConnection::setChecksumHelper(renderControl_encoder_context_t *rcEnc) {
std::unique_ptr<char[]> glExtensions;
int extensionSize = rcEnc->rcGetGLString(rcEnc, GL_EXTENSIONS, NULL, 0);
if (extensionSize < 0) {
glExtensions = std::unique_ptr<char[]>(new char[-extensionSize]);
extensionSize = rcEnc->rcGetGLString(rcEnc, GL_EXTENSIONS, glExtensions.get(), -extensionSize);
if (extensionSize <= 0) {
glExtensions.reset();
}
}
// check the host supported version
uint32_t checksumVersion = 0;
const char* checksumPrefix = ChecksumCalculator::getMaxVersionStrPrefix();
const char* glProtocolStr = glExtensions.get() ?
strstr(glExtensions.get(), checksumPrefix) : NULL;
if (glProtocolStr) {
uint32_t maxVersion = ChecksumCalculator::getMaxVersion();
sscanf(glProtocolStr+strlen(checksumPrefix), "%d", &checksumVersion);
if (maxVersion < checksumVersion) {
checksumVersion = maxVersion;
}
// The ordering of the following two commands matters!
// Must tell the host first before setting it in the guest
rcEnc->rcSelectChecksumCalculator(rcEnc, checksumVersion, 0);
m_checksumHelper.setVersion(checksumVersion);
}
}

View file

@ -0,0 +1,61 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __COMMON_HOST_CONNECTION_H
#define __COMMON_HOST_CONNECTION_H
#include "IOStream.h"
#include "renderControl_enc.h"
#include "ChecksumCalculator.h"
class GLEncoder;
class gl_client_context_t;
class GL2Encoder;
class gl2_client_context_t;
class HostConnection
{
public:
static HostConnection *get();
~HostConnection();
GLEncoder *glEncoder();
GL2Encoder *gl2Encoder();
renderControl_encoder_context_t *rcEncoder();
ChecksumCalculator *checksumHelper() { return &m_checksumHelper; }
void flush() {
if (m_stream) {
m_stream->flush();
}
}
private:
HostConnection();
static gl_client_context_t *s_getGLContext();
static gl2_client_context_t *s_getGL2Context();
// setProtocol initilizes GL communication protocol for checksums
// should be called when m_rcEnc is created
void setChecksumHelper(renderControl_encoder_context_t *rcEnc);
private:
IOStream *m_stream;
GLEncoder *m_glEnc;
GL2Encoder *m_gl2Enc;
renderControl_encoder_context_t *m_rcEnc;
ChecksumCalculator m_checksumHelper;
};
#endif

View file

@ -0,0 +1,209 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "QemuPipeStream.h"
#include <hardware/qemu_pipe.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
QemuPipeStream::QemuPipeStream(size_t bufSize) :
IOStream(bufSize),
m_sock(-1),
m_bufsize(bufSize),
m_buf(NULL)
{
}
QemuPipeStream::QemuPipeStream(int sock, size_t bufSize) :
IOStream(bufSize),
m_sock(sock),
m_bufsize(bufSize),
m_buf(NULL)
{
}
QemuPipeStream::~QemuPipeStream()
{
if (m_sock >= 0) {
flush();
::close(m_sock);
}
if (m_buf != NULL) {
free(m_buf);
}
}
int QemuPipeStream::connect(void)
{
m_sock = qemu_pipe_open("opengles");
if (!valid()) return -1;
return 0;
}
void *QemuPipeStream::allocBuffer(size_t minSize)
{
size_t allocSize = (m_bufsize < minSize ? minSize : m_bufsize);
if (!m_buf) {
m_buf = (unsigned char *)malloc(allocSize);
}
else if (m_bufsize < allocSize) {
unsigned char *p = (unsigned char *)realloc(m_buf, allocSize);
if (p != NULL) {
m_buf = p;
m_bufsize = allocSize;
} else {
ERR("realloc (%d) failed\n", allocSize);
free(m_buf);
m_buf = NULL;
m_bufsize = 0;
}
}
return m_buf;
};
int QemuPipeStream::commitBuffer(size_t size)
{
return writeFully(m_buf, size);
}
int QemuPipeStream::writeFully(const void *buf, size_t len)
{
//DBG(">> QemuPipeStream::writeFully %d\n", len);
if (!valid()) return -1;
if (!buf) {
if (len>0) {
// If len is non-zero, buf must not be NULL. Otherwise the pipe would be
// in a corrupted state, which is lethal for the emulator.
ERR("QemuPipeStream::writeFully failed, buf=NULL, len %d,"
" lethal error, exiting", len);
abort();
}
return 0;
}
size_t res = len;
int retval = 0;
while (res > 0) {
ssize_t stat = ::write(m_sock, (const char *)(buf) + (len - res), res);
if (stat > 0) {
res -= stat;
continue;
}
if (stat == 0) { /* EOF */
ERR("QemuPipeStream::writeFully failed: premature EOF\n");
retval = -1;
break;
}
if (errno == EINTR) {
continue;
}
retval = stat;
ERR("QemuPipeStream::writeFully failed: %s, lethal error, exiting.\n",
strerror(errno));
abort();
}
//DBG("<< QemuPipeStream::writeFully %d\n", len );
return retval;
}
const unsigned char *QemuPipeStream::readFully(void *buf, size_t len)
{
//DBG(">> QemuPipeStream::readFully %d\n", len);
if (!valid()) return NULL;
if (!buf) {
if (len > 0) {
// If len is non-zero, buf must not be NULL. Otherwise the pipe would be
// in a corrupted state, which is lethal for the emulator.
ERR("QemuPipeStream::readFully failed, buf=NULL, len %zu, lethal"
" error, exiting.", len);
abort();
}
return NULL; // do not allow NULL buf in that implementation
}
size_t res = len;
while (res > 0) {
ssize_t stat = ::read(m_sock, (char *)(buf) + len - res, res);
if (stat == 0) {
// client shutdown;
return NULL;
} else if (stat < 0) {
if (errno == EINTR) {
continue;
} else {
ERR("QemuPipeStream::readFully failed (buf %p, len %zu"
", res %zu): %s, lethal error, exiting.", buf, len, res,
strerror(errno));
abort();
}
} else {
res -= stat;
}
}
//DBG("<< QemuPipeStream::readFully %d\n", len);
return (const unsigned char *)buf;
}
const unsigned char *QemuPipeStream::read( void *buf, size_t *inout_len)
{
//DBG(">> QemuPipeStream::read %d\n", *inout_len);
if (!valid()) return NULL;
if (!buf) {
ERR("QemuPipeStream::read failed, buf=NULL");
return NULL; // do not allow NULL buf in that implementation
}
int n = recv(buf, *inout_len);
if (n > 0) {
*inout_len = n;
return (const unsigned char *)buf;
}
//DBG("<< QemuPipeStream::read %d\n", *inout_len);
return NULL;
}
int QemuPipeStream::recv(void *buf, size_t len)
{
if (!valid()) return int(ERR_INVALID_SOCKET);
char* p = (char *)buf;
int ret = 0;
while(len > 0) {
int res = ::read(m_sock, p, len);
if (res > 0) {
p += res;
ret += res;
len -= res;
continue;
}
if (res == 0) { /* EOF */
break;
}
if (errno == EINTR)
continue;
/* A real error */
if (ret == 0)
ret = -1;
break;
}
return ret;
}

View file

@ -0,0 +1,51 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __QEMU_PIPE_STREAM_H
#define __QEMU_PIPE_STREAM_H
/* This file implements an IOStream that uses a QEMU fast-pipe
* to communicate with the emulator's 'opengles' service. See
* <hardware/qemu_pipe.h> for more details.
*/
#include <stdlib.h>
#include "IOStream.h"
class QemuPipeStream : public IOStream {
public:
typedef enum { ERR_INVALID_SOCKET = -1000 } QemuPipeStreamError;
explicit QemuPipeStream(size_t bufsize = 10000);
~QemuPipeStream();
int connect(void);
virtual void *allocBuffer(size_t minSize);
virtual int commitBuffer(size_t size);
virtual const unsigned char *readFully( void *buf, size_t len);
virtual const unsigned char *read( void *buf, size_t *inout_len);
bool valid() { return m_sock >= 0; }
int recv(void *buf, size_t len);
virtual int writeFully(const void *buf, size_t len);
private:
int m_sock;
size_t m_bufsize;
unsigned char *m_buf;
QemuPipeStream(int sock, size_t bufSize);
};
#endif

View file

@ -0,0 +1,40 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ThreadInfo.h"
#include "cutils/threads.h"
thread_store_t s_tls = THREAD_STORE_INITIALIZER;
static void tlsDestruct(void *ptr)
{
if (ptr) {
EGLThreadInfo *ti = (EGLThreadInfo *)ptr;
delete ti->hostConn;
delete ti;
((void **)__get_tls())[TLS_SLOT_OPENGL] = NULL;
}
}
EGLThreadInfo *slow_getEGLThreadInfo()
{
EGLThreadInfo *ti = (EGLThreadInfo *)thread_store_get(&s_tls);
if (ti) return ti;
ti = new EGLThreadInfo();
thread_store_set(&s_tls, ti, tlsDestruct);
return ti;
}

View file

@ -0,0 +1,59 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _THREAD_INFO_H
#define _THREAD_INFO_H
#include "HostConnection.h"
#include <pthread.h>
#ifdef __ANDROID__
#include <bionic_tls.h>
#endif
struct EGLContext_t;
struct EGLThreadInfo
{
EGLThreadInfo() : currentContext(NULL), hostConn(NULL), eglError(EGL_SUCCESS) {}
EGLContext_t *currentContext;
HostConnection *hostConn;
int eglError;
};
EGLThreadInfo *slow_getEGLThreadInfo();
#ifdef __ANDROID__
// We have a dedicated TLS slot in bionic
inline EGLThreadInfo* getEGLThreadInfo() {
EGLThreadInfo *tInfo =
(EGLThreadInfo *)(((uintptr_t *)__get_tls())[TLS_SLOT_OPENGL]);
if (!tInfo) {
tInfo = slow_getEGLThreadInfo();
((uintptr_t *)__get_tls())[TLS_SLOT_OPENGL] = (uintptr_t)tInfo;
}
return tInfo;
}
#else
inline EGLThreadInfo* getEGLThreadInfo() {
return slow_getEGLThreadInfo();
}
#endif
#endif // of _THREAD_INFO_H

View file

@ -0,0 +1,114 @@
/*
* Copyright 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __GRALLOC_CB_H__
#define __GRALLOC_CB_H__
#include <hardware/hardware.h>
#include <hardware/gralloc.h>
#include <cutils/native_handle.h>
#define BUFFER_HANDLE_MAGIC ((int)0xabfabfab)
#define CB_HANDLE_NUM_INTS(nfds) (int)((sizeof(cb_handle_t) - (nfds)*sizeof(int)) / sizeof(int))
//
// Our buffer handle structure
//
struct cb_handle_t : public native_handle {
cb_handle_t(int p_fd, int p_ashmemSize, int p_usage,
int p_width, int p_height, int p_frameworkFormat,
int p_format, int p_glFormat, int p_glType) :
fd(p_fd),
magic(BUFFER_HANDLE_MAGIC),
usage(p_usage),
width(p_width),
height(p_height),
frameworkFormat(p_frameworkFormat),
format(p_format),
glFormat(p_glFormat),
glType(p_glType),
ashmemSize(p_ashmemSize),
ashmemBase(0),
ashmemBasePid(0),
mappedPid(0),
lockedLeft(0),
lockedTop(0),
lockedWidth(0),
lockedHeight(0),
hostHandle(0)
{
version = sizeof(native_handle);
numFds = 0;
numInts = CB_HANDLE_NUM_INTS(numFds);
}
~cb_handle_t() {
magic = 0;
}
void setFd(int p_fd) {
if (p_fd >= 0) {
numFds = 1;
}
else {
numFds = 0;
}
fd = p_fd;
numInts = CB_HANDLE_NUM_INTS(numFds);
}
static bool validate(const cb_handle_t* hnd) {
return (hnd &&
hnd->version == sizeof(native_handle) &&
hnd->magic == BUFFER_HANDLE_MAGIC &&
hnd->numInts == CB_HANDLE_NUM_INTS(hnd->numFds));
}
bool canBePosted() {
return (0 != (usage & GRALLOC_USAGE_HW_FB));
}
// file-descriptors
int fd; // ashmem fd (-1 of ashmem region did not allocated, i.e. no SW access needed)
// ints
int magic; // magic number in order to validate a pointer to be a cb_handle_t
int usage; // usage bits the buffer was created with
int width; // buffer width
int height; // buffer height
int frameworkFormat; // format requested by the Android framework
int format; // real internal pixel format format
int glFormat; // OpenGL format enum used for host h/w color buffer
int glType; // OpenGL type enum used when uploading to host
int ashmemSize; // ashmem region size for the buffer (0 unless is HW_FB buffer or
// s/w access is needed)
union {
intptr_t ashmemBase; // CPU address of the mapped ashmem region
uint64_t padding; // enforce same size on 32-bit/64-bit
} __attribute__((aligned(8)));
int ashmemBasePid; // process id which mapped the ashmem region
int mappedPid; // process id which succeeded gralloc_register call
int lockedLeft; // region of buffer locked for s/w write
int lockedTop;
int lockedWidth;
int lockedHeight;
uint32_t hostHandle;
};
#endif //__GRALLOC_CB_H__

View file

@ -0,0 +1,41 @@
ifneq (false,$(BUILD_EMULATOR_OPENGL_DRIVER))
LOCAL_PATH := $(call my-dir)
$(call emugl-begin-shared-library,libEGL_emulation)
$(call emugl-import,libOpenglSystemCommon)
$(call emugl-set-shared-library-subpath,egl)
LOCAL_CFLAGS += -DLOG_TAG=\"EGL_emulation\" -DEGL_EGLEXT_PROTOTYPES -DWITH_GLES2
LOCAL_SRC_FILES := \
eglDisplay.cpp \
egl.cpp \
ClientAPIExts.cpp
LOCAL_SHARED_LIBRARIES += libdl
# Used to access the Bionic private OpenGL TLS slot
LOCAL_C_INCLUDES += bionic/libc/private
$(call emugl-end-module)
#### egl.cfg ####
# Ensure that this file is only copied to emulator-specific builds.
# Other builds are device-specific and will provide their own
# version of this file to point to the appropriate HW EGL libraries.
#
ifneq (,$(filter aosp_arm aosp_x86 aosp_mips full full_x86 full_mips sdk sdk_x86 sdk_mips google_sdk google_sdk_x86 google_sdk_mips,$(TARGET_PRODUCT)))
include $(CLEAR_VARS)
LOCAL_MODULE := egl.cfg
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
LOCAL_MODULE_CLASS := ETC
include $(BUILD_PREBUILT)
endif # TARGET_PRODUCT in 'full full_x86 full_mips sdk sdk_x86 sdk_mips google_sdk google_sdk_x86 google_sdk_mips')
endif # BUILD_EMULATOR_OPENGL_DRIVER != false

View file

@ -0,0 +1,157 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ClientAPIExts.h"
#include "ThreadInfo.h"
#include <GLES/gl.h>
#include <GLES/glext.h>
#include "eglContext.h"
namespace ClientAPIExts
{
//
// define function pointer type for each extention function
// typename has the form __egl_{funcname}_t
//
#define FUNC_TYPE(fname) __egl_ ## fname ## _t
#define API_ENTRY(fname,params,args) \
typedef void (GL_APIENTRY *FUNC_TYPE(fname)) params;
#define API_ENTRY_RET(rtype,fname,params,args) \
typedef rtype (GL_APIENTRY *FUNC_TYPE(fname)) params;
#include "ClientAPIExts.in"
#undef API_ENTRY
#undef API_ENTRY_RET
/////
// Define static table to store the function value for each
// client API. functions pointers will get initialized through
// ClientAPIExts::initClientFuncs function after each client API has been
// loaded.
/////
#define API_ENTRY(fname,params,args) \
FUNC_TYPE(fname) fname;
#define API_ENTRY_RET(rtype,fname,params,args) \
API_ENTRY(fname,params,args)
static struct _ext_table
{
#include "ClientAPIExts.in"
} s_client_extensions[2];
#undef API_ENTRY
#undef API_ENTRY_RET
//
// This function initialized each entry in the s_client_extensions
// struct at the givven index using the givven client interface
//
void initClientFuncs(const EGLClient_glesInterface *iface, int idx)
{
#define API_ENTRY(fname,params,args) \
s_client_extensions[idx].fname = \
(FUNC_TYPE(fname))iface->getProcAddress(#fname);
#define API_ENTRY_RET(rtype,fname,params,args) \
API_ENTRY(fname,params,args)
//
// reset all func pointers to NULL
//
memset(&s_client_extensions[idx], 0, sizeof(struct _ext_table));
//
// And now query the GLES library for each proc address
//
#include "ClientAPIExts.in"
#undef API_ENTRY
#undef API_ENTRY_RET
}
//
// Define implementation for each extension function which checks
// the current context version and calls to the correct client API
// function.
//
#define API_ENTRY(fname,params,args) \
static void _egl_ ## fname params \
{ \
EGLThreadInfo* thread = getEGLThreadInfo(); \
if (!thread->currentContext) { \
return; \
} \
int idx = (int)thread->currentContext->version - 1; \
if (!s_client_extensions[idx].fname) { \
return; \
} \
(*s_client_extensions[idx].fname) args; \
}
#define API_ENTRY_RET(rtype,fname,params,args) \
static rtype _egl_ ## fname params \
{ \
EGLThreadInfo* thread = getEGLThreadInfo(); \
if (!thread->currentContext) { \
return (rtype)0; \
} \
int idx = (int)thread->currentContext->version - 1; \
if (!s_client_extensions[idx].fname) { \
return (rtype)0; \
} \
return (*s_client_extensions[idx].fname) args; \
}
#include "ClientAPIExts.in"
#undef API_ENTRY
#undef API_ENTRY_RET
//
// Define a table to map function names to the local _egl_ version of
// the extension function, to be used in eglGetProcAddress.
//
#define API_ENTRY(fname,params,args) \
{ #fname, (void*)_egl_ ## fname},
#define API_ENTRY_RET(rtype,fname,params,args) \
API_ENTRY(fname,params,args)
static const struct _client_ext_funcs {
const char *fname;
void* proc;
} s_client_ext_funcs[] = {
#include "ClientAPIExts.in"
};
static const int numExtFuncs = sizeof(s_client_ext_funcs) /
sizeof(s_client_ext_funcs[0]);
#undef API_ENTRY
#undef API_ENTRY_RET
//
// returns the __egl_ version of the givven extension function name.
//
void* getProcAddress(const char *fname)
{
for (int i=0; i<numExtFuncs; i++) {
if (!strcmp(fname, s_client_ext_funcs[i].fname)) {
return s_client_ext_funcs[i].proc;
}
}
return NULL;
}
} // of namespace ClientAPIExts

View file

@ -0,0 +1,29 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _CLIENT_APIS_EXTS_H
#define _CLIENT_APIS_EXTS_H
#include "EGLClientIface.h"
namespace ClientAPIExts
{
void initClientFuncs(const EGLClient_glesInterface *iface, int idx);
void* getProcAddress(const char *fname);
} // of namespace ClientAPIExts
#endif

View file

@ -0,0 +1,201 @@
//
// Each extension function should have one of the following
// macro definitions:
// API_ENTRY(funcname, paramlist, arglist)
// -or- (if the function has a return value)
// API_ENTRY_RET(return_type,funcname, paramlist, arglist)
//
API_ENTRY(glEGLImageTargetTexture2DOES,
(GLenum target, GLeglImageOES image),
(target, image))
API_ENTRY(glEGLImageTargetRenderbufferStorageOES,
(GLenum target, GLeglImageOES image),
(target, image))
API_ENTRY(glBlendEquationSeparateOES,
(GLenum modeRGB, GLenum modeAlpha),
(modeRGB, modeAlpha))
API_ENTRY(glBlendFuncSeparateOES,
(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha),
(srcRGB, dstRGB, srcAlpha, dstAlpha))
API_ENTRY(glBlendEquationOES,
(GLenum mode),
(mode))
API_ENTRY(glCurrentPaletteMatrixOES,
(GLuint matrixpaletteindex),
(matrixpaletteindex))
API_ENTRY(glLoadPaletteFromModelViewMatrixOES,
(void),
())
API_ENTRY(glMatrixIndexPointerOES,
(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer),
(size, type, stride, pointer))
API_ENTRY(glWeightPointerOES,
(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer),
(size, type, stride, pointer))
API_ENTRY(glDepthRangefOES,
(GLclampf zNear, GLclampf zFar),
(zNear, zFar))
API_ENTRY(glFrustumfOES,
(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar),
(left, right, bottom, top, zNear, zFar))
API_ENTRY(glOrthofOES,
(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar),
(left, right, bottom, top, zNear, zFar))
API_ENTRY(glClipPlanefOES,
(GLenum plane, const GLfloat *equation),
(plane, equation))
API_ENTRY(glGetClipPlanefOES,
(GLenum pname, GLfloat * eqn),
(pname, eqn))
API_ENTRY(glClearDepthfOES,
(GLclampf depth),
(depth))
API_ENTRY(glPointSizePointerOES,
(GLenum type, GLsizei stride, const GLvoid *pointer),
(type, stride, pointer))
API_ENTRY(glTexGenfOES,
(GLenum coord, GLenum pname, GLfloat param),
(coord, pname, param))
API_ENTRY(glTexGenfvOES,
(GLenum coord, GLenum pname, const GLfloat *params),
(coord, pname, params))
API_ENTRY(glTexGeniOES,
(GLenum coord, GLenum pname, GLint param),
(coord, pname, param))
API_ENTRY(glTexGenivOES,
(GLenum coord, GLenum pname, const GLint *params),
(coord, pname, params))
API_ENTRY(glTexGenxOES,
(GLenum coord, GLenum pname, GLfixed param),
(coord, pname, param))
API_ENTRY(glTexGenxvOES,
(GLenum coord, GLenum pname, const GLfixed *params),
(coord, pname, params))
API_ENTRY(glGetTexGenfvOES,
(GLenum coord, GLenum pname, GLfloat *params),
(coord, pname, params))
API_ENTRY(glGetTexGenivOES,
(GLenum coord, GLenum pname, GLint *params),
(coord, pname, params))
API_ENTRY(glGetTexGenxvOES,
(GLenum coord, GLenum pname, GLfixed *params),
(coord, pname, params))
API_ENTRY_RET(GLboolean,
glIsRenderbufferOES,
(GLuint renderbuffer),
(renderbuffer))
API_ENTRY(glBindRenderbufferOES,
(GLenum target, GLuint renderbuffer),
(target, renderbuffer))
API_ENTRY(glDeleteRenderbuffersOES,
(GLsizei n, const GLuint* renderbuffers),
(n, renderbuffers))
API_ENTRY(glGenRenderbuffersOES,
(GLsizei n, GLuint* renderbuffers),
(n, renderbuffers))
API_ENTRY(glRenderbufferStorageOES,
(GLenum target, GLenum internalformat, GLsizei width, GLsizei height),
(target, internalformat, width, height))
API_ENTRY(glGetRenderbufferParameterivOES,
(GLenum target, GLenum pname, GLint* params),
(target, pname, params))
API_ENTRY_RET(GLboolean,
glIsFramebufferOES,
(GLuint framebuffer),
(framebuffer))
API_ENTRY(glBindFramebufferOES,
(GLenum target, GLuint framebuffer),
(target, framebuffer))
API_ENTRY(glDeleteFramebuffersOES,
(GLsizei n, const GLuint* framebuffers),
(n, framebuffers))
API_ENTRY(glGenFramebuffersOES,
(GLsizei n, GLuint* framebuffers),
(n, framebuffers))
API_ENTRY_RET(GLenum,
glCheckFramebufferStatusOES,
(GLenum target),
(target))
API_ENTRY(glFramebufferTexture2DOES,
(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level),
(target, attachment, textarget, texture, level))
API_ENTRY(glFramebufferRenderbufferOES,
(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer),
(target, attachment, renderbuffertarget, renderbuffer))
API_ENTRY(glGetFramebufferAttachmentParameterivOES,
(GLenum target, GLenum attachment, GLenum pname, GLint* params),
(target, attachment, pname, params))
API_ENTRY(glGenerateMipmapOES,
(GLenum target),
(target))
API_ENTRY(glDrawTexsOES,
(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height),
(x, y, z, width, height))
API_ENTRY(glDrawTexiOES,
(GLint x, GLint y, GLint z, GLint width, GLint height),
(x, y, z, width, height))
API_ENTRY(glDrawTexfOES,
(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height),
(x, y, z, width, height))
API_ENTRY(glDrawTexxOES,
(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height),
(x, y, z, width, height))
API_ENTRY(glDrawTexsvOES,
(const GLshort *coords),
(coords))
API_ENTRY(glDrawTexivOES,
(const GLint *coords),
(coords))
API_ENTRY(glDrawTexfvOES,
(const GLfloat *coords),
(coords))
API_ENTRY(glDrawTexxvOES,
(const GLfixed *coords),
(coords))

View file

@ -0,0 +1 @@
0 0 emulation

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,52 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _EGL_CONTEXT_H
#define _EGL_CONTEXT_H
#include "GLClientState.h"
#include "GLSharedGroup.h"
struct EGLContext_t {
enum {
IS_CURRENT = 0x00010000,
NEVER_CURRENT = 0x00020000
};
EGLContext_t(EGLDisplay dpy, EGLConfig config, EGLContext_t* shareCtx);
~EGLContext_t();
uint32_t flags;
EGLDisplay dpy;
EGLConfig config;
EGLSurface read;
EGLSurface draw;
EGLContext_t * shareCtx;
EGLint version;
uint32_t rcContext;
const char* versionString;
const char* vendorString;
const char* rendererString;
const char* shaderVersionString;
const char* extensionString;
EGLint deletePending;
GLClientState * getClientState(){ return clientState; }
GLSharedGroupPtr getSharedGroup(){ return sharedGroup; }
private:
GLClientState * clientState;
GLSharedGroupPtr sharedGroup;
};
#endif

View file

@ -0,0 +1,485 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "eglDisplay.h"
#include "HostConnection.h"
#include <dlfcn.h>
static const int systemEGLVersionMajor = 1;
static const int systemEGLVersionMinor = 4;
static const char systemEGLVendor[] = "Google Android emulator";
// list of extensions supported by this EGL implementation
// NOTE that each extension name should be suffixed with space
static const char systemStaticEGLExtensions[] =
"EGL_ANDROID_image_native_buffer "
"EGL_KHR_fence_sync "
"EGL_KHR_image_base "
"EGL_KHR_gl_texture_2d_image ";
static void *s_gles_lib = NULL;
static void *s_gles2_lib = NULL;
// The following function will be called when we (libEGL)
// gets unloaded
// At this point we want to unload the gles libraries we
// might have loaded during initialization
static void __attribute__ ((destructor)) do_on_unload(void)
{
if (s_gles_lib) {
dlclose(s_gles_lib);
}
if (s_gles2_lib) {
dlclose(s_gles2_lib);
}
}
eglDisplay::eglDisplay() :
m_initialized(false),
m_major(0),
m_minor(0),
m_hostRendererVersion(0),
m_numConfigs(0),
m_numConfigAttribs(0),
m_attribs(DefaultKeyedVector<EGLint, EGLint>(ATTRIBUTE_NONE)),
m_configs(NULL),
m_gles_iface(NULL),
m_gles2_iface(NULL),
m_versionString(NULL),
m_vendorString(NULL),
m_extensionString(NULL)
{
pthread_mutex_init(&m_lock, NULL);
}
eglDisplay::~eglDisplay()
{
pthread_mutex_destroy(&m_lock);
}
bool eglDisplay::initialize(EGLClient_eglInterface *eglIface)
{
pthread_mutex_lock(&m_lock);
if (!m_initialized) {
//
// load GLES client API
//
#if __LP64__
m_gles_iface = loadGLESClientAPI("/system/lib64/egl/libGLESv1_CM_emulation.so",
eglIface,
&s_gles_lib);
#else
m_gles_iface = loadGLESClientAPI("/system/lib/egl/libGLESv1_CM_emulation.so",
eglIface,
&s_gles_lib);
#endif
if (!m_gles_iface) {
pthread_mutex_unlock(&m_lock);
ALOGE("Failed to load gles1 iface");
return false;
}
#ifdef WITH_GLES2
#if __LP64__
m_gles2_iface = loadGLESClientAPI("/system/lib64/egl/libGLESv2_emulation.so",
eglIface,
&s_gles2_lib);
#else
m_gles2_iface = loadGLESClientAPI("/system/lib/egl/libGLESv2_emulation.so",
eglIface,
&s_gles2_lib);
#endif
// Note that if loading gles2 failed, we can still run with no
// GLES2 support, having GLES2 is not mandatory.
#endif
//
// establish connection with the host
//
HostConnection *hcon = HostConnection::get();
if (!hcon) {
pthread_mutex_unlock(&m_lock);
ALOGE("Failed to establish connection with the host\n");
return false;
}
//
// get renderControl encoder instance
//
renderControl_encoder_context_t *rcEnc = hcon->rcEncoder();
if (!rcEnc) {
pthread_mutex_unlock(&m_lock);
ALOGE("Failed to get renderControl encoder instance");
return false;
}
//
// Query host reneder and EGL version
//
m_hostRendererVersion = rcEnc->rcGetRendererVersion(rcEnc);
EGLint status = rcEnc->rcGetEGLVersion(rcEnc, &m_major, &m_minor);
if (status != EGL_TRUE) {
// host EGL initialization failed !!
pthread_mutex_unlock(&m_lock);
return false;
}
//
// Take minimum version beween what we support and what the host support
//
if (m_major > systemEGLVersionMajor) {
m_major = systemEGLVersionMajor;
m_minor = systemEGLVersionMinor;
}
else if (m_major == systemEGLVersionMajor &&
m_minor > systemEGLVersionMinor) {
m_minor = systemEGLVersionMinor;
}
//
// Query the host for the set of configs
//
m_numConfigs = rcEnc->rcGetNumConfigs(rcEnc, (uint32_t*)&m_numConfigAttribs);
if (m_numConfigs <= 0 || m_numConfigAttribs <= 0) {
// just sanity check - should never happen
pthread_mutex_unlock(&m_lock);
return false;
}
uint32_t nInts = m_numConfigAttribs * (m_numConfigs + 1);
EGLint tmp_buf[nInts];
m_configs = new EGLint[nInts-m_numConfigAttribs];
if (!m_configs) {
pthread_mutex_unlock(&m_lock);
return false;
}
//EGLint n = rcEnc->rcGetConfigs(rcEnc, nInts*sizeof(EGLint), m_configs);
EGLint n = rcEnc->rcGetConfigs(rcEnc, nInts*sizeof(EGLint), (GLuint*)tmp_buf);
if (n != m_numConfigs) {
pthread_mutex_unlock(&m_lock);
return false;
}
//Fill the attributes vector.
//The first m_numConfigAttribs values of tmp_buf are the actual attributes enums.
for (int i=0; i<m_numConfigAttribs; i++) {
m_attribs.add(tmp_buf[i], i);
}
//Copy the actual configs data to m_configs
memcpy(m_configs, tmp_buf + m_numConfigAttribs, m_numConfigs*m_numConfigAttribs*sizeof(EGLint));
m_initialized = true;
}
pthread_mutex_unlock(&m_lock);
processConfigs();
return true;
}
void eglDisplay::processConfigs()
{
for (intptr_t i=0; i<m_numConfigs; i++) {
EGLConfig config = (EGLConfig)i;
//Setup the EGL_NATIVE_VISUAL_ID attribute
PixelFormat format;
if (getConfigNativePixelFormat(config, &format)) {
setConfigAttrib(config, EGL_NATIVE_VISUAL_ID, format);
}
}
}
void eglDisplay::terminate()
{
pthread_mutex_lock(&m_lock);
if (m_initialized) {
m_initialized = false;
delete [] m_configs;
m_configs = NULL;
if (m_versionString) {
free(m_versionString);
m_versionString = NULL;
}
if (m_vendorString) {
free(m_vendorString);
m_vendorString = NULL;
}
if (m_extensionString) {
free(m_extensionString);
m_extensionString = NULL;
}
}
pthread_mutex_unlock(&m_lock);
}
EGLClient_glesInterface *eglDisplay::loadGLESClientAPI(const char *libName,
EGLClient_eglInterface *eglIface,
void **libHandle)
{
void *lib = dlopen(libName, RTLD_NOW);
if (!lib) {
ALOGE("Failed to dlopen %s", libName);
return NULL;
}
init_emul_gles_t init_gles_func = (init_emul_gles_t)dlsym(lib,"init_emul_gles");
if (!init_gles_func) {
ALOGE("Failed to find init_emul_gles");
dlclose((void*)lib);
return NULL;
}
*libHandle = lib;
return (*init_gles_func)(eglIface);
}
static char *queryHostEGLString(EGLint name)
{
HostConnection *hcon = HostConnection::get();
if (hcon) {
renderControl_encoder_context_t *rcEnc = hcon->rcEncoder();
if (rcEnc) {
int n = rcEnc->rcQueryEGLString(rcEnc, name, NULL, 0);
if (n < 0) {
// allocate space for the string with additional
// space charachter to be suffixed at the end.
char *str = (char *)malloc(-n+2);
n = rcEnc->rcQueryEGLString(rcEnc, name, str, -n);
if (n > 0) {
// add extra space at end of string which will be
// needed later when filtering the extension list.
strcat(str, " ");
return str;
}
free(str);
}
}
}
return NULL;
}
static bool findExtInList(const char* token, int tokenlen, const char* list)
{
const char* p = list;
while (*p != '\0') {
const char* q = strchr(p, ' ');
if (q == NULL) {
/* should not happen, list must be space-terminated */
break;
}
if (tokenlen == (q - p) && !memcmp(token, p, tokenlen)) {
return true; /* found it */
}
p = q+1;
}
return false; /* not found */
}
static char *buildExtensionString()
{
//Query host extension string
char *hostExt = queryHostEGLString(EGL_EXTENSIONS);
if (!hostExt || (hostExt[1] == '\0')) {
// no extensions on host - only static extension list supported
return strdup(systemStaticEGLExtensions);
}
int n = strlen(hostExt);
if (n > 0) {
char *str;
asprintf(&str,"%s%s", systemStaticEGLExtensions, hostExt);
free((char*)hostExt);
return str;
}
else {
free((char*)hostExt);
return strdup(systemStaticEGLExtensions);
}
}
const char *eglDisplay::queryString(EGLint name)
{
if (name == EGL_CLIENT_APIS) {
return "OpenGL_ES";
}
else if (name == EGL_VERSION) {
pthread_mutex_lock(&m_lock);
if (m_versionString) {
pthread_mutex_unlock(&m_lock);
return m_versionString;
}
// build version string
asprintf(&m_versionString, "%d.%d", m_major, m_minor);
pthread_mutex_unlock(&m_lock);
return m_versionString;
}
else if (name == EGL_VENDOR) {
pthread_mutex_lock(&m_lock);
if (m_vendorString) {
pthread_mutex_unlock(&m_lock);
return m_vendorString;
}
// build vendor string
const char *hostVendor = queryHostEGLString(EGL_VENDOR);
if (hostVendor) {
asprintf(&m_vendorString, "%s Host: %s",
systemEGLVendor, hostVendor);
free((char*)hostVendor);
}
else {
m_vendorString = (char *)systemEGLVendor;
}
pthread_mutex_unlock(&m_lock);
return m_vendorString;
}
else if (name == EGL_EXTENSIONS) {
pthread_mutex_lock(&m_lock);
if (m_extensionString) {
pthread_mutex_unlock(&m_lock);
return m_extensionString;
}
// build extension string
m_extensionString = buildExtensionString();
pthread_mutex_unlock(&m_lock);
return m_extensionString;
}
else {
ALOGE("[%s] Unknown name %d\n", __FUNCTION__, name);
return NULL;
}
}
/* To get the value of attribute <a> of config <c> use the following formula:
* value = *(m_configs + (int)c*m_numConfigAttribs + a);
*/
EGLBoolean eglDisplay::getAttribValue(EGLConfig config, EGLint attribIdx, EGLint * value)
{
if (attribIdx == ATTRIBUTE_NONE)
{
ALOGE("[%s] Bad attribute idx\n", __FUNCTION__);
return EGL_FALSE;
}
*value = *(m_configs + (intptr_t)config*m_numConfigAttribs + attribIdx);
return EGL_TRUE;
}
EGLBoolean eglDisplay::getConfigAttrib(EGLConfig config, EGLint attrib, EGLint * value)
{
//Though it seems that valueFor() is thread-safe, we don't take chanses
pthread_mutex_lock(&m_lock);
EGLBoolean ret = getAttribValue(config, m_attribs.valueFor(attrib), value);
pthread_mutex_unlock(&m_lock);
return ret;
}
void eglDisplay::dumpConfig(EGLConfig config)
{
EGLint value = 0;
DBG("^^^^^^^^^^ dumpConfig %d ^^^^^^^^^^^^^^^^^^", (int)config);
for (int i=0; i<m_numConfigAttribs; i++) {
getAttribValue(config, i, &value);
DBG("{%d}[%d] %d\n", (int)config, i, value);
}
}
/* To set the value of attribute <a> of config <c> use the following formula:
* *(m_configs + (int)c*m_numConfigAttribs + a) = value;
*/
EGLBoolean eglDisplay::setAttribValue(EGLConfig config, EGLint attribIdx, EGLint value)
{
if (attribIdx == ATTRIBUTE_NONE)
{
ALOGE("[%s] Bad attribute idx\n", __FUNCTION__);
return EGL_FALSE;
}
*(m_configs + (intptr_t)config*m_numConfigAttribs + attribIdx) = value;
return EGL_TRUE;
}
EGLBoolean eglDisplay::setConfigAttrib(EGLConfig config, EGLint attrib, EGLint value)
{
//Though it seems that valueFor() is thread-safe, we don't take chanses
pthread_mutex_lock(&m_lock);
EGLBoolean ret = setAttribValue(config, m_attribs.valueFor(attrib), value);
pthread_mutex_unlock(&m_lock);
return ret;
}
EGLBoolean eglDisplay::getConfigNativePixelFormat(EGLConfig config, PixelFormat * format)
{
EGLint redSize, blueSize, greenSize, alphaSize;
if ( !(getAttribValue(config, m_attribs.valueFor(EGL_RED_SIZE), &redSize) &&
getAttribValue(config, m_attribs.valueFor(EGL_BLUE_SIZE), &blueSize) &&
getAttribValue(config, m_attribs.valueFor(EGL_GREEN_SIZE), &greenSize) &&
getAttribValue(config, m_attribs.valueFor(EGL_ALPHA_SIZE), &alphaSize)) )
{
ALOGE("Couldn't find value for one of the pixel format attributes");
return EGL_FALSE;
}
//calculate the GL internal format
if ((redSize==8)&&(greenSize==8)&&(blueSize==8)&&(alphaSize==8)) *format = PIXEL_FORMAT_RGBA_8888; //XXX: BGR?
else if ((redSize==8)&&(greenSize==8)&&(blueSize==8)&&(alphaSize==0)) *format = PIXEL_FORMAT_RGBX_8888; //XXX or PIXEL_FORMAT_RGB_888
else if ((redSize==5)&&(greenSize==6)&&(blueSize==5)&&(alphaSize==0)) *format = PIXEL_FORMAT_RGB_565;
else if ((redSize==5)&&(greenSize==5)&&(blueSize==5)&&(alphaSize==1)) *format = PIXEL_FORMAT_RGBA_5551;
else if ((redSize==4)&&(greenSize==4)&&(blueSize==4)&&(alphaSize==4)) *format = PIXEL_FORMAT_RGBA_4444;
else {
return EGL_FALSE;
}
return EGL_TRUE;
}
EGLBoolean eglDisplay::getConfigGLPixelFormat(EGLConfig config, GLenum * format)
{
EGLint redSize, blueSize, greenSize, alphaSize;
if ( !(getAttribValue(config, m_attribs.valueFor(EGL_RED_SIZE), &redSize) &&
getAttribValue(config, m_attribs.valueFor(EGL_BLUE_SIZE), &blueSize) &&
getAttribValue(config, m_attribs.valueFor(EGL_GREEN_SIZE), &greenSize) &&
getAttribValue(config, m_attribs.valueFor(EGL_ALPHA_SIZE), &alphaSize)) )
{
ALOGE("Couldn't find value for one of the pixel format attributes");
return EGL_FALSE;
}
//calculate the GL internal format
if ((redSize == greenSize) && (redSize == blueSize) &&
((redSize == 8) || (redSize == 16) || (redSize == 32)))
{
if (alphaSize == 0) *format = GL_RGB;
else *format = GL_RGBA;
}
else if ((redSize==5)&&(greenSize==6)&&(blueSize==5)&&(alphaSize==0)) *format = GL_RGB565_OES;
else if ((redSize==5)&&(greenSize==5)&&(blueSize==5)&&(alphaSize==1)) *format = GL_RGB5_A1_OES;
else if ((redSize==4)&&(greenSize==4)&&(blueSize==4)&&(alphaSize==4)) *format = GL_RGBA4_OES;
else return EGL_FALSE;
return EGL_TRUE;
}

View file

@ -0,0 +1,89 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _SYSTEM_EGL_DISPLAY_H
#define _SYSTEM_EGL_DISPLAY_H
#include <pthread.h>
#include "glUtils.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "EGLClientIface.h"
#include <utils/KeyedVector.h>
#include <ui/PixelFormat.h>
#define ATTRIBUTE_NONE -1
//FIXME: are we in this namespace?
using namespace android;
class eglDisplay
{
public:
eglDisplay();
~eglDisplay();
bool initialize(EGLClient_eglInterface *eglIface);
void terminate();
int getVersionMajor() const { return m_major; }
int getVersionMinor() const { return m_minor; }
bool initialized() const { return m_initialized; }
const char *queryString(EGLint name);
const EGLClient_glesInterface *gles_iface() const { return m_gles_iface; }
const EGLClient_glesInterface *gles2_iface() const { return m_gles2_iface; }
int getNumConfigs(){ return m_numConfigs; }
EGLBoolean getConfigAttrib(EGLConfig config, EGLint attrib, EGLint * value);
EGLBoolean setConfigAttrib(EGLConfig config, EGLint attrib, EGLint value);
EGLBoolean getConfigGLPixelFormat(EGLConfig config, GLenum * format);
EGLBoolean getConfigNativePixelFormat(EGLConfig config, PixelFormat * format);
void dumpConfig(EGLConfig config);
private:
EGLClient_glesInterface *loadGLESClientAPI(const char *libName,
EGLClient_eglInterface *eglIface,
void **libHandle);
EGLBoolean getAttribValue(EGLConfig config, EGLint attribIdxi, EGLint * value);
EGLBoolean setAttribValue(EGLConfig config, EGLint attribIdxi, EGLint value);
void processConfigs();
private:
pthread_mutex_t m_lock;
bool m_initialized;
int m_major;
int m_minor;
int m_hostRendererVersion;
int m_numConfigs;
int m_numConfigAttribs;
/* This is the mapping between an attribute name to it's index in any given config */
DefaultKeyedVector<EGLint, EGLint> m_attribs;
/* This is an array of all config's attributes values stored in the following sequencial fasion (read: v[c,a] = the value of attribute <a> of config <c>)
* v[0,0],..,v[0,m_numConfigAttribs-1],
*...
* v[m_numConfigs-1,0],..,v[m_numConfigs-1,m_numConfigAttribs-1]
*/
EGLint *m_configs;
EGLClient_glesInterface *m_gles_iface;
EGLClient_glesInterface *m_gles2_iface;
char *m_versionString;
char *m_vendorString;
char *m_extensionString;
};
#endif

View file

@ -0,0 +1,64 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
static const struct _egl_funcs_by_name {
const char *name;
void *proc;
} egl_funcs_by_name[] = {
{"eglGetError", (void *)eglGetError},
{"eglGetDisplay", (void *)eglGetDisplay},
{"eglInitialize", (void *)eglInitialize},
{"eglTerminate", (void *)eglTerminate},
{"eglQueryString", (void *)eglQueryString},
{"eglGetConfigs", (void *)eglGetConfigs},
{"eglChooseConfig", (void *)eglChooseConfig},
{"eglGetConfigAttrib", (void *)eglGetConfigAttrib},
{"eglCreateWindowSurface", (void *)eglCreateWindowSurface},
{"eglCreatePbufferSurface", (void *)eglCreatePbufferSurface},
{"eglCreatePixmapSurface", (void *)eglCreatePixmapSurface},
{"eglDestroySurface", (void *)eglDestroySurface},
{"eglQuerySurface", (void *)eglQuerySurface},
{"eglBindAPI", (void *)eglBindAPI},
{"eglQueryAPI", (void *)eglQueryAPI},
{"eglWaitClient", (void *)eglWaitClient},
{"eglReleaseThread", (void *)eglReleaseThread},
{"eglCreatePbufferFromClientBuffer", (void *)eglCreatePbufferFromClientBuffer},
{"eglSurfaceAttrib", (void *)eglSurfaceAttrib},
{"eglBindTexImage", (void *)eglBindTexImage},
{"eglReleaseTexImage", (void *)eglReleaseTexImage},
{"eglSwapInterval", (void *)eglSwapInterval},
{"eglCreateContext", (void *)eglCreateContext},
{"eglDestroyContext", (void *)eglDestroyContext},
{"eglMakeCurrent", (void *)eglMakeCurrent},
{"eglGetCurrentContext", (void *)eglGetCurrentContext},
{"eglGetCurrentSurface", (void *)eglGetCurrentSurface},
{"eglGetCurrentDisplay", (void *)eglGetCurrentDisplay},
{"eglQueryContext", (void *)eglQueryContext},
{"eglWaitGL", (void *)eglWaitGL},
{"eglWaitNative", (void *)eglWaitNative},
{"eglSwapBuffers", (void *)eglSwapBuffers},
{"eglCopyBuffers", (void *)eglCopyBuffers},
{"eglGetProcAddress", (void *)eglGetProcAddress},
{"eglLockSurfaceKHR", (void *)eglLockSurfaceKHR},
{"eglUnlockSurfaceKHR", (void *)eglUnlockSurfaceKHR},
{"eglCreateImageKHR", (void *)eglCreateImageKHR},
{"eglDestroyImageKHR", (void *)eglDestroyImageKHR},
{"eglCreateSyncKHR", (void *)eglCreateSyncKHR},
{"eglDestroySyncKHR", (void *)eglDestroySyncKHR},
{"eglClientWaitSyncKHR", (void *)eglClientWaitSyncKHR},
{"eglGetSyncAttribKHR", (void *)eglGetSyncAttribKHR}
};
static const int egl_num_funcs = sizeof(egl_funcs_by_name) / sizeof(struct _egl_funcs_by_name);

View file

@ -0,0 +1,20 @@
ifneq (false,$(BUILD_EMULATOR_OPENGL_DRIVER))
LOCAL_PATH := $(call my-dir)
$(call emugl-begin-shared-library,gralloc.goldfish)
$(call emugl-import,libGLESv1_enc lib_renderControl_enc libOpenglSystemCommon)
$(call emugl-set-shared-library-subpath,hw)
LOCAL_CFLAGS += -DLOG_TAG=\"gralloc_goldfish\"
LOCAL_CFLAGS += -Wno-missing-field-initializers
LOCAL_SRC_FILES := gralloc.cpp
# Need to access the special OPENGL TLS Slot
LOCAL_C_INCLUDES += bionic/libc/private
LOCAL_SHARED_LIBRARIES += libdl
$(call emugl-end-module)
endif # BUILD_EMULATOR_OPENGL_DRIVER != false

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
LOCAL_PATH := $(call my-dir)
$(call emugl-begin-shared-library,lib_renderControl_enc)
LOCAL_SRC_FILES := \
renderControl_client_context.cpp \
renderControl_enc.cpp \
renderControl_entry.cpp
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
$(call emugl-import,libOpenglCodecCommon)
$(call emugl-end-module)

View file

@ -0,0 +1,142 @@
The renderControl.in file in this directory defines an API which is decoded
on the android guest into a stream and get decoded and executed on the host.
It is used in order to query the host renderer as well as send the host renderer
control commands.
The following describes each of the entries defined by this renderControl API.
GLint rcGetRendererVersion();
This function queries the host renderer version number.
EGLint rcGetEGLVersion(EGLint* major, EGLint* minor);
This function queries the host renderer for the EGL version
it supports. returns EGL_FALSE on failure.
EGLint rcQueryEGLString(EGLenum name, void* buffer, EGLint bufferSize);
This function queries the host for EGL string (.i.e EGL_EXTENSIONS).
if buffer is NULL or the bufferSize is not big enough the return value
is the negative number of bytes required to store the string value
otherwise the string value is copied to buffer and its size is
returned.
EGLint rcGetNumConfigs(uint32_t* numAttribs);
queries the host for the number of supported EGL configs.
The function returns the number of supported configs and returns in
numAttribs the number of attributes available for each config.
EGLint rcGetConfigs(uint32_t bufSize, GLuint* buffer);
This function queries the host for the all set of supported configs
with their attribute values.
bufSize is the size of buffer, the size should be at least equal to
(numConfigs + 1) * numAttribs * sizeof(GLuint)
where numConfigs and numAttribs are the values returned in
rcGetNumConfigs. if bufSize is not big enough then the negative number
of required bytes is returned otherwise the function returns the number
of configs and buffer is filled as follows: The first 'numAttribs'
integer values are filled with the EGL enumerant describing a config
attribute, next for each config there are 'numAttribs' integer values
holding the attribute values for that config, the values are specified
in the same order as the attribute vector.
EGLint rcChooseConfig(EGLint *attribs, uint32_t attribs_size, uint32_t *configs, uint32_t configs_size)
This function triggers an eglChooseConfig on the host, to get a list of
configs matching the given attribs values.
attribs - a list of attribute names followed by the desired values, terminated by EGL_NONE
attribs_size - the size of the list
configs - the returned matching configuration names (same names as familiar to the client in rcGetConfigs)
configs_size - the size of the configs buffers
returns - the actual number of matching configurations (<= configs_size)
EGLint rcGetFBParam(EGLint param);
queries the host for framebuffer parameter, see renderControl_types.h
for possible values of 'param'.
uint32_t rcCreateContext(uint32_t config, uint32_t share, uint32_t glVersion);
This function creates a rendering context on the host and returns its
handle. config is the config index for the context, share is either zero
or a handle to a sharing context. glVersion is either 1 or 2 for GLES1
or GLES2 context respectively.
void rcDestroyContext(uint32_t context);
This function destroys a rendering context on the host.
context is a handle returned in rcCreateContext.
uint32_t rcCreateWindowSurface(uint32_t config, uint32_t width, uint32_t height);
This function creates a 'window' surface on the host which can be then
bind for rendering through rcMakeCurrent.
The function returns a handle to the created window surface.
void rcDestroyWindowSurface(uint32_t windowSurface);
This function destoys a window surface.
uint32_t rcCreateColorBuffer(uint32_t width, uint32_t height, GLenum internalFormat);
This function creates a colorBuffer object on the host which can be then
be specified as a render target for a window surface through
rcSetWindowColorBuffer or to be displayed on the framebuffer window
through rcFBPost.
The function returns a handle to the colorBuffer object, with an initial
reference count of 1.
void rcOpenColorBuffer(uint32_t colorbuffer);
Adds an additional reference to the colorbuffer, typically from a
different Android process than the one which created it.
void rcCloseColorBuffer(uint32_t colorbuffer);
Removes a reference to the colorbuffer. When the reference count drops
to zero the colorbuffer is automatically destroyed.
void rcFlushWindowColorBuffer(uint32_t windowSurface, uint32_t colorBuffer);
This flushes the current window color buffer
void rcSetWindowColorBuffer(uint32_t windowSurface, uint32_t colorBuffer);
This set the target color buffer for a windowSurface, when set the
previous target colorBuffer gets updated before switching to the new
colorBuffer.
EGLint rcMakeCurrent(uint32_t context, uint32_t drawSurf, uint32_t readSurf);
Binds a windowSurface(s) and current rendering context for the
calling thread.
void rcFBPost(uint32_t colorBuffer);
This function causes the content of the colorBuffer object to be
displayed on the host framebuffer window. The function returns
immediatly, the buffer will be displayed at the next swap interval.
void rcFBSetSwapInterval(EGLint interval);
Sets the swap interval for the host framebuffer window.
void rcBindTexture(uint32_t colorBuffer);
This function instruct the host to bind the content of the specified
colorBuffer to the current binded texture object of the calling thread.
This function should be used to implement eglBindTexImage.
EGLint rcColorBufferCacheFlush(uint32_t colorbuffer, EGLint postCount, int forRead);
This function returns only after all rendering requests for the specified
colorBuffer rendering target has been processed and after all 'postCount'
posts for the buffer requested previously through rcFBPost has been
processed.
if 'forRead' is not-zero, the function returns positive value in case
there was rendering done to the buffer since the last CacheFlush request
with non-zero 'forRead' value, otherwise the function returns zero or
negative value on failure.
void rcReadColorBuffer(uint32_t colorbuffer, GLint x, GLint y,
GLint width, GLint height, GLenum format,
GLenum type, void* pixels);
This function queries the host for the pixel content of a colorBuffer's
subregion. It act the same as OpenGL glReadPixels however pixels
are always packed with alignment of 1.
void rcUpdateColorBuffer(uint32_t colorbuffer, GLint x, GLint y,
GLint width, GLint height, GLenum format,
GLenum type, void* pixels);
Updates the content of a subregion of a colorBuffer object.
pixels are always unpacked with alignment of 1.
uint32_t rcCreateClientImage(uint32_t context, EGLenum target, GLuint buffer)
Create an EGLImage from a client object.
int rcDestroyClientImage(uint32_t image)
Destroy an EGLImage object.

View file

@ -0,0 +1,45 @@
GLOBAL
base_opcode 10000
encoder_headers <stdint.h> <EGL/egl.h> "glUtils.h"
rcGetEGLVersion
dir major out
len major sizeof(EGLint)
dir minor out
len minor sizeof(EGLint)
rcQueryEGLString
dir buffer out
len buffer bufferSize
rcGetGLString
dir buffer out
len buffer bufferSize
rcGetNumConfigs
dir numAttribs out
len numAttribs sizeof(uint32_t)
rcGetConfigs
dir buffer out
len buffer bufSize
rcChooseConfig
dir attribs in
len attribs attribs_size
dir configs out
var_flag configs nullAllowed
len configs configs_size*sizeof(uint32_t)
rcReadColorBuffer
dir pixels out
len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height)
rcUpdateColorBuffer
dir pixels in
len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height)
var_flag pixels isLarge
rcCloseColorBuffer
flag flushOnEncode

View file

@ -0,0 +1,35 @@
GL_ENRTY(GLint, rcGetRendererVersion)
GL_ENTRY(EGLint, rcGetEGLVersion, EGLint *major, EGLint *minor)
GL_ENTRY(EGLint, rcQueryEGLString, EGLenum name, void *buffer, EGLint bufferSize)
GL_ENTRY(EGLint, rcGetGLString, EGLenum name, void *buffer, EGLint bufferSize)
GL_ENTRY(EGLint, rcGetNumConfigs, uint32_t *numAttribs)
GL_ENTRY(EGLint, rcGetConfigs, uint32_t bufSize, GLuint *buffer)
GL_ENTRY(EGLint, rcChooseConfig, EGLint *attribs, uint32_t attribs_size, uint32_t *configs, uint32_t configs_size)
GL_ENTRY(EGLint, rcGetFBParam, EGLint param)
GL_ENTRY(uint32_t, rcCreateContext, uint32_t config, uint32_t share, uint32_t glVersion)
GL_ENTRY(void, rcDestroyContext, uint32_t context)
GL_ENTRY(uint32_t, rcCreateWindowSurface, uint32_t config, uint32_t width, uint32_t height)
GL_ENTRY(void, rcDestroyWindowSurface, uint32_t windowSurface)
GL_ENTRY(uint32_t, rcCreateColorBuffer, uint32_t width, uint32_t height, GLenum internalFormat)
GL_ENTRY(void, rcOpenColorBuffer, uint32_t colorbuffer)
GL_ENTRY(void, rcCloseColorBuffer, uint32_t colorbuffer)
GL_ENTRY(void, rcSetWindowColorBuffer, uint32_t windowSurface, uint32_t colorBuffer)
GL_ENTRY(int, rcFlushWindowColorBuffer, uint32_t windowSurface)
GL_ENTRY(EGLint, rcMakeCurrent, uint32_t context, uint32_t drawSurf, uint32_t readSurf)
GL_ENTRY(void, rcFBPost, uint32_t colorBuffer)
GL_ENTRY(void, rcFBSetSwapInterval, EGLint interval)
GL_ENTRY(void, rcBindTexture, uint32_t colorBuffer)
GL_ENTRY(void, rcBindRenderbuffer, uint32_t colorBuffer)
GL_ENTRY(EGLint, rcColorBufferCacheFlush, uint32_t colorbuffer, EGLint postCount,int forRead)
GL_ENTRY(void, rcReadColorBuffer, uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void *pixels)
GL_ENTRY(int, rcUpdateColorBuffer, uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void *pixels)
GL_ENTRY(int, rcOpenColorBuffer2, uint32_t colorbuffer)
GL_ENTRY(uint32_t, rcCreateClientImage, uint32_t context, EGLenum target, GLuint buffer)
GL_ENTRY(int, rcDestroyClientImage, uint32_t image)
GL_ENTRY(void, rcSelectChecksumHelper, uint32_t newProtocol, uint32_t reserved)
GL_ENTRY(int, rcGetNumDisplays)
GL_ENTRY(int, rcGetDisplayWidth, uint32_t displayId)
GL_ENTRY(int, rcGetDisplayHeight, uint32_t displayId)
GL_ENTRY(int, rcGetDisplayDpiX, uint32_t displayId)
GL_ENTRY(int, rcGetDisplayDpiY, uint32_t displayId)
GL_ENTRY(int, rcGetDisplayVsyncPeriod, uint32_t displayId)

View file

@ -0,0 +1,11 @@
uint32_t 32 0x%08x false
EGLint 32 0x%08x false
GLint 32 0x%08x false
GLuint 32 0x%08x false
GLenum 32 0x%08x false
EGLenum 32 0x%08x false
uint32_t* 32 0x%08x true
EGLint* 32 0x%08x true
GLint* 32 0x%08x true
GLuint* 32 0x%08x true
void* 32 0x%08x true

View file

@ -0,0 +1,41 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __renderControl_client_base_t_h
#define __renderControl_client_base_t_h
#include "renderControl_client_proc.h"
struct renderControl_client_base_t {
rcGetRendererVersion_client_proc_t rcGetRendererVersion;
rcGetEGLVersion_client_proc_t rcGetEGLVersion;
rcQueryEGLString_client_proc_t rcQueryEGLString;
rcGetGLString_client_proc_t rcGetGLString;
rcGetNumConfigs_client_proc_t rcGetNumConfigs;
rcGetConfigs_client_proc_t rcGetConfigs;
rcChooseConfig_client_proc_t rcChooseConfig;
rcGetFBParam_client_proc_t rcGetFBParam;
rcCreateContext_client_proc_t rcCreateContext;
rcDestroyContext_client_proc_t rcDestroyContext;
rcCreateWindowSurface_client_proc_t rcCreateWindowSurface;
rcDestroyWindowSurface_client_proc_t rcDestroyWindowSurface;
rcCreateColorBuffer_client_proc_t rcCreateColorBuffer;
rcOpenColorBuffer_client_proc_t rcOpenColorBuffer;
rcCloseColorBuffer_client_proc_t rcCloseColorBuffer;
rcSetWindowColorBuffer_client_proc_t rcSetWindowColorBuffer;
rcFlushWindowColorBuffer_client_proc_t rcFlushWindowColorBuffer;
rcMakeCurrent_client_proc_t rcMakeCurrent;
rcFBPost_client_proc_t rcFBPost;
rcFBSetSwapInterval_client_proc_t rcFBSetSwapInterval;
rcBindTexture_client_proc_t rcBindTexture;
rcBindRenderbuffer_client_proc_t rcBindRenderbuffer;
rcColorBufferCacheFlush_client_proc_t rcColorBufferCacheFlush;
rcReadColorBuffer_client_proc_t rcReadColorBuffer;
rcUpdateColorBuffer_client_proc_t rcUpdateColorBuffer;
rcOpenColorBuffer2_client_proc_t rcOpenColorBuffer2;
rcCreateClientImage_client_proc_t rcCreateClientImage;
rcDestroyClientImage_client_proc_t rcDestroyClientImage;
};
#endif

View file

@ -0,0 +1,52 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#include <string.h>
#include "renderControl_client_context.h"
#include <stdio.h>
int renderControl_client_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData)
{
rcGetRendererVersion = (rcGetRendererVersion_client_proc_t) getProc("rcGetRendererVersion", userData);
rcGetEGLVersion = (rcGetEGLVersion_client_proc_t) getProc("rcGetEGLVersion", userData);
rcQueryEGLString = (rcQueryEGLString_client_proc_t) getProc("rcQueryEGLString", userData);
rcGetGLString = (rcGetGLString_client_proc_t) getProc("rcGetGLString", userData);
rcGetNumConfigs = (rcGetNumConfigs_client_proc_t) getProc("rcGetNumConfigs", userData);
rcGetConfigs = (rcGetConfigs_client_proc_t) getProc("rcGetConfigs", userData);
rcChooseConfig = (rcChooseConfig_client_proc_t) getProc("rcChooseConfig", userData);
rcGetFBParam = (rcGetFBParam_client_proc_t) getProc("rcGetFBParam", userData);
rcCreateContext = (rcCreateContext_client_proc_t) getProc("rcCreateContext", userData);
rcDestroyContext = (rcDestroyContext_client_proc_t) getProc("rcDestroyContext", userData);
rcCreateWindowSurface = (rcCreateWindowSurface_client_proc_t) getProc("rcCreateWindowSurface", userData);
rcDestroyWindowSurface = (rcDestroyWindowSurface_client_proc_t) getProc("rcDestroyWindowSurface", userData);
rcCreateColorBuffer = (rcCreateColorBuffer_client_proc_t) getProc("rcCreateColorBuffer", userData);
rcOpenColorBuffer = (rcOpenColorBuffer_client_proc_t) getProc("rcOpenColorBuffer", userData);
rcCloseColorBuffer = (rcCloseColorBuffer_client_proc_t) getProc("rcCloseColorBuffer", userData);
rcSetWindowColorBuffer = (rcSetWindowColorBuffer_client_proc_t) getProc("rcSetWindowColorBuffer", userData);
rcFlushWindowColorBuffer = (rcFlushWindowColorBuffer_client_proc_t) getProc("rcFlushWindowColorBuffer", userData);
rcMakeCurrent = (rcMakeCurrent_client_proc_t) getProc("rcMakeCurrent", userData);
rcFBPost = (rcFBPost_client_proc_t) getProc("rcFBPost", userData);
rcFBSetSwapInterval = (rcFBSetSwapInterval_client_proc_t) getProc("rcFBSetSwapInterval", userData);
rcBindTexture = (rcBindTexture_client_proc_t) getProc("rcBindTexture", userData);
rcBindRenderbuffer = (rcBindRenderbuffer_client_proc_t) getProc("rcBindRenderbuffer", userData);
rcColorBufferCacheFlush = (rcColorBufferCacheFlush_client_proc_t) getProc("rcColorBufferCacheFlush", userData);
rcReadColorBuffer = (rcReadColorBuffer_client_proc_t) getProc("rcReadColorBuffer", userData);
rcUpdateColorBuffer = (rcUpdateColorBuffer_client_proc_t) getProc("rcUpdateColorBuffer", userData);
rcOpenColorBuffer2 = (rcOpenColorBuffer2_client_proc_t) getProc("rcOpenColorBuffer2", userData);
rcCreateClientImage = (rcCreateClientImage_client_proc_t) getProc("rcCreateClientImage", userData);
rcDestroyClientImage = (rcDestroyClientImage_client_proc_t) getProc("rcDestroyClientImage", userData);
rcSelectChecksumCalculator = (rcSelectChecksumCalculator_client_proc_t) getProc("rcSelectChecksumCalculator", userData);
rcGetNumDisplays = (rcGetNumDisplays_client_proc_t) getProc("rcGetNumDisplays", userData);
rcGetDisplayWidth = (rcGetDisplayWidth_client_proc_t) getProc("rcGetDisplayWidth", userData);
rcGetDisplayHeight = (rcGetDisplayHeight_client_proc_t) getProc("rcGetDisplayHeight", userData);
rcGetDisplayDpiX = (rcGetDisplayDpiX_client_proc_t) getProc("rcGetDisplayDpiX", userData);
rcGetDisplayDpiY = (rcGetDisplayDpiY_client_proc_t) getProc("rcGetDisplayDpiY", userData);
rcGetDisplayVsyncPeriod = (rcGetDisplayVsyncPeriod_client_proc_t) getProc("rcGetDisplayVsyncPeriod", userData);
rcPostLayer = (rcPostLayer_client_proc_t) getProc("rcPostLayer", userData);
rcPostAllLayersDone = (rcPostAllLayersDone_client_proc_t) getProc("rcPostAllLayersDone", userData);
return 0;
}

View file

@ -0,0 +1,59 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __renderControl_client_context_t_h
#define __renderControl_client_context_t_h
#include "renderControl_client_proc.h"
#include "renderControl_types.h"
struct renderControl_client_context_t {
rcGetRendererVersion_client_proc_t rcGetRendererVersion;
rcGetEGLVersion_client_proc_t rcGetEGLVersion;
rcQueryEGLString_client_proc_t rcQueryEGLString;
rcGetGLString_client_proc_t rcGetGLString;
rcGetNumConfigs_client_proc_t rcGetNumConfigs;
rcGetConfigs_client_proc_t rcGetConfigs;
rcChooseConfig_client_proc_t rcChooseConfig;
rcGetFBParam_client_proc_t rcGetFBParam;
rcCreateContext_client_proc_t rcCreateContext;
rcDestroyContext_client_proc_t rcDestroyContext;
rcCreateWindowSurface_client_proc_t rcCreateWindowSurface;
rcDestroyWindowSurface_client_proc_t rcDestroyWindowSurface;
rcCreateColorBuffer_client_proc_t rcCreateColorBuffer;
rcOpenColorBuffer_client_proc_t rcOpenColorBuffer;
rcCloseColorBuffer_client_proc_t rcCloseColorBuffer;
rcSetWindowColorBuffer_client_proc_t rcSetWindowColorBuffer;
rcFlushWindowColorBuffer_client_proc_t rcFlushWindowColorBuffer;
rcMakeCurrent_client_proc_t rcMakeCurrent;
rcFBPost_client_proc_t rcFBPost;
rcFBSetSwapInterval_client_proc_t rcFBSetSwapInterval;
rcBindTexture_client_proc_t rcBindTexture;
rcBindRenderbuffer_client_proc_t rcBindRenderbuffer;
rcColorBufferCacheFlush_client_proc_t rcColorBufferCacheFlush;
rcReadColorBuffer_client_proc_t rcReadColorBuffer;
rcUpdateColorBuffer_client_proc_t rcUpdateColorBuffer;
rcOpenColorBuffer2_client_proc_t rcOpenColorBuffer2;
rcCreateClientImage_client_proc_t rcCreateClientImage;
rcDestroyClientImage_client_proc_t rcDestroyClientImage;
rcSelectChecksumCalculator_client_proc_t rcSelectChecksumCalculator;
rcGetNumDisplays_client_proc_t rcGetNumDisplays;
rcGetDisplayWidth_client_proc_t rcGetDisplayWidth;
rcGetDisplayHeight_client_proc_t rcGetDisplayHeight;
rcGetDisplayDpiX_client_proc_t rcGetDisplayDpiX;
rcGetDisplayDpiY_client_proc_t rcGetDisplayDpiY;
rcGetDisplayVsyncPeriod_client_proc_t rcGetDisplayVsyncPeriod;
rcPostLayer_client_proc_t rcPostLayer;
rcPostAllLayersDone_client_proc_t rcPostAllLayersDone;
virtual ~renderControl_client_context_t() {}
typedef renderControl_client_context_t *CONTEXT_ACCESSOR_TYPE(void);
static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f);
int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData);
virtual void setError(unsigned int error){ (void)error; };
virtual unsigned int getError(){ return 0; };
};
#endif

View file

@ -0,0 +1,52 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __renderControl_client_proc_t_h
#define __renderControl_client_proc_t_h
#include "renderControl_types.h"
#ifndef renderControl_APIENTRY
#define renderControl_APIENTRY
#endif
typedef GLint (renderControl_APIENTRY *rcGetRendererVersion_client_proc_t) (void * ctx);
typedef EGLint (renderControl_APIENTRY *rcGetEGLVersion_client_proc_t) (void * ctx, EGLint*, EGLint*);
typedef EGLint (renderControl_APIENTRY *rcQueryEGLString_client_proc_t) (void * ctx, EGLenum, void*, EGLint);
typedef EGLint (renderControl_APIENTRY *rcGetGLString_client_proc_t) (void * ctx, EGLenum, void*, EGLint);
typedef EGLint (renderControl_APIENTRY *rcGetNumConfigs_client_proc_t) (void * ctx, uint32_t*);
typedef EGLint (renderControl_APIENTRY *rcGetConfigs_client_proc_t) (void * ctx, uint32_t, GLuint*);
typedef EGLint (renderControl_APIENTRY *rcChooseConfig_client_proc_t) (void * ctx, EGLint*, uint32_t, uint32_t*, uint32_t);
typedef EGLint (renderControl_APIENTRY *rcGetFBParam_client_proc_t) (void * ctx, EGLint);
typedef uint32_t (renderControl_APIENTRY *rcCreateContext_client_proc_t) (void * ctx, uint32_t, uint32_t, uint32_t);
typedef void (renderControl_APIENTRY *rcDestroyContext_client_proc_t) (void * ctx, uint32_t);
typedef uint32_t (renderControl_APIENTRY *rcCreateWindowSurface_client_proc_t) (void * ctx, uint32_t, uint32_t, uint32_t);
typedef void (renderControl_APIENTRY *rcDestroyWindowSurface_client_proc_t) (void * ctx, uint32_t);
typedef uint32_t (renderControl_APIENTRY *rcCreateColorBuffer_client_proc_t) (void * ctx, uint32_t, uint32_t, GLenum);
typedef void (renderControl_APIENTRY *rcOpenColorBuffer_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcCloseColorBuffer_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcSetWindowColorBuffer_client_proc_t) (void * ctx, uint32_t, uint32_t);
typedef int (renderControl_APIENTRY *rcFlushWindowColorBuffer_client_proc_t) (void * ctx, uint32_t);
typedef EGLint (renderControl_APIENTRY *rcMakeCurrent_client_proc_t) (void * ctx, uint32_t, uint32_t, uint32_t);
typedef void (renderControl_APIENTRY *rcFBPost_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcFBSetSwapInterval_client_proc_t) (void * ctx, EGLint);
typedef void (renderControl_APIENTRY *rcBindTexture_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcBindRenderbuffer_client_proc_t) (void * ctx, uint32_t);
typedef EGLint (renderControl_APIENTRY *rcColorBufferCacheFlush_client_proc_t) (void * ctx, uint32_t, EGLint, int);
typedef void (renderControl_APIENTRY *rcReadColorBuffer_client_proc_t) (void * ctx, uint32_t, GLint, GLint, GLint, GLint, GLenum, GLenum, void*);
typedef int (renderControl_APIENTRY *rcUpdateColorBuffer_client_proc_t) (void * ctx, uint32_t, GLint, GLint, GLint, GLint, GLenum, GLenum, void*);
typedef int (renderControl_APIENTRY *rcOpenColorBuffer2_client_proc_t) (void * ctx, uint32_t);
typedef uint32_t (renderControl_APIENTRY *rcCreateClientImage_client_proc_t) (void * ctx, uint32_t, EGLenum, GLuint);
typedef int (renderControl_APIENTRY *rcDestroyClientImage_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcSelectChecksumCalculator_client_proc_t) (void * ctx, uint32_t, uint32_t);
typedef int (renderControl_APIENTRY *rcGetNumDisplays_client_proc_t) (void * ctx);
typedef int (renderControl_APIENTRY *rcGetDisplayWidth_client_proc_t) (void * ctx, uint32_t);
typedef int (renderControl_APIENTRY *rcGetDisplayHeight_client_proc_t) (void * ctx, uint32_t);
typedef int (renderControl_APIENTRY *rcGetDisplayDpiX_client_proc_t) (void * ctx, uint32_t);
typedef int (renderControl_APIENTRY *rcGetDisplayDpiY_client_proc_t) (void * ctx, uint32_t);
typedef int (renderControl_APIENTRY *rcGetDisplayVsyncPeriod_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcPostLayer_client_proc_t) (void * ctx, const char*, uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
typedef void (renderControl_APIENTRY *rcPostAllLayersDone_client_proc_t) (void * ctx);
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef GUARD_renderControl_encoder_context_t
#define GUARD_renderControl_encoder_context_t
#include "IOStream.h"
#include "ChecksumCalculator.h"
#include "renderControl_client_context.h"
#include <stdint.h>
#include <EGL/egl.h>
#include "glUtils.h"
struct renderControl_encoder_context_t : public renderControl_client_context_t {
IOStream *m_stream;
ChecksumCalculator *m_checksumCalculator;
renderControl_encoder_context_t(IOStream *stream, ChecksumCalculator *checksumCalculator);
};
#endif // GUARD_renderControl_encoder_context_t

View file

@ -0,0 +1,276 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#include <stdio.h>
#include <stdlib.h>
#include "renderControl_client_context.h"
#ifndef GL_TRUE
extern "C" {
GLint rcGetRendererVersion();
EGLint rcGetEGLVersion(EGLint* major, EGLint* minor);
EGLint rcQueryEGLString(EGLenum name, void* buffer, EGLint bufferSize);
EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize);
EGLint rcGetNumConfigs(uint32_t* numAttribs);
EGLint rcGetConfigs(uint32_t bufSize, GLuint* buffer);
EGLint rcChooseConfig(EGLint* attribs, uint32_t attribs_size, uint32_t* configs, uint32_t configs_size);
EGLint rcGetFBParam(EGLint param);
uint32_t rcCreateContext(uint32_t config, uint32_t share, uint32_t glVersion);
void rcDestroyContext(uint32_t context);
uint32_t rcCreateWindowSurface(uint32_t config, uint32_t width, uint32_t height);
void rcDestroyWindowSurface(uint32_t windowSurface);
uint32_t rcCreateColorBuffer(uint32_t width, uint32_t height, GLenum internalFormat);
void rcOpenColorBuffer(uint32_t colorbuffer);
void rcCloseColorBuffer(uint32_t colorbuffer);
void rcSetWindowColorBuffer(uint32_t windowSurface, uint32_t colorBuffer);
int rcFlushWindowColorBuffer(uint32_t windowSurface);
EGLint rcMakeCurrent(uint32_t context, uint32_t drawSurf, uint32_t readSurf);
void rcFBPost(uint32_t colorBuffer);
void rcFBSetSwapInterval(EGLint interval);
void rcBindTexture(uint32_t colorBuffer);
void rcBindRenderbuffer(uint32_t colorBuffer);
EGLint rcColorBufferCacheFlush(uint32_t colorbuffer, EGLint postCount, int forRead);
void rcReadColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels);
int rcUpdateColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels);
int rcOpenColorBuffer2(uint32_t colorbuffer);
uint32_t rcCreateClientImage(uint32_t context, EGLenum target, GLuint buffer);
int rcDestroyClientImage(uint32_t image);
void rcSelectChecksumCalculator(uint32_t newProtocol, uint32_t reserved);
int rcGetNumDisplays();
int rcGetDisplayWidth(uint32_t displayId);
int rcGetDisplayHeight(uint32_t displayId);
int rcGetDisplayDpiX(uint32_t displayId);
int rcGetDisplayDpiY(uint32_t displayId);
int rcGetDisplayVsyncPeriod(uint32_t displayId);
void rcPostLayer(const char* name, uint32_t colorBuffer, int32_t sourceCropLeft, int32_t sourceCropTop, int32_t sourceCropRight, int32_t sourceCropBottom, int32_t displayFrameLeft, int32_t displayFrameTop, int32_t displayFrameRight, int32_t displayFrameBottom);
void rcPostAllLayersDone();
};
#endif
#ifndef GET_CONTEXT
static renderControl_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
void renderControl_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }
#define GET_CONTEXT renderControl_client_context_t * ctx = getCurrentContext()
#endif
GLint rcGetRendererVersion()
{
GET_CONTEXT;
return ctx->rcGetRendererVersion(ctx);
}
EGLint rcGetEGLVersion(EGLint* major, EGLint* minor)
{
GET_CONTEXT;
return ctx->rcGetEGLVersion(ctx, major, minor);
}
EGLint rcQueryEGLString(EGLenum name, void* buffer, EGLint bufferSize)
{
GET_CONTEXT;
return ctx->rcQueryEGLString(ctx, name, buffer, bufferSize);
}
EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize)
{
GET_CONTEXT;
return ctx->rcGetGLString(ctx, name, buffer, bufferSize);
}
EGLint rcGetNumConfigs(uint32_t* numAttribs)
{
GET_CONTEXT;
return ctx->rcGetNumConfigs(ctx, numAttribs);
}
EGLint rcGetConfigs(uint32_t bufSize, GLuint* buffer)
{
GET_CONTEXT;
return ctx->rcGetConfigs(ctx, bufSize, buffer);
}
EGLint rcChooseConfig(EGLint* attribs, uint32_t attribs_size, uint32_t* configs, uint32_t configs_size)
{
GET_CONTEXT;
return ctx->rcChooseConfig(ctx, attribs, attribs_size, configs, configs_size);
}
EGLint rcGetFBParam(EGLint param)
{
GET_CONTEXT;
return ctx->rcGetFBParam(ctx, param);
}
uint32_t rcCreateContext(uint32_t config, uint32_t share, uint32_t glVersion)
{
GET_CONTEXT;
return ctx->rcCreateContext(ctx, config, share, glVersion);
}
void rcDestroyContext(uint32_t context)
{
GET_CONTEXT;
ctx->rcDestroyContext(ctx, context);
}
uint32_t rcCreateWindowSurface(uint32_t config, uint32_t width, uint32_t height)
{
GET_CONTEXT;
return ctx->rcCreateWindowSurface(ctx, config, width, height);
}
void rcDestroyWindowSurface(uint32_t windowSurface)
{
GET_CONTEXT;
ctx->rcDestroyWindowSurface(ctx, windowSurface);
}
uint32_t rcCreateColorBuffer(uint32_t width, uint32_t height, GLenum internalFormat)
{
GET_CONTEXT;
return ctx->rcCreateColorBuffer(ctx, width, height, internalFormat);
}
void rcOpenColorBuffer(uint32_t colorbuffer)
{
GET_CONTEXT;
ctx->rcOpenColorBuffer(ctx, colorbuffer);
}
void rcCloseColorBuffer(uint32_t colorbuffer)
{
GET_CONTEXT;
ctx->rcCloseColorBuffer(ctx, colorbuffer);
}
void rcSetWindowColorBuffer(uint32_t windowSurface, uint32_t colorBuffer)
{
GET_CONTEXT;
ctx->rcSetWindowColorBuffer(ctx, windowSurface, colorBuffer);
}
int rcFlushWindowColorBuffer(uint32_t windowSurface)
{
GET_CONTEXT;
return ctx->rcFlushWindowColorBuffer(ctx, windowSurface);
}
EGLint rcMakeCurrent(uint32_t context, uint32_t drawSurf, uint32_t readSurf)
{
GET_CONTEXT;
return ctx->rcMakeCurrent(ctx, context, drawSurf, readSurf);
}
void rcFBPost(uint32_t colorBuffer)
{
GET_CONTEXT;
ctx->rcFBPost(ctx, colorBuffer);
}
void rcFBSetSwapInterval(EGLint interval)
{
GET_CONTEXT;
ctx->rcFBSetSwapInterval(ctx, interval);
}
void rcBindTexture(uint32_t colorBuffer)
{
GET_CONTEXT;
ctx->rcBindTexture(ctx, colorBuffer);
}
void rcBindRenderbuffer(uint32_t colorBuffer)
{
GET_CONTEXT;
ctx->rcBindRenderbuffer(ctx, colorBuffer);
}
EGLint rcColorBufferCacheFlush(uint32_t colorbuffer, EGLint postCount, int forRead)
{
GET_CONTEXT;
return ctx->rcColorBufferCacheFlush(ctx, colorbuffer, postCount, forRead);
}
void rcReadColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels)
{
GET_CONTEXT;
ctx->rcReadColorBuffer(ctx, colorbuffer, x, y, width, height, format, type, pixels);
}
int rcUpdateColorBuffer(uint32_t colorbuffer, GLint x, GLint y, GLint width, GLint height, GLenum format, GLenum type, void* pixels)
{
GET_CONTEXT;
return ctx->rcUpdateColorBuffer(ctx, colorbuffer, x, y, width, height, format, type, pixels);
}
int rcOpenColorBuffer2(uint32_t colorbuffer)
{
GET_CONTEXT;
return ctx->rcOpenColorBuffer2(ctx, colorbuffer);
}
uint32_t rcCreateClientImage(uint32_t context, EGLenum target, GLuint buffer)
{
GET_CONTEXT;
return ctx->rcCreateClientImage(ctx, context, target, buffer);
}
int rcDestroyClientImage(uint32_t image)
{
GET_CONTEXT;
return ctx->rcDestroyClientImage(ctx, image);
}
void rcSelectChecksumCalculator(uint32_t newProtocol, uint32_t reserved)
{
GET_CONTEXT;
ctx->rcSelectChecksumCalculator(ctx, newProtocol, reserved);
}
int rcGetNumDisplays()
{
GET_CONTEXT;
return ctx->rcGetNumDisplays(ctx);
}
int rcGetDisplayWidth(uint32_t displayId)
{
GET_CONTEXT;
return ctx->rcGetDisplayWidth(ctx, displayId);
}
int rcGetDisplayHeight(uint32_t displayId)
{
GET_CONTEXT;
return ctx->rcGetDisplayHeight(ctx, displayId);
}
int rcGetDisplayDpiX(uint32_t displayId)
{
GET_CONTEXT;
return ctx->rcGetDisplayDpiX(ctx, displayId);
}
int rcGetDisplayDpiY(uint32_t displayId)
{
GET_CONTEXT;
return ctx->rcGetDisplayDpiY(ctx, displayId);
}
int rcGetDisplayVsyncPeriod(uint32_t displayId)
{
GET_CONTEXT;
return ctx->rcGetDisplayVsyncPeriod(ctx, displayId);
}
void rcPostLayer(const char* name, uint32_t colorBuffer, int32_t sourceCropLeft, int32_t sourceCropTop, int32_t sourceCropRight, int32_t sourceCropBottom, int32_t displayFrameLeft, int32_t displayFrameTop, int32_t displayFrameRight, int32_t displayFrameBottom)
{
GET_CONTEXT;
ctx->rcPostLayer(ctx, name, colorBuffer, sourceCropLeft, sourceCropTop, sourceCropRight, sourceCropBottom, displayFrameLeft, displayFrameTop, displayFrameRight, displayFrameBottom);
}
void rcPostAllLayersDone()
{
GET_CONTEXT;
ctx->rcPostAllLayersDone(ctx);
}

View file

@ -0,0 +1,52 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __renderControl_client_ftable_t_h
#define __renderControl_client_ftable_t_h
static const struct _renderControl_funcs_by_name {
const char *name;
void *proc;
} renderControl_funcs_by_name[] = {
{"rcGetRendererVersion", (void*)rcGetRendererVersion},
{"rcGetEGLVersion", (void*)rcGetEGLVersion},
{"rcQueryEGLString", (void*)rcQueryEGLString},
{"rcGetGLString", (void*)rcGetGLString},
{"rcGetNumConfigs", (void*)rcGetNumConfigs},
{"rcGetConfigs", (void*)rcGetConfigs},
{"rcChooseConfig", (void*)rcChooseConfig},
{"rcGetFBParam", (void*)rcGetFBParam},
{"rcCreateContext", (void*)rcCreateContext},
{"rcDestroyContext", (void*)rcDestroyContext},
{"rcCreateWindowSurface", (void*)rcCreateWindowSurface},
{"rcDestroyWindowSurface", (void*)rcDestroyWindowSurface},
{"rcCreateColorBuffer", (void*)rcCreateColorBuffer},
{"rcOpenColorBuffer", (void*)rcOpenColorBuffer},
{"rcCloseColorBuffer", (void*)rcCloseColorBuffer},
{"rcSetWindowColorBuffer", (void*)rcSetWindowColorBuffer},
{"rcFlushWindowColorBuffer", (void*)rcFlushWindowColorBuffer},
{"rcMakeCurrent", (void*)rcMakeCurrent},
{"rcFBPost", (void*)rcFBPost},
{"rcFBSetSwapInterval", (void*)rcFBSetSwapInterval},
{"rcBindTexture", (void*)rcBindTexture},
{"rcBindRenderbuffer", (void*)rcBindRenderbuffer},
{"rcColorBufferCacheFlush", (void*)rcColorBufferCacheFlush},
{"rcReadColorBuffer", (void*)rcReadColorBuffer},
{"rcUpdateColorBuffer", (void*)rcUpdateColorBuffer},
{"rcOpenColorBuffer2", (void*)rcOpenColorBuffer2},
{"rcCreateClientImage", (void*)rcCreateClientImage},
{"rcDestroyClientImage", (void*)rcDestroyClientImage},
{"rcSelectChecksumCalculator", (void*)rcSelectChecksumCalculator},
{"rcGetNumDisplays", (void*)rcGetNumDisplays},
{"rcGetDisplayWidth", (void*)rcGetDisplayWidth},
{"rcGetDisplayHeight", (void*)rcGetDisplayHeight},
{"rcGetDisplayDpiX", (void*)rcGetDisplayDpiX},
{"rcGetDisplayDpiY", (void*)rcGetDisplayDpiY},
{"rcGetDisplayVsyncPeriod", (void*)rcGetDisplayVsyncPeriod},
{"rcPostLayer", (void*)rcPostLayer},
{"rcPostAllLayersDone", (void*)rcPostAllLayersDone},
};
static const int renderControl_num_funcs = sizeof(renderControl_funcs_by_name) / sizeof(struct _renderControl_funcs_by_name);
#endif

View file

@ -0,0 +1,46 @@
// Generated Code - DO NOT EDIT !!
// generated by 'emugen'
#ifndef __GUARD_renderControl_opcodes_h_
#define __GUARD_renderControl_opcodes_h_
#define OP_rcGetRendererVersion 10000
#define OP_rcGetEGLVersion 10001
#define OP_rcQueryEGLString 10002
#define OP_rcGetGLString 10003
#define OP_rcGetNumConfigs 10004
#define OP_rcGetConfigs 10005
#define OP_rcChooseConfig 10006
#define OP_rcGetFBParam 10007
#define OP_rcCreateContext 10008
#define OP_rcDestroyContext 10009
#define OP_rcCreateWindowSurface 10010
#define OP_rcDestroyWindowSurface 10011
#define OP_rcCreateColorBuffer 10012
#define OP_rcOpenColorBuffer 10013
#define OP_rcCloseColorBuffer 10014
#define OP_rcSetWindowColorBuffer 10015
#define OP_rcFlushWindowColorBuffer 10016
#define OP_rcMakeCurrent 10017
#define OP_rcFBPost 10018
#define OP_rcFBSetSwapInterval 10019
#define OP_rcBindTexture 10020
#define OP_rcBindRenderbuffer 10021
#define OP_rcColorBufferCacheFlush 10022
#define OP_rcReadColorBuffer 10023
#define OP_rcUpdateColorBuffer 10024
#define OP_rcOpenColorBuffer2 10025
#define OP_rcCreateClientImage 10026
#define OP_rcDestroyClientImage 10027
#define OP_rcSelectChecksumCalculator 10028
#define OP_rcGetNumDisplays 10029
#define OP_rcGetDisplayWidth 10030
#define OP_rcGetDisplayHeight 10031
#define OP_rcGetDisplayDpiX 10032
#define OP_rcGetDisplayDpiY 10033
#define OP_rcGetDisplayVsyncPeriod 10034
#define OP_rcPostLayer 10035
#define OP_rcPostAllLayersDone 10036
#define OP_last 10037
#endif

View file

@ -0,0 +1,28 @@
/*
* Copyright 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdint.h>
#include <EGL/egl.h>
#include "glUtils.h"
// values for 'param' argument of rcGetFBParam
#define FB_WIDTH 1
#define FB_HEIGHT 2
#define FB_XDPI 3
#define FB_YDPI 4
#define FB_FPS 5
#define FB_MIN_SWAP_INTERVAL 6
#define FB_MAX_SWAP_INTERVAL 7