* commit '43a4beea240f848546b2bb7f59a789a1a07dfcb9': Emulator Opengl - adding preliminary version of GLESv2 encoder
This commit is contained in:
49
tools/emulator/opengl/system/GLESv2_enc/Android.mk
Normal file
49
tools/emulator/opengl/system/GLESv2_enc/Android.mk
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
emulatorOpengl := $(LOCAL_PATH)/../..
|
||||||
|
|
||||||
|
### GLESv2_enc Encoder ###########################################
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
GL2EncoderUtils.cpp \
|
||||||
|
GL2Encoder.cpp
|
||||||
|
|
||||||
|
|
||||||
|
LOCAL_MODULE_TAGS := debug
|
||||||
|
LOCAL_MODULE := libGLESv2_enc
|
||||||
|
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
||||||
|
|
||||||
|
glesv2_intermediates := $(local-intermediates-dir)
|
||||||
|
|
||||||
|
LOCAL_PRELINK_MODULE := false
|
||||||
|
LOCAL_CFLAGS += -DLOG_TAG=\"egl_GLESv2_enc\"
|
||||||
|
LOCAL_C_INCLUDES += \
|
||||||
|
$(emulatorOpengl)/shared/OpenglCodecCommon \
|
||||||
|
$(emulatorOpengl)/host/include/libOpenglRender \
|
||||||
|
$(glesv2_intermediates)
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES := \
|
||||||
|
libOpenglCodecCommon
|
||||||
|
LOCAL_SHARED_LIBRARIES := libcutils
|
||||||
|
|
||||||
|
EMUGEN := $(HOST_OUT_EXECUTABLES)/emugen
|
||||||
|
|
||||||
|
GEN_GL2 := \
|
||||||
|
$(glesv2_intermediates)/gl2_entry.cpp \
|
||||||
|
$(glesv2_intermediates)/gl2_enc.cpp \
|
||||||
|
$(glesv2_intermediates)/gl2_enc.h
|
||||||
|
|
||||||
|
$(GEN_GL2) : PRIVATE_PATH := $(LOCAL_PATH)
|
||||||
|
$(GEN_GL2) : PRIVATE_CUSTOM_TOOL := \
|
||||||
|
$(EMUGEN) -E $(glesv2_intermediates) -i $(PRIVATE_PATH) gl2
|
||||||
|
$(GEN_GL2) : $(EMUGEN) \
|
||||||
|
$(LOCAL_PATH)/gl2.attrib \
|
||||||
|
$(LOCAL_PATH)/gl2.in \
|
||||||
|
$(LOCAL_PATH)/gl2.types
|
||||||
|
$(transform-generated-source)
|
||||||
|
|
||||||
|
LOCAL_GENERATED_SOURCES += $(GEN_GL2)
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
324
tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.cpp
Normal file
324
tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.cpp
Normal file
@@ -0,0 +1,324 @@
|
|||||||
|
#include "GL2Encoder.h"
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
|
static GLubyte *gVendorString= (GLubyte *) "Android";
|
||||||
|
static GLubyte *gRendererString= (GLubyte *) "Android HW-GLES 2.0";
|
||||||
|
static GLubyte *gVersionString= (GLubyte *) "OpenGL ES 2.0";
|
||||||
|
static GLubyte *gExtensionsString= (GLubyte *) ""; // no extensions at this point;
|
||||||
|
|
||||||
|
GL2Encoder::GL2Encoder(IOStream *stream) : gl2_encoder_context_t(stream)
|
||||||
|
{
|
||||||
|
m_state = NULL;
|
||||||
|
m_glFlush_enc = set_glFlush(s_glFlush);
|
||||||
|
m_glPixelStorei_enc = set_glPixelStorei(s_glPixelStorei);
|
||||||
|
m_glGetString_enc = set_glGetString(s_glGetString);
|
||||||
|
m_glBindBuffer_enc = set_glBindBuffer(s_glBindBuffer);
|
||||||
|
m_glDrawArrays_enc = set_glDrawArrays(s_glDrawArrays);
|
||||||
|
m_glDrawElements_enc = set_glDrawElements(s_glDrawElements);
|
||||||
|
m_glGetIntegerv_enc = set_glGetIntegerv(s_glGetIntegerv);
|
||||||
|
m_glGetFloatv_enc = set_glGetFloatv(s_glGetFloatv);
|
||||||
|
m_glGetBooleanv_enc = set_glGetBooleanv(s_glGetBooleanv);
|
||||||
|
m_glVertexAttribPointer_enc = set_glVertexAttribPointer(s_glVertexAtrribPointer);
|
||||||
|
m_glEnableVertexAttribArray_enc = set_glEnableVertexAttribArray(s_glEnableVertexAttribArray);
|
||||||
|
m_glDisableVertexAttribArray_enc = set_glDisableVertexAttribArray(s_glDisableVertexAttribArray);
|
||||||
|
m_glGetVertexAttribiv_enc = set_glGetVertexAttribiv(s_glGetVertexAttribiv);
|
||||||
|
m_glGetVertexAttribfv_enc = set_glGetVertexAttribfv(s_glGetVertexAttribfv);
|
||||||
|
m_glGetVertexAttribPointerv = set_glGetVertexAttribPointerv(s_glGetVertexAttribPointerv);
|
||||||
|
}
|
||||||
|
|
||||||
|
GL2Encoder::~GL2Encoder()
|
||||||
|
{
|
||||||
|
delete m_compressedTextureFormats;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glFlush(void *self)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *) self;
|
||||||
|
ctx->m_glFlush_enc(self);
|
||||||
|
ctx->m_stream->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
GLubyte *GL2Encoder::s_glGetString(void *self, GLenum name)
|
||||||
|
{
|
||||||
|
GLubyte *retval = (GLubyte *) "";
|
||||||
|
switch(name) {
|
||||||
|
case GL_VENDOR:
|
||||||
|
retval = gVendorString;
|
||||||
|
break;
|
||||||
|
case GL_RENDERER:
|
||||||
|
retval = gRendererString;
|
||||||
|
break;
|
||||||
|
case GL_VERSION:
|
||||||
|
retval = gVersionString;
|
||||||
|
break;
|
||||||
|
case GL_EXTENSIONS:
|
||||||
|
retval = gExtensionsString;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glPixelStorei(void *self, GLenum param, GLint value)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
ctx->m_glPixelStorei_enc(ctx, param, value);
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
ctx->m_state->setPixelStore(param, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::s_glBindBuffer(void *self, GLenum target, GLuint id)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *) self;
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
ctx->m_state->bindBuffer(target, id);
|
||||||
|
// TODO set error state if needed;
|
||||||
|
ctx->m_glBindBuffer_enc(self, target, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glVertexAtrribPointer(void *self, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid * ptr)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
ctx->m_state->setState(indx, size, type, normalized, stride, ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glGetIntegerv(void *self, GLenum param, GLint *params)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *) self;
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
if (param == GL_NUM_SHADER_BINARY_FORMATS) {
|
||||||
|
*params = 0;
|
||||||
|
} else if (param == GL_SHADER_BINARY_FORMATS) {
|
||||||
|
// do nothing
|
||||||
|
} else if (param == GL_COMPRESSED_TEXTURE_FORMATS) {
|
||||||
|
GLint *compressedTextureFormats = ctx->getCompressedTextureFormats();
|
||||||
|
if (ctx->m_num_compressedTextureFormats > 0 && compressedTextureFormats != NULL) {
|
||||||
|
memcpy(params, compressedTextureFormats, ctx->m_num_compressedTextureFormats * sizeof(GLint));
|
||||||
|
}
|
||||||
|
} else if (!ctx->m_state->getClientStateParameter<GLint>(param, params)) {
|
||||||
|
ctx->m_glGetIntegerv_enc(self, param, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::s_glGetFloatv(void *self, GLenum param, GLfloat *ptr)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
if (param == GL_NUM_SHADER_BINARY_FORMATS) {
|
||||||
|
*ptr = 0;
|
||||||
|
} else if (param == GL_SHADER_BINARY_FORMATS) {
|
||||||
|
// do nothing;
|
||||||
|
} else if (param == GL_COMPRESSED_TEXTURE_FORMATS) {
|
||||||
|
GLint * compressedTextureFormats = ctx->getCompressedTextureFormats();
|
||||||
|
if (ctx->m_num_compressedTextureFormats > 0 && compressedTextureFormats != NULL) {
|
||||||
|
for (int i = 0; i < ctx->m_num_compressedTextureFormats; i++) {
|
||||||
|
ptr[i] = (GLfloat) compressedTextureFormats[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!ctx->m_state->getClientStateParameter<GLfloat>(param,ptr)) {
|
||||||
|
ctx->m_glGetFloatv_enc(self, param, ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::s_glGetBooleanv(void *self, GLenum param, GLboolean *ptr)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
if (param == GL_COMPRESSED_TEXTURE_FORMATS) {
|
||||||
|
// ignore the command, although we should have generated a GLerror;
|
||||||
|
}
|
||||||
|
else if (!ctx->m_state->getClientStateParameter<GLboolean>(param,ptr)) {
|
||||||
|
ctx->m_glGetBooleanv_enc(self, param, ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::s_glEnableVertexAttribArray(void *self, GLuint index)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state);
|
||||||
|
ctx->m_state->enable(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glDisableVertexAttribArray(void *self, GLuint index)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state);
|
||||||
|
ctx->m_state->enable(index, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::s_glGetVertexAttribiv(void *self, GLuint index, GLenum pname, GLint *params)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state);
|
||||||
|
|
||||||
|
if (!ctx->m_state->getVertexAttribParameter<GLint>(index, pname, params)) {
|
||||||
|
ctx->m_glGetVertexAttribiv_enc(self, index, pname, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glGetVertexAttribfv(void *self, GLuint index, GLenum pname, GLfloat *params)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state);
|
||||||
|
|
||||||
|
if (!ctx->m_state->getVertexAttribParameter<GLfloat>(index, pname, params)) {
|
||||||
|
ctx->m_glGetVertexAttribfv_enc(self, index, pname, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pname, GLvoid **pointer)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
if (ctx->m_state == NULL) return;
|
||||||
|
|
||||||
|
const GLClientState::VertexAttribState *va_state = ctx->m_state->getState(index);
|
||||||
|
if (va_state != NULL) {
|
||||||
|
*pointer = va_state->data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::sendVertexAttributes(GLint first, GLsizei count)
|
||||||
|
{
|
||||||
|
assert(m_state);
|
||||||
|
|
||||||
|
for (int i = 0; i < m_state->nLocations(); i++) {
|
||||||
|
bool enableDirty;
|
||||||
|
const GLClientState::VertexAttribState *state = m_state->getStateAndEnableDirty(i, &enableDirty);
|
||||||
|
|
||||||
|
if (!state) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!enableDirty && !state->enabled) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (state->enabled) {
|
||||||
|
m_glEnableVertexAttribArray_enc(this, i);
|
||||||
|
|
||||||
|
unsigned int datalen = state->elementSize * count;
|
||||||
|
int stride = state->stride == 0 ? state->elementSize : state->stride;
|
||||||
|
int firstIndex = stride * first;
|
||||||
|
|
||||||
|
if (state->bufferObject == 0) {
|
||||||
|
this->glVertexAttribPointerData(this, i, state->size, state->type, state->normalized, state->stride,
|
||||||
|
(unsigned char *)state->data + firstIndex, datalen);
|
||||||
|
} else {
|
||||||
|
this->glBindBuffer(this, GL_ARRAY_BUFFER, state->bufferObject);
|
||||||
|
this->glVertexAttribPointerOffset(this, i, state->size, state->type, state->normalized, state->stride,
|
||||||
|
(GLuint) state->data + firstIndex);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this->m_glDisableVertexAttribArray_enc(this, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL2Encoder::s_glDrawArrays(void *self, GLenum mode, GLint first, GLsizei count)
|
||||||
|
{
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
ctx->sendVertexAttributes(first, count);
|
||||||
|
ctx->m_glDrawArrays_enc(ctx, mode, 0, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GL2Encoder::s_glDrawElements(void *self, GLenum mode, GLsizei count, GLenum type, void *indices)
|
||||||
|
{
|
||||||
|
|
||||||
|
GL2Encoder *ctx = (GL2Encoder *)self;
|
||||||
|
assert(ctx->m_state != NULL);
|
||||||
|
|
||||||
|
bool has_immediate_arrays = false;
|
||||||
|
bool has_indirect_arrays = false;
|
||||||
|
int nLocations = ctx->m_state->nLocations();
|
||||||
|
|
||||||
|
for (int i = 0; i < nLocations; i++) {
|
||||||
|
const GLClientState::VertexAttribState *state = ctx->m_state->getState(i);
|
||||||
|
if (state->enabled) {
|
||||||
|
if (state->bufferObject != 0) {
|
||||||
|
has_indirect_arrays = true;
|
||||||
|
} else {
|
||||||
|
has_immediate_arrays = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!has_immediate_arrays && !has_indirect_arrays) {
|
||||||
|
LOGE("glDrawElements: no data bound to the command - ignoring\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx->m_state->currentIndexVbo() != 0) {
|
||||||
|
if (!has_immediate_arrays) {
|
||||||
|
ctx->sendVertexAttributes(0, count);
|
||||||
|
ctx->glDrawElementsOffset(ctx, mode, count, type, (GLuint)indices);
|
||||||
|
} else {
|
||||||
|
LOGE("glDrawElements: indirect index arrays, with immidate-mode data array is not supported\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
void *adjustedIndices = indices;
|
||||||
|
int minIndex = 0, maxIndex = 0;
|
||||||
|
|
||||||
|
switch(type) {
|
||||||
|
case GL_BYTE:
|
||||||
|
case GL_UNSIGNED_BYTE:
|
||||||
|
GLUtils::minmax<unsigned char>((unsigned char *)indices, count, &minIndex, &maxIndex);
|
||||||
|
if (minIndex != 0) {
|
||||||
|
adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count);
|
||||||
|
GLUtils::shiftIndices<unsigned char>((unsigned char *)indices,
|
||||||
|
(unsigned char *)adjustedIndices,
|
||||||
|
count, -minIndex);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GL_SHORT:
|
||||||
|
case GL_UNSIGNED_SHORT:
|
||||||
|
GLUtils::minmax<unsigned short>((unsigned short *)indices, count, &minIndex, &maxIndex);
|
||||||
|
if (minIndex != 0) {
|
||||||
|
adjustedIndices = ctx->m_fixedBuffer.alloc(glSizeof(type) * count);
|
||||||
|
GLUtils::shiftIndices<unsigned short>((unsigned short *)indices,
|
||||||
|
(unsigned short *)adjustedIndices,
|
||||||
|
count, -minIndex);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LOGE("unsupported index buffer type %d\n", type);
|
||||||
|
}
|
||||||
|
if (has_indirect_arrays || 1) {
|
||||||
|
ctx->sendVertexAttributes(minIndex, maxIndex - minIndex + 1);
|
||||||
|
ctx->glDrawElementsData(ctx, mode, count, type, adjustedIndices,
|
||||||
|
count * glSizeof(type));
|
||||||
|
// XXX - OPTIMIZATION (see the other else branch) should be implemented
|
||||||
|
if(!has_indirect_arrays) {
|
||||||
|
LOGD("unoptimized drawelements !!!\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// we are all direct arrays and immidate mode index array -
|
||||||
|
// rebuild the arrays and the index array;
|
||||||
|
LOGE("glDrawElements: direct index & direct buffer data - will be implemented in later versions;\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GLint * GL2Encoder::getCompressedTextureFormats()
|
||||||
|
{
|
||||||
|
if (m_compressedTextureFormats == NULL) {
|
||||||
|
this->glGetIntegerv(this, GL_NUM_COMPRESSED_TEXTURE_FORMATS,
|
||||||
|
&m_num_compressedTextureFormats);
|
||||||
|
if (m_num_compressedTextureFormats > 0) {
|
||||||
|
// get number of texture formats;
|
||||||
|
m_compressedTextureFormats = new GLint[m_num_compressedTextureFormats];
|
||||||
|
this->glGetCompressedTextureFormats(this, m_num_compressedTextureFormats, m_compressedTextureFormats);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m_compressedTextureFormats;
|
||||||
|
}
|
||||||
95
tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.h
Normal file
95
tools/emulator/opengl/system/GLESv2_enc/GL2Encoder.h
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
* 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 "IOStream.h"
|
||||||
|
#include "GLClientState.h"
|
||||||
|
#include "FixedBuffer.h"
|
||||||
|
|
||||||
|
|
||||||
|
class GL2Encoder : public gl2_encoder_context_t {
|
||||||
|
public:
|
||||||
|
GL2Encoder(IOStream *stream);
|
||||||
|
virtual ~GL2Encoder();
|
||||||
|
void setClientState(GLClientState *state) {
|
||||||
|
m_state = state;
|
||||||
|
}
|
||||||
|
const GLClientState *state() { return m_state; }
|
||||||
|
void flush() {
|
||||||
|
gl2_encoder_context_t::m_stream->flush();
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
GLClientState *m_state;
|
||||||
|
|
||||||
|
GLint *m_compressedTextureFormats;
|
||||||
|
GLint m_num_compressedTextureFormats;
|
||||||
|
GLint *getCompressedTextureFormats();
|
||||||
|
|
||||||
|
FixedBuffer m_fixedBuffer;
|
||||||
|
|
||||||
|
void sendVertexAttributes(GLint first, GLsizei count);
|
||||||
|
|
||||||
|
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 GLubyte * s_glGetString(void *self, GLenum name);
|
||||||
|
|
||||||
|
glBindBuffer_client_proc_t m_glBindBuffer_enc;
|
||||||
|
static void s_glBindBuffer(void *self, GLenum target, GLuint id);
|
||||||
|
|
||||||
|
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, 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_glVertexAtrribPointer(void *self, GLuint indx, GLint size, GLenum type,
|
||||||
|
GLboolean normalized, GLsizei stride, 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;
|
||||||
|
static void s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pname, GLvoid **pointer);
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
||||||
32
tools/emulator/opengl/system/GLESv2_enc/GL2EncoderUtils.cpp
Normal file
32
tools/emulator/opengl/system/GLESv2_enc/GL2EncoderUtils.cpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* 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>
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
23
tools/emulator/opengl/system/GLESv2_enc/GL2EncoderUtils.h
Normal file
23
tools/emulator/opengl/system/GLESv2_enc/GL2EncoderUtils.h
Normal 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 GL2_ENCODER_UTILS_H
|
||||||
|
#define GL2_ENCLODER_UTILS_H
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
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);
|
||||||
|
};
|
||||||
|
#endif
|
||||||
540
tools/emulator/opengl/system/GLESv2_enc/gl2.attrib
Normal file
540
tools/emulator/opengl/system/GLESv2_enc/gl2.attrib
Normal file
@@ -0,0 +1,540 @@
|
|||||||
|
GLOBAL
|
||||||
|
base_opcode 2048
|
||||||
|
encoder_headers <string.h> "glUtils.h" "GL2EncoderUtils.h"
|
||||||
|
|
||||||
|
#void glBindAttribLocation(GLuint program, GLuint index, GLchar *name)
|
||||||
|
glBindAttribLocation
|
||||||
|
len name (strlen(name) + 1)
|
||||||
|
|
||||||
|
#void glBufferData(GLenum target, GLsizeiptr size, GLvoid *data, GLenum usage)
|
||||||
|
glBufferData
|
||||||
|
len data size
|
||||||
|
|
||||||
|
#void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)
|
||||||
|
glBufferSubData
|
||||||
|
len data size
|
||||||
|
|
||||||
|
#void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid *data)
|
||||||
|
glCompressedTexImage2D
|
||||||
|
len data imageSize
|
||||||
|
|
||||||
|
#void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid *data)
|
||||||
|
glCompressedTexSubImage2D
|
||||||
|
len data imageSize
|
||||||
|
|
||||||
|
#void glDeleteBuffers(GLsizei n, GLuint *buffers)
|
||||||
|
glDeleteBuffers
|
||||||
|
len buffers (n * sizeof(GLuint))
|
||||||
|
|
||||||
|
#void glDeleteFramebuffers(GLsizei n, GLuint *framebuffers)
|
||||||
|
glDeleteFramebuffers
|
||||||
|
len framebuffers (n * sizeof(GLuint))
|
||||||
|
|
||||||
|
#void glDeleteRenderbuffers(GLsizei n, GLuint *renderbuffers)
|
||||||
|
glDeleteRenderbuffers
|
||||||
|
len renderbuffers (n * sizeof(GLuint))
|
||||||
|
|
||||||
|
#void glDeleteTextures(GLsizei n, GLuint *textures)
|
||||||
|
glDeleteTextures
|
||||||
|
len textures (n * sizeof(GLuint))
|
||||||
|
|
||||||
|
#void glDrawElements(GLenum mode, GLsizei count, GLenum type, GLvoid *indices)
|
||||||
|
glDrawElements
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGenBuffers(GLsizei n, GLuint *buffers)
|
||||||
|
glGenBuffers
|
||||||
|
len buffers (n * sizeof(GLuint))
|
||||||
|
dir buffers out
|
||||||
|
|
||||||
|
#void glGenFramebuffers(GLsizei n, GLuint *framebuffers)
|
||||||
|
glGenFramebuffers
|
||||||
|
len framebuffers (n * sizeof(GLuint))
|
||||||
|
dir framebuffers out
|
||||||
|
|
||||||
|
#void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
|
||||||
|
glGenRenderbuffers
|
||||||
|
len renderbuffers (n * sizeof(GLuint))
|
||||||
|
dir renderbuffers out
|
||||||
|
|
||||||
|
#void glGenTextures(GLsizei n, GLuint *textures)
|
||||||
|
glGenTextures
|
||||||
|
len textures (n * sizeof(GLuint))
|
||||||
|
dir textures out
|
||||||
|
|
||||||
|
#void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
|
||||||
|
glGetActiveAttrib
|
||||||
|
len name bufsize
|
||||||
|
dir name out
|
||||||
|
dir length out
|
||||||
|
len length (sizeof(GLsizei))
|
||||||
|
dir size out
|
||||||
|
len size (sizeof(GLint))
|
||||||
|
dir type out
|
||||||
|
len type (sizeof(GLenum))
|
||||||
|
|
||||||
|
#void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
|
||||||
|
glGetActiveUniform
|
||||||
|
len name bufsize
|
||||||
|
dir name out
|
||||||
|
dir length out
|
||||||
|
len length (sizeof(GLsizei))
|
||||||
|
dir size out
|
||||||
|
len size (sizeof(GLint))
|
||||||
|
dir type out
|
||||||
|
len type (sizeof(GLenum))
|
||||||
|
|
||||||
|
|
||||||
|
#void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)
|
||||||
|
glGetAttachedShaders
|
||||||
|
len shaders maxcount
|
||||||
|
dir shaders out
|
||||||
|
dir count out
|
||||||
|
len count (sizeof(GLsizei))
|
||||||
|
|
||||||
|
#int glGetAttribLocation(GLuint program, GLchar *name)
|
||||||
|
glGetAttribLocation
|
||||||
|
len name (strlen(name) + 1)
|
||||||
|
|
||||||
|
#void glGetBooleanv(GLenum pname, GLboolean *params)
|
||||||
|
glGetBooleanv
|
||||||
|
dir params out
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLboolean))
|
||||||
|
|
||||||
|
#void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
|
||||||
|
glGetBufferParameteriv
|
||||||
|
len params (sizeof(GLint))
|
||||||
|
dir params out
|
||||||
|
|
||||||
|
#void glGetFloatv(GLenum pname, GLfloat *params)
|
||||||
|
glGetFloatv
|
||||||
|
dir params out
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
|
||||||
|
glGetFramebufferAttachmentParameteriv
|
||||||
|
dir params out
|
||||||
|
len params (sizeof(GLint))
|
||||||
|
|
||||||
|
#void glGetIntegerv(GLenum pname, GLint *params)
|
||||||
|
glGetIntegerv
|
||||||
|
dir params out
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glGetProgramiv(GLuint program, GLenum pname, GLint *params)
|
||||||
|
glGetProgramiv
|
||||||
|
dir params out
|
||||||
|
len params sizeof(GLint)
|
||||||
|
#XXX - might change if extension constants that return more then one value
|
||||||
|
|
||||||
|
|
||||||
|
#void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog)
|
||||||
|
glGetProgramInfoLog
|
||||||
|
dir infolog out
|
||||||
|
len infolog bufsize
|
||||||
|
dir length out
|
||||||
|
len length sizeof(GLsizei)
|
||||||
|
|
||||||
|
#void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
|
||||||
|
glGetRenderbufferParameteriv
|
||||||
|
dir params out
|
||||||
|
len params sizeof(GLint)
|
||||||
|
# XXX - might change if pname with value larger then one is added
|
||||||
|
|
||||||
|
#void glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
|
||||||
|
glGetShaderiv
|
||||||
|
dir params out
|
||||||
|
len params sizeof(GLint)
|
||||||
|
# XXX - might change if pname with value larger then one is added
|
||||||
|
|
||||||
|
#void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *infolog)
|
||||||
|
glGetShaderInfoLog
|
||||||
|
dir length out
|
||||||
|
len length (sizeof(GLsizei))
|
||||||
|
dir infolog out
|
||||||
|
len infolog bufsize
|
||||||
|
|
||||||
|
|
||||||
|
#void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
|
||||||
|
glGetShaderPrecisionFormat
|
||||||
|
len range (sizeof(GLint))
|
||||||
|
len precision (sizeof(GLint))
|
||||||
|
|
||||||
|
#void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source)
|
||||||
|
glGetShaderSource
|
||||||
|
dir length out
|
||||||
|
len length (sizeof(GLsizei))
|
||||||
|
dir source out
|
||||||
|
len source bufsize
|
||||||
|
|
||||||
|
#GLubyte* glGetString(GLenum name)
|
||||||
|
glGetString
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
|
||||||
|
glGetTexParameterfv
|
||||||
|
dir params out
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
|
||||||
|
glGetTexParameteriv
|
||||||
|
dir params out
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glGetUniformfv(GLuint program, GLint location, GLfloat *params)
|
||||||
|
glGetUniformfv
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetUniformiv(GLuint program, GLint location, GLint *params)
|
||||||
|
glGetUniformiv
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#int glGetUniformLocation(GLuint program, GLchar *name)
|
||||||
|
glGetUniformLocation
|
||||||
|
len name (strlen(name) + 1)
|
||||||
|
|
||||||
|
# client-state shall be handled locally by the encoder in most cases.
|
||||||
|
# however, GL_CURRENT_VERTEX_ATTRIB and potential others are handled by the server side,
|
||||||
|
# thus we still need to implement it.
|
||||||
|
#void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
|
||||||
|
glGetVertexAttribfv
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#see glGetVertexAttribfv for comments
|
||||||
|
#void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
|
||||||
|
glGetVertexAttribiv
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLint))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
|
||||||
|
glReadPixels
|
||||||
|
dir pixels out
|
||||||
|
len pixels pixelDataSize(self, width, height, format, type, 0)
|
||||||
|
|
||||||
|
#void glShaderBinary(GLsizei n, GLuint *shaders, GLenum binaryformat, GLvoid *binary, GLsizei length)
|
||||||
|
glShaderBinary
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels)
|
||||||
|
glTexImage2D
|
||||||
|
dir pixels in
|
||||||
|
len pixels pixelDataSize(self, width, height, format, type, 1)
|
||||||
|
|
||||||
|
#void glTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
|
||||||
|
glTexParameterfv
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLfloat))
|
||||||
|
#void glTexParameteriv(GLenum target, GLenum pname, GLint *params)
|
||||||
|
glTexParameteriv
|
||||||
|
len params (glUtilsParamSize(pname) * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
|
||||||
|
glTexSubImage2D
|
||||||
|
len pixels pixelDataSize(self, width, height, format, type, 1)
|
||||||
|
|
||||||
|
#void glUniform1fv(GLint location, GLsizei count, GLfloat *v)
|
||||||
|
glUniform1fv
|
||||||
|
len v (count * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glUniform1iv(GLint location, GLsizei count, GLint *v)
|
||||||
|
glUniform1iv
|
||||||
|
len v (count * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glUniform2fv(GLint location, GLsizei count, GLfloat *v)
|
||||||
|
glUniform2fv
|
||||||
|
len v (count * 2 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glUniform2iv(GLint location, GLsizei count, GLint *v)
|
||||||
|
glUniform2iv
|
||||||
|
len v (count * 2 * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glUniform3fv(GLint location, GLsizei count, GLfloat *v)
|
||||||
|
glUniform3fv
|
||||||
|
len v (count * 3 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glUniform3iv(GLint location, GLsizei count, GLint *v)
|
||||||
|
glUniform3iv
|
||||||
|
len v (3 * count * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glUniform4fv(GLint location, GLsizei count, GLfloat *v)
|
||||||
|
glUniform4fv
|
||||||
|
len v (4 * count * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glUniform4iv(GLint location, GLsizei count, GLint *v)
|
||||||
|
glUniform4iv
|
||||||
|
len v (4 * count * sizeof(GLint))
|
||||||
|
|
||||||
|
#void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, GLfloat *value)
|
||||||
|
glUniformMatrix2fv
|
||||||
|
len value (count * 4 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, GLfloat *value)
|
||||||
|
glUniformMatrix3fv
|
||||||
|
len value (count * 9 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, GLfloat *value)
|
||||||
|
glUniformMatrix4fv
|
||||||
|
len value (count * 16 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glVertexAttrib1fv(GLuint indx, GLfloat *values)
|
||||||
|
glVertexAttrib1fv
|
||||||
|
len values (sizeof(GLfloat))
|
||||||
|
#void glVertexAttrib2fv(GLuint indx, GLfloat *values)
|
||||||
|
glVertexAttrib2fv
|
||||||
|
len values (2 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glVertexAttrib3fv(GLuint indx, GLfloat *values)
|
||||||
|
glVertexAttrib3fv
|
||||||
|
len values (3 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glVertexAttrib4fv(GLuint indx, GLfloat *values)
|
||||||
|
glVertexAttrib4fv
|
||||||
|
len values (4 * sizeof(GLfloat))
|
||||||
|
|
||||||
|
#void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid *ptr)
|
||||||
|
glVertexAttribPointer
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
|
||||||
|
glGetProgramBinaryOES
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glProgramBinaryOES(GLuint program, GLenum binaryFormat, GLvoid *binary, GLint length)
|
||||||
|
glProgramBinaryOES
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void* glMapBufferOES(GLenum target, GLenum access)
|
||||||
|
glMapBufferOES
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid *pixels)
|
||||||
|
glTexImage3DOES
|
||||||
|
len pixels pixelDataSize3D(self, width, height, depth, format, type, 1)
|
||||||
|
|
||||||
|
#void glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *pixels)
|
||||||
|
glTexSubImage3DOES
|
||||||
|
len pixels pixelDataSize3D(self, width, height, depth, format, type, 1)
|
||||||
|
|
||||||
|
#void glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid *data)
|
||||||
|
glCompressedTexImage3DOES
|
||||||
|
len data imageSize
|
||||||
|
|
||||||
|
#void glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid *data)
|
||||||
|
glCompressedTexSubImage3DOES
|
||||||
|
len data imageSize
|
||||||
|
|
||||||
|
#void glDeleteVertexArraysOES(GLsizei n, GLuint *arrays)
|
||||||
|
glDeleteVertexArraysOES
|
||||||
|
len arrays (n * sizeof(GLuint))
|
||||||
|
|
||||||
|
#void glGenVertexArraysOES(GLsizei n, GLuint *arrays)
|
||||||
|
glGenVertexArraysOES
|
||||||
|
len arrays (n * sizeof(GLuint))
|
||||||
|
dir arrays out
|
||||||
|
|
||||||
|
|
||||||
|
#void glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, GLenum *attachments)
|
||||||
|
glDiscardFramebufferEXT
|
||||||
|
len attachments (numAttachments * sizeof(GLenum))
|
||||||
|
|
||||||
|
#void glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
|
||||||
|
glMultiDrawArraysEXT
|
||||||
|
flag unsupported
|
||||||
|
#void glMultiDrawElementsEXT(GLenum mode, GLsizei *count, GLenum type, GLvoid *indices, GLsizei primcount)
|
||||||
|
glMultiDrawElementsEXT
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glShaderSource(GLuint shader, GLsizei count, GLstr *string, const GLint *length)
|
||||||
|
glShaderSource
|
||||||
|
len length (count * sizeof(GLint))
|
||||||
|
len string (glUtilsSumArrayValues(length, count))
|
||||||
|
custom_pack string glUtilsPackStrings(ptr, string, length, count)
|
||||||
|
|
||||||
|
|
||||||
|
#void glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups)
|
||||||
|
glGetPerfMonitorGroupsAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters)
|
||||||
|
glGetPerfMonitorCountersAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
|
||||||
|
glGetPerfMonitorGroupStringAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
|
||||||
|
glGetPerfMonitorCounterStringAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data)
|
||||||
|
glGetPerfMonitorCounterInfoAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors)
|
||||||
|
glGenPerfMonitorsAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors)
|
||||||
|
glDeletePerfMonitorsAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList)
|
||||||
|
glSelectPerfMonitorCountersAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glBeginPerfMonitorAMD(GLuint monitor)
|
||||||
|
glBeginPerfMonitorAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glEndPerfMonitorAMD(GLuint monitor)
|
||||||
|
glEndPerfMonitorAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
|
||||||
|
glGetPerfMonitorCounterDataAMD
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
|
||||||
|
glRenderbufferStorageMultisampleIMG
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
|
||||||
|
glFramebufferTexture2DMultisampleIMG
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glDeleteFencesNV(GLsizei n, GLuint *fences)
|
||||||
|
glDeleteFencesNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGenFencesNV(GLsizei n, GLuint *fences)
|
||||||
|
glGenFencesNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#GLboolean glIsFenceNV(GLuint fence)
|
||||||
|
glIsFenceNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#GLboolean glTestFenceNV(GLuint fence)
|
||||||
|
glTestFenceNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
|
||||||
|
glGetFenceivNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glFinishFenceNV(GLuint fence)
|
||||||
|
glFinishFenceNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glSetFenceNV(GLuint fence, GLenum condition)
|
||||||
|
glSetFenceNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glCoverageMaskNV(GLboolean mask)
|
||||||
|
glCoverageMaskNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glCoverageOperationNV(GLenum operation)
|
||||||
|
glCoverageOperationNV
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls)
|
||||||
|
glGetDriverControlsQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString)
|
||||||
|
glGetDriverControlStringQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glEnableDriverControlQCOM(GLuint driverControl)
|
||||||
|
glEnableDriverControlQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glDisableDriverControlQCOM(GLuint driverControl)
|
||||||
|
glDisableDriverControlQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures)
|
||||||
|
glExtGetTexturesQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
|
||||||
|
glExtGetBuffersQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers)
|
||||||
|
glExtGetRenderbuffersQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers)
|
||||||
|
glExtGetFramebuffersQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params)
|
||||||
|
glExtGetTexLevelParameterivQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param)
|
||||||
|
glExtTexObjectStateOverrideiQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels)
|
||||||
|
glExtGetTexSubImageQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetBufferPointervQCOM(GLenum target, GLvoidptr *params)
|
||||||
|
glExtGetBufferPointervQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders)
|
||||||
|
glExtGetShadersQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms)
|
||||||
|
glExtGetProgramsQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#GLboolean glExtIsProgramBinaryQCOM(GLuint program)
|
||||||
|
glExtIsProgramBinaryQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length)
|
||||||
|
glExtGetProgramBinarySourceQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
|
||||||
|
glStartTilingQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
#void glEndTilingQCOM(GLbitfield preserveMask)
|
||||||
|
glEndTilingQCOM
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
|
||||||
|
#void glVertexAttribPointerData(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void * data, GLuint datalen)
|
||||||
|
glVertexAttribPointerData
|
||||||
|
len data datalen
|
||||||
|
custom_pack data glUtilsPackPointerData((unsigned char *)ptr, (unsigned char *)data, size, type, stride, datalen)
|
||||||
|
flag custom_decoder
|
||||||
|
|
||||||
|
glVertexAttribPointerOffset
|
||||||
|
flag custom_decoder
|
||||||
|
|
||||||
|
#client-state, handled by the encoder
|
||||||
|
#GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
|
||||||
|
glGetVertexAttribPointerv
|
||||||
|
flag unsupported
|
||||||
|
|
||||||
|
glDrawElementsData
|
||||||
|
len data datalen
|
||||||
|
flag custom_decoder
|
||||||
|
|
||||||
|
glDrawElementsOffset
|
||||||
|
flag custom_decoder
|
||||||
|
|
||||||
|
#GL_ENTRY(void, glGetCompressedTextureFormats, int count, GLint *formats)
|
||||||
|
glGetCompressedTextureFormats
|
||||||
|
dir formats out
|
||||||
|
len formats (count * sizeof(GLint))
|
||||||
|
flag custom_decoder
|
||||||
215
tools/emulator/opengl/system/GLESv2_enc/gl2.in
Normal file
215
tools/emulator/opengl/system/GLESv2_enc/gl2.in
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
GL_ENTRY(void, glActiveTexture, GLenum texture)
|
||||||
|
GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader)
|
||||||
|
GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name)
|
||||||
|
GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer)
|
||||||
|
GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer)
|
||||||
|
GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer)
|
||||||
|
GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture)
|
||||||
|
GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
|
||||||
|
GL_ENTRY(void, glBlendEquation, GLenum mode )
|
||||||
|
GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha)
|
||||||
|
GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor)
|
||||||
|
GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
|
||||||
|
GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
|
||||||
|
GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
|
||||||
|
GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target)
|
||||||
|
GL_ENTRY(void, glClear, GLbitfield mask)
|
||||||
|
GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
|
||||||
|
GL_ENTRY(void, glClearDepthf, GLclampf depth)
|
||||||
|
GL_ENTRY(void, glClearStencil, GLint s)
|
||||||
|
GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
|
||||||
|
GL_ENTRY(void, glCompileShader, GLuint shader)
|
||||||
|
GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
|
||||||
|
GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
|
||||||
|
GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
||||||
|
GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||||
|
GL_ENTRY(GLuint, glCreateProgram, void)
|
||||||
|
GL_ENTRY(GLuint, glCreateShader, GLenum type)
|
||||||
|
GL_ENTRY(void, glCullFace, GLenum mode)
|
||||||
|
GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint* buffers)
|
||||||
|
GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers)
|
||||||
|
GL_ENTRY(void, glDeleteProgram, GLuint program)
|
||||||
|
GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers)
|
||||||
|
GL_ENTRY(void, glDeleteShader, GLuint shader)
|
||||||
|
GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint* textures)
|
||||||
|
GL_ENTRY(void, glDepthFunc, GLenum func)
|
||||||
|
GL_ENTRY(void, glDepthMask, GLboolean flag)
|
||||||
|
GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar)
|
||||||
|
GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader)
|
||||||
|
GL_ENTRY(void, glDisable, GLenum cap)
|
||||||
|
GL_ENTRY(void, glDisableVertexAttribArray, GLuint index)
|
||||||
|
GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count)
|
||||||
|
GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
|
||||||
|
GL_ENTRY(void, glEnable, GLenum cap)
|
||||||
|
GL_ENTRY(void, glEnableVertexAttribArray, GLuint index)
|
||||||
|
# divert from the Opengl definition. Make glFinish retrun a value to ensure round trip.
|
||||||
|
GL_ENTRY(GLint, glFinish, void)
|
||||||
|
GL_ENTRY(void, glFlush, void)
|
||||||
|
GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
|
||||||
|
GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
|
||||||
|
GL_ENTRY(void, glFrontFace, GLenum mode)
|
||||||
|
GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint* buffers)
|
||||||
|
GL_ENTRY(void, glGenerateMipmap, GLenum target)
|
||||||
|
GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers)
|
||||||
|
GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers)
|
||||||
|
GL_ENTRY(void, glGenTextures, GLsizei n, GLuint* textures)
|
||||||
|
GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
|
||||||
|
GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
|
||||||
|
GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
|
||||||
|
GL_ENTRY(int, glGetAttribLocation, GLuint program, const GLchar* name)
|
||||||
|
GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean* params)
|
||||||
|
GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(GLenum, glGetError, void)
|
||||||
|
GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat* params)
|
||||||
|
GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||||
|
GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||||
|
GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
|
||||||
|
GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
|
||||||
|
GL_ENTRY(const GLubyte*, glGetString, GLenum name)
|
||||||
|
GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat* params)
|
||||||
|
GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params)
|
||||||
|
GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params)
|
||||||
|
GL_ENTRY(int, glGetUniformLocation, GLuint program, const GLchar* name)
|
||||||
|
GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params)
|
||||||
|
GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params)
|
||||||
|
GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
|
||||||
|
GL_ENTRY(void, glHint, GLenum target, GLenum mode)
|
||||||
|
GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer)
|
||||||
|
GL_ENTRY(GLboolean, glIsEnabled, GLenum cap)
|
||||||
|
GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer)
|
||||||
|
GL_ENTRY(GLboolean, glIsProgram, GLuint program)
|
||||||
|
GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer)
|
||||||
|
GL_ENTRY(GLboolean, glIsShader, GLuint shader)
|
||||||
|
GL_ENTRY(GLboolean, glIsTexture, GLuint texture)
|
||||||
|
GL_ENTRY(void, glLineWidth, GLfloat width)
|
||||||
|
GL_ENTRY(void, glLinkProgram, GLuint program)
|
||||||
|
GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param)
|
||||||
|
GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units)
|
||||||
|
GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
|
||||||
|
GL_ENTRY(void, glReleaseShaderCompiler, void)
|
||||||
|
GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
|
||||||
|
GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert)
|
||||||
|
GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||||
|
GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
|
||||||
|
GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLstr* string, const GLint* length)
|
||||||
|
GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask)
|
||||||
|
GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask)
|
||||||
|
GL_ENTRY(void, glStencilMask, GLuint mask)
|
||||||
|
GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask)
|
||||||
|
GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass)
|
||||||
|
GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
|
||||||
|
GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
|
||||||
|
GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param)
|
||||||
|
GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat* params)
|
||||||
|
GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param)
|
||||||
|
GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint* params)
|
||||||
|
GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
|
||||||
|
GL_ENTRY(void, glUniform1f, GLint location, GLfloat x)
|
||||||
|
GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v)
|
||||||
|
GL_ENTRY(void, glUniform1i, GLint location, GLint x)
|
||||||
|
GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v)
|
||||||
|
GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y)
|
||||||
|
GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v)
|
||||||
|
GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y)
|
||||||
|
GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v)
|
||||||
|
GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z)
|
||||||
|
GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v)
|
||||||
|
GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z)
|
||||||
|
GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v)
|
||||||
|
GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||||
|
GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v)
|
||||||
|
GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w)
|
||||||
|
GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v)
|
||||||
|
GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
|
||||||
|
GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
|
||||||
|
GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
|
||||||
|
GL_ENTRY(void, glUseProgram, GLuint program)
|
||||||
|
GL_ENTRY(void, glValidateProgram, GLuint program)
|
||||||
|
GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x)
|
||||||
|
GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values)
|
||||||
|
GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y)
|
||||||
|
GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values)
|
||||||
|
GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z)
|
||||||
|
GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values)
|
||||||
|
GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||||
|
GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values)
|
||||||
|
GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
|
||||||
|
GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||||
|
GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image)
|
||||||
|
GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image)
|
||||||
|
GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
|
||||||
|
GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
|
||||||
|
GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access)
|
||||||
|
GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target)
|
||||||
|
#GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid** params)
|
||||||
|
GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
|
||||||
|
GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
|
||||||
|
GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||||
|
GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
|
||||||
|
GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
|
||||||
|
GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
|
||||||
|
GL_ENTRY(void, glBindVertexArrayOES, GLuint array)
|
||||||
|
GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays)
|
||||||
|
GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays)
|
||||||
|
GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array)
|
||||||
|
GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments)
|
||||||
|
GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
|
||||||
|
GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
|
||||||
|
|
||||||
|
#not supported
|
||||||
|
GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups)
|
||||||
|
GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters)
|
||||||
|
GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
|
||||||
|
GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
|
||||||
|
GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data)
|
||||||
|
GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors)
|
||||||
|
GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors)
|
||||||
|
GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList)
|
||||||
|
GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor)
|
||||||
|
GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor)
|
||||||
|
GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
|
||||||
|
|
||||||
|
GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
|
||||||
|
GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
|
||||||
|
GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences)
|
||||||
|
GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences)
|
||||||
|
GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence)
|
||||||
|
GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence)
|
||||||
|
GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params)
|
||||||
|
GL_ENTRY(void, glFinishFenceNV, GLuint fence)
|
||||||
|
GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition)
|
||||||
|
GL_ENTRY(void, glCoverageMaskNV, GLboolean mask)
|
||||||
|
GL_ENTRY(void, glCoverageOperationNV, GLenum operation)
|
||||||
|
GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls)
|
||||||
|
GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString)
|
||||||
|
GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl)
|
||||||
|
GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl)
|
||||||
|
GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures)
|
||||||
|
GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
|
||||||
|
GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers)
|
||||||
|
GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers)
|
||||||
|
GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params)
|
||||||
|
GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param)
|
||||||
|
GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels)
|
||||||
|
GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoidptr *params)
|
||||||
|
GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders)
|
||||||
|
GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms)
|
||||||
|
GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program)
|
||||||
|
GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length)
|
||||||
|
GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
|
||||||
|
GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask)
|
||||||
|
|
||||||
|
# add-ons
|
||||||
|
GL_ENTRY(void, glVertexAttribPointerData, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void * data, GLuint datalen)
|
||||||
|
GL_ENTRY(void, glVertexAttribPointerOffset, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint offset)
|
||||||
|
GL_ENTRY(void, glDrawElementsOffset, GLenum mode, GLsizei count, GLenum type, GLuint offset)
|
||||||
|
GL_ENTRY(void, glDrawElementsData, GLenum mode, GLsizei count, GLenum type, void *data, GLuint datalen)
|
||||||
|
GL_ENTRY(void, glGetCompressedTextureFormats, int count, GLint *formats)
|
||||||
|
|
||||||
|
|
||||||
36
tools/emulator/opengl/system/GLESv2_enc/gl2.types
Normal file
36
tools/emulator/opengl/system/GLESv2_enc/gl2.types
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
GLbitfield 32 0x%08x false
|
||||||
|
GLboolean 8 %d false
|
||||||
|
GLclampf 32 %f false
|
||||||
|
GLclampx 32 0x%08x false
|
||||||
|
GLeglImageOES 32 %p false
|
||||||
|
GLenum 32 0x%08x false
|
||||||
|
GLfixed 32 0x%08x false
|
||||||
|
GLfloat 32 %f false
|
||||||
|
GLint 32 %d false
|
||||||
|
GLintptr 32 %p false
|
||||||
|
GLshort 16 %d false
|
||||||
|
GLsizei 32 %d false
|
||||||
|
GLsizeiptr 32 %p false
|
||||||
|
GLubyte 8 0x%02x false
|
||||||
|
GLuint 32 %u false
|
||||||
|
GLvoid 0 %x false
|
||||||
|
GLchar 8 %d false
|
||||||
|
GLenum* 32 0x%08x true
|
||||||
|
GLboolean* 32 0x%08x true
|
||||||
|
GLclampf* 32 0x%08x true
|
||||||
|
GLclampx* 32 0x%08x true
|
||||||
|
GLeglImageOES* 32 0x%08x true
|
||||||
|
GLfixed* 32 0x%08x true
|
||||||
|
GLfloat* 32 0x%08x true
|
||||||
|
GLint* 32 0x%08x true
|
||||||
|
GLshort* 32 0x%08x true
|
||||||
|
GLsizei* 32 0x%08x true
|
||||||
|
GLubyte* 32 0x%08x true
|
||||||
|
GLuint* 32 0x%08x true
|
||||||
|
GLvoid* 32 0x%08x true
|
||||||
|
GLchar* 32 0x%08x true
|
||||||
|
GLvoid** 32 0x%08x true
|
||||||
|
void* 32 0x%08x true
|
||||||
|
GLstr 32 %s true
|
||||||
|
GLstr* 32 0x%08x true
|
||||||
|
GLvoidptr* 32 0x%08x true
|
||||||
21
tools/emulator/opengl/system/GLESv2_enc/gl2_types.h
Normal file
21
tools/emulator/opengl/system/GLESv2_enc/gl2_types.h
Normal 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
|
||||||
Reference in New Issue
Block a user