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 change fixes bugs in the encoder and decoder code generation
with nullAllowed flaged parameters
Change-Id: I7b196fbb41bbb2cfaa429e7c1dde3a415778ee51
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
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
This fixes several issues when building the host libraris on Darwin.
Note that there is still not proper implementation of backend functions.
Change-Id: I3ba4120df6545a8c2aa62fdfcaadaf5ff4972456
This is the EGL implementation for the host EGL/GLES translator.
EglImp.cpp - includes the EGL entry points implementation.
ThreadInfo.cpp - defines the per-thread info which is shared to EGL and GLES
EglOsApi.h - platform dependant interface functions.
EglLinuxApi.cpp - implements the GLX platform of EglOsApi
EglWindowsApi.cpp - implenents the Windows platform of EglOsApi - This has not been compiled yet!!!
Change-Id: I30a8cf457858ef04febf67005787d8d18e5e7a70
This is the GLESv1 on top of OpenGL implementation on the host.
GLDispatch - dispatch table to host OpenGL implementation.
GLESimp - includes GLES entry points implementation.
Change-Id: Ief5eac2253a5a98b75a5d76363a36b7587d17391
This fix adds support for OpenGLES 1.1 extensions in the codec
layer. This fix also includes bug fixes in GLEncoder (client-state)
and gles android wrapper modules.
Change-Id: I512649724d43e4af9d3ce5d49ae66d9f4da0b823
This is the host renderer executable. It is a small process which
just calls into libOpenglRender library. The process is invoked
through the initOpenGLRenderer function of libOpenglRenderer.
Change-Id: I85af075b5eb751ffb9543ecbd8e7fc155054f146
This is a library which includes all the OpenGL renderer functionality,
it is packaged in a library so that both the renderer process and the emulator
program will be able to use that functionality.
NOTES:
1) gl_proc.h and GLDispatch.{h,cpp} in this commit will be replaced
with the decoder auto-generated dispatch in a later commit, the
auto-generated dispatch is currently missing some extension functions
required for the renderer.
2) look at host/include/libOpenglRender/render_api.h for the external
interface defined for this library (to be used by the emulator).
The following is a description of each component:
FrameBuffer - The main object which manages the framebuffer and color buffers.
This is a singleton which get initialized through its initialize
static function. It initializes the OpenGL renderer and must be
called first. This initialization function is not thread safe so
it must be called before any thread that is calling to this
library is created.
FBConfig - Includes a static set of configs supported by the renderer which get
initialized during FrameBuffer initialization phase. Also,
an instance of this class includes the a description of one frame
buffer configuration supported by the renderer.
RenderContext - encapsulate a rendering context state.
ColorBuffer - implements a color buffer object as a texture which can be bind
as render target or source.
WindowSurface - implements the functionality of a native window which can be
bound to a rendering context and its target ColorBuffer can
be specified and replaced.
ThreadInfo - holds per-thread information.
EGLDispatch - loads the EGL plugin library, all egl calls are made through
this dispatch table which get initialized during initialization
phase.
GLDispatch - loads the GLES plugin library, all GLES calls are made through
this dispatch table which get initialized during initialization
phase - This will be replaced by the auto-generated code of the
decoder ...
RenderThread - implements a thread that reads command tokens from an IOStream
and decode it.
RenderControl - implements the host side implementation of the renderControl
API, when a renderControl token is decoded from the stream
it is dispatched to this implementation.
RenderServer - implements a TCP server which listens to port number and
launcges a RenderThread for each new connection.
Change-Id: I9f34d17bdfcb715893a13cd30086c767f499df87
That adds the renderControl API encoder/decoder which is used for
guest to host control commands. See system/renderControl_enc/README
for more info about the API itself.
Change-Id: I2c72803137889d646fbb3d2a56ecdcf94b088f40
This change includes four changes:
1) moved IOStream.h into host/include/libOpenGLRender, this directory
will include the api interface into the libOpenGLRender which will be
used later by the emulator and we need this interface to use IOStream.h
2) Updated Andorid.mk files to include the new directory location of IOStream.h
in the LOCAL_C_INCLUDE.
3) Added new function "read" to IOStream which reads a message without a givven
size.
4) Updated TcpStream to use "cutils/sockets.h" instead of using directly the socket api for portability reasons. (It now compiles on windows as well).
Change-Id: I30eb40c8dcd5aacf0d993aff9cdb90b283b12dde