On every swapBuffers, we make sure to decRef on the prev buffer,
and incRef on the current buffer. This fixes all the anoying
crashes on application exit, and also after the speech windows
on Replica Island
Change-Id: I1981fbf17a24ef6f60cdcf6d7ec3a5e7eef5377f
This change modifies the function declarations under
developement/tools/emulator/opengl/host/include/render_api.h
to make them callable from C.
This is preparation work for integrating the rendering library
into the emulator. The plan is to dlopen() the library dynamically
and using non-mangled function names makes using dlsym() both
easier and more portable.
Change-Id: I34656ea4618dbb989fb6ff78df43e9bfb38a7799
Adds GLSL built in constants defined in GLSL ES but not in GLSL.
Makes biConstant conformance test to pass on Mac (where ES2_compatability is not
present).
Also fixed the GLSL parser to insert our additions to the shader
only after the "#version" token if exist in the original shader.
Also renamed env var GOOGLE_GLES_FORCE_GLSL_VERSION to
GOOGLE_GLES_DEFAULT_GLSL_VERSION to better match its functionality since
we use it only if no specific version exist in the shader code.
Change-Id: If9485da16da2808245943a7295f8fb22a6f631aa
Both the ATI and nVidia OpenGL drivers return the wrong answer on
glGetIntegerv(GL_ALPHA_TEST_REF). So Implement this functionality
in our code.
Change-Id: I022b1475f7edb9f1d0f48ebcaf9f6e9f5c4f344e
enable workarounds by default
added environemnt variable GOOGLE_GLSL_FORCE_GLES_VERSION
to the shader parser
Change-Id: If1dbc10722436659295c40a40bd630a72e575799
nvidia may return GL_VALIDATE_STATUS = GL_TRUE even when the program does not link
this change checks for GL_LINK_STATUS when GL_VALIDATE_STATUS is queried
Change-Id: Ia9f5da9c71b8666ce929d8cc2a44639bc947eecb
This is not really a bug, but the nVidia shader compiler is much more
liberal than the GLSL spec, and allows compilation of shaders which
do not comply with the spec. This is an issue for passing the
conformance tests, but more importantly it will allow bad shader written
by the app developer to pass on the emulator and then to fail on the device.
Adding "#version 100" definition to the head of a shader source disables
this liberal behavior. For now this is activated in run time by the "NV_WAR"
environment variable.
Change-Id: I1c322d4221d313d3ee70592bc15ea0e340853990
When calling RenderbufferStorage with internalformat=GL_RGB565
we will create one with internal format GL_RGB
the same for glTexImage2D
Change-Id: I1e464dd36142f586beef6bf895456c7aab1b8237
support different binding to GL_TEXTURE_2D and GL_TEXTURE_CUBE_MAP
targets
create 2 default texture object, to be bound when BindTexture( ... ,0)
is called.
in order to do this, we must ensure their names are internal only, so the user can't
use these names by accident.
the object name manager local name is now 64 bit to allow generation of internal names
Change-Id: I29d000a67042051706e13dc3ef3aa34a1a24f8ca
Do not allow glLinkProgram to succeed if only one shader type has been
attached to the program, GL allows this, but GLES2 does not.
added state tracking for program objects to check which shaders are
attached to the program object.
add a way to define object data type being held for each object in objectNameManager
ProgramData and ShaderParser are both valid objectData for objects in SHADER namespace
we need a way to determine object type to generate correct errors
Change-Id: Ic232549df0bb6daf6ec528cb039482cd68e896bb
This fixes the Windows build of the opengl emulation code.
The official is not broken because you still need to define
BUILD_EMULATOR_OPENGL=true in your environment to enable the
code to be built.
Change-Id: I527f305c8a09df2740a93736123935d480170ffb