This change turns GLcommon to be static instead of shared
library.
Removed the s_globalNameSpace static object from objectNameManager
and moved it to live inside the EglDisplay object which is shared
for all display space objects (GLESv1, GLESv2 and EGL).
Change-Id: I92fa71fb7cbac423c22b7188e8d9642a5fddf0d9
Some native types like NativeFBConfig and NativeContext are
internal to the translator implementation and should not
exist in the interface headers.
Moved those types from eglplatform.h into eglinternalplatfom.h
Change-Id: I6462a007de8c185deecbb9beebc343ca3626fd0c
Initialize the GLDispatch with dummy function instead of
NULL pointer in case the function does not present on the
host OpenGL library. Prevent ugly segfault when a call to
such function is made.
Change-Id: I3488e60e091af06273a5680accabb7fe30fab066
There are some differences between GLSL/ES and Desktop
GLSL. This change translate the GLSL/ES shader source
to be compatible with the desktop GLSL language.
Change-Id: Ia6fdd6a90944926adcf440299b9ea3a4500d1eb1
fixing bug in eglChooseConfig, there was no referer to
EGL_RENDERABLE_TYPE this caused the eglChooseConfig to fail
when an attribute EGL_RENDERABLE_TYPE was specified in
the attrib_list
Change-Id: Ib4635a55ef3cc0ff380e581d4a41602ddfd32f82
load necessary functions from gl dispatch for gles2
fix usage of global names in some functions
combine the shaders and programs namespace to one
Change-Id: I92bd90a91a5840fcceebd05ab06bebb65bb415a0
- Most of the fixes are about unhandled enums.
- Adding an unbindBuffer method to GLEScontext, and use it in the
glDeleteBuffers call, so a buffer is not considered bound after
it has been deleted.
- Handle the case where a call to glCompressedTexImage2D gets
NULL as its data (in which case the uncompressTexture function
should only calculate the output format, but not attempt to
uncompress the NULL data).
- A few segfaults.
Change-Id: I6a856ea6da1be3b15b41140d6383508a6803897c
This happened because the VALIDATE macros terminated the function prematurally.
Also clear the surface bindings from the previous context.
Change-Id: I33d587f5e877caa6ec651a04ff887e0c77a9d5f3
The main issue was that SmartPtr had an implicit cast to void*, returning its
internal pointer. This allowed writing unsafe code, since the internal pointer
could be handled without increasing its ref count.
So, removed this cast and fixed the various places which relied on it.
Also, fix two calls to "destroy" ahich should have been "markForDestruction".
The naming is not good, should probably change it in a later patch.
Change-Id: Idabc800e97649b2e2404fb7387d25deac70af62e
Replace the void* pointers with explicit pointers for EglContext, EglDisplay
and GLEScontext. Use forward declarations. This is to improve finding errors
in compile time rather than on run time.
Change-Id: Iaec3c36c1e12f36b37d34f68e9d8aa58ff1b30c0
This is the GLESv2 on top of openGL implementation on the host
most of this change is moving code which is necessary by both
GLES 1.0 and GLES 2.0 implementations from GLES_CM folder into
GLcommon folder.
GLESv2Imp - includes GLES 2.0 entry points implementation
Change-Id: I934fb963478a7f596d824612f847a5aa77d2ed9d
Note: this is a re-submit of Ie5111d9c435b64d205b140a79863c0273742ee7f,
fixed to avoid breaking the Mac build.
Change-Id: Ib534063d3f403d33d162956bf510baf9689a246a
This reverts commit 0bf6848571.
This commit breaks Mca builds:
development/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp: In function 'EGLBoolean eglChooseConfig(void*, const EGLint*, void**, EGLint, EGLint*)':
development/tools/emulator/opengl/host/libs/Translator/EGL/EglImp.cpp:412: error: 'PIXEL_FORMAT_INITIALIZER' was not declared in this scope
make: *** [out/host/darwin-x86/obj/SHARED_LIBRARIES/libEGL_translator_intermediates/EglImp.o] Error 1
This patch provides two useful changes to the ut_renderer
unit-test program:
1/ the ability to control the GL window dimensions with
two env. variables: ANDROID_WINDOW_WIDTH and ANDROID_WINDOW_HEIGHT
2/ the ability to save/restore the GL window position between
GL connections.
Both are useful to use ut_renderer in a demo setting, nothing more.
Change-Id: I19a8f911ee821ddc4eb6307de12d63600ff696b0
The previous changes replaced /system/lib/libGLES_emul.so with
several other libraries (lib{EGL, GLESv1_CM, GLESv2}_emul.so).
The clean step removes the old libGLES_emul.so from the build to
avoid any surprises.
Change-Id: I285b34c4d5f5a8bd3b37d9cb1b2da33fb155e62c
This patch modifies the guest libraries to use the new
fast qemu "opengles" pipe to communicate with the host
renderer process.
Note that the renderer is still listening on a TCP socket
on port 22468.
Change-Id: I6ab84f972a8024e1fdababa4615d0650c8d461bf
Conflicts:
tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
tools/emulator/opengl/tests/gles_android_wrapper/ServerConnection.h
This change fixes bugs in the encoder and decoder code generation
with nullAllowed flaged parameters
Change-Id: I7b196fbb41bbb2cfaa429e7c1dde3a415778ee51
Ensure a server connection creation on make current, for cases where
the context and surface was created on a seperate thread.
In addition this commit publishes all the surface as ES2 capable
if queried.
Change-Id: Ie415b8ab3e370fa7fe97a526276e333aaa5e9e8b
Handle GLESv2 rendering in the emulator:
* load and initialize GLESv2 encoder library
* hide request for GLESv2 surfaces and contexts from the emulator
native implementation
* communicate the context/surface version configuration to the rendering
server
Change-Id: I9226275fc4a24983767735bdf19ddafbe9d07f34
Make the unit test renderer (ut_renderer) encode GLESv2 commands.
A rendering thread has both V1 & V2 decoder object, and tryies to decode
commands of the two protocols from the stream.
Context creating is taking into account the API version and creates context
accordingly.
Decoder data is shared between the V1 & V2 decoders and applied to both of
them on makeCurrent (regardless to the requested context version)
Change-Id: If78e84310e5dcd22108c19656051b138b22e3c9f
glShaderSource strings are concatenated into a single string
before sent over the wire protocol. The wire protocol transfer is
done using a special api call 'glShaderString'
Change-Id: I90c157df66fe82fee17c460a1e7852d370c77088
Shader strings are sent over the wire protocal as one concatenated
string. a special api call - glShaderString is used to handle the
encoding and decoding of this string.
Change-Id: Id682763f35e9fcc6215559931db2112a4fa981a9
Use seperate EGL_emul, GLESv1_CM_emul and GLESv2_emul implementation
libraries. This replaces GLES_emul that was prviously included
EGL and GLESv1.
This change enables the wrapper to support GLESv2. However,
this current EGL implementation uses the native android emulator
EGL thus will not expose this GLESv2 capability.
Change-Id: Ib0a309d71cce1248efe9a08aa59434101d0ac607
Add functionality to generate a wrapper library. A wrapper library includes:
1. entry points
2. dispatch table (accessed from the library entry points)
3. dispatch table accessor callback
4. dispatch table initialization function
Note that the dispatch table initialization function used to be part of the decoder. This
change moves it to be part of the dispatch table layer where it belongs.
Change-Id: Ide6764a17cc029056f9946e778a513cdc2a49003