Commit Graph

7343 Commits

Author SHA1 Message Date
David Turner
95d6192bb0 Merge "fixing bug of shadowing a variable" 2011-07-03 05:43:57 -07:00
David Turner
0f1ceaf231 Merge "opengl renderer: Enable and fix renderer Mac support" 2011-07-03 05:43:25 -07:00
Amit Feller
223a949d1d opengl Translator: adding type EGLNativeSurfaceType
for supporting & storing spesific OS data of the surfaces
for example on Windows platform it is needed to save for each windowSurface
the HWNDL & HDC of the native window, this change caused changes in the EglOsApi
interface
2011-07-03 15:40:52 +03:00
Amit Feller
cdc5179b90 EGL translator: fixes shared context on windows
On windows it is not possible to create a context which
shares with another context if the other context is already
current to some thread.
This change makes the "global context" be a dummy context
on windows which we create during the first createContext
call, this dummy context will never bind to any thread so
it is safe to share with it at any time.
2011-07-03 15:40:52 +03:00
Amit Feller
15680c5e69 OpenGL renderer: handling subwindow messages
On windows we need to have a thread on the renderer process
which handles windows messages sent to the subwindow
we are creating during framebuffer initialization.
We run this message pump in the main renderer thread
and the server listener on a seperate thread.
2011-07-03 15:40:52 +03:00
Amit Feller
4672adab3f fixing bug of shadowing a variable 2011-07-03 15:40:52 +03:00
Guy Zadickario
b68a421908 opengl renderer: Enable and fix renderer Mac support
The following enables the renderer build on darwin.
Moved platform specific type declarations from render_api.h
to render_api_platform_types.h so it can be included from the
objective c code.
Fixed subwindow to use EmuGLView which overrides NSView to prevent
background drawing of the view.
2011-07-03 15:40:52 +03:00
David Turner
2683b10bdd Merge "opengl translator: Mac fixes for unbind context" 2011-07-03 05:39:05 -07:00
David Turner
5b701a2972 Merge "GLES2 translator:" 2011-07-03 05:38:00 -07:00
David Turner
fe3de568e6 Merge "System egl: fix eglInitialize" 2011-07-03 05:37:17 -07:00
David Turner
e1b8d54368 Merge "opengles Translator: Omit precision macros from shaders" 2011-07-03 05:36:46 -07:00
Guy Zadickario
25f01dda07 opengl translator: Mac fixes for unbind context
Mac specific bug fix to support unbinding a context.
Removed NSOpenGLContext:clearDrawable call before binding
an NSView to the context to avoid re-paint of the view which
causes flash effect.
2011-07-03 15:35:12 +03:00
Liran
c3fb532e9a GLES2 translator:
the dispatch loaded incorrect functions from GL for framebuffer extension
the functions used belong to GL3, and didn't work with GL2 context
fixed this to use the EXT functions from GL
2011-07-03 15:35:12 +03:00
Liran
2782c5a061 System egl: fix eglInitialize
fix eglInitialize to accept NULL in major/minor parameters
2011-07-03 15:35:12 +03:00
Stas Gurtovoy
304a1c21ca opengles Translator: Omit precision macros from shaders
The shaders fail to compile if we don't omit those changes (Cordy game for example).
Anyways, they have no semantic meaning in GLSL, quote for GLSL 4.1 spec:
"Precision qualifiers are added for code portability with OpenGL ES, not for functionality. They have the
same syntax as in OpenGL ES, as described below, but they have no semantic meaning, which includes no
effect on the precision used to store or operate on variables."
Also removed an anoying print in the encoder.
2011-07-03 15:35:11 +03:00
David Turner
5d0b85f029 Merge "opengles host: some order in host gl debugging" 2011-07-03 05:33:08 -07:00
David Turner
b519642209 Merge "opengles emulator: Init eglError to EGL_SUCCESS" 2011-07-03 05:32:20 -07:00
David Turner
1c06aa5a4e Merge "egl translator" 2011-07-03 05:31:53 -07:00
David Turner
9e144ad845 Merge "add gles includes to the translator" 2011-07-03 05:30:48 -07:00
Stas Gurtovoy
440eb6e594 opengles host: some order in host gl debugging
Removed some debug prints in translator.
Added (remarked) options to enable gl debugging in decodes/renderer
2011-07-03 15:28:01 +03:00
Stas Gurtovoy
5d355b71c5 opengles emulator: Init eglError to EGL_SUCCESS 2011-07-03 15:28:01 +03:00
Liran
8fa554f35b egl translator
fix infinite loop in egl translator
2011-07-03 15:28:01 +03:00
Liran
ccc72aa1bb add gles includes to the translator
those are up-to-date gles header files from khronos so that
host applications will be able to compile with the translator
with no dependencies. The translator now exports both egl/gles
headers and their implementation libraries.
2011-07-03 15:28:00 +03:00
David Turner
902b2ea353 Merge "Translator GLES2: fix glGetShaderSource" 2011-07-03 05:25:52 -07:00
David Turner
6a2aa7d7f3 Merge "Make sure RGB_565 config is available to emulator" 2011-07-03 05:24:47 -07:00
David Turner
6930d6100a Merge "opengles renderer: added CHECK_GL_ERROR defie for gl debugging" 2011-07-03 05:24:11 -07:00
David Turner
2014405484 Merge "opengles Translator: sort conformant configs first" 2011-07-03 05:23:25 -07:00
Liran
74871cf4f1 Translator GLES2: fix glGetShaderSource
fix glGetShaderSource to return the currect string
2011-07-03 15:21:48 +03:00
Yochai Shefi Simchon
5ec953deef Make sure RGB_565 config is available to emulator
There are Android applications (notably BootAnimation) which require
exactly an RGB_565 configuration, and are not satisfied by an e.g.
RGBA_8888 configuration. This doens't make too much sense, and I think
such apps should be fixed.
However, until that happens, there is an issue when the host does not
have an RGB_565 FBConfig, which is typical to many OpenGL implementations.
In such cases, BootAnimation doesn't run.
The workaround is to add an RGB_565 config to the list maintained by the
translator, which is basically an 888 config in disguise.
2011-07-03 15:21:48 +03:00
Stas Gurtovoy
170eb97393 opengles renderer: added CHECK_GL_ERROR defie for gl debugging
This commit add CHECK_GL_ERROR define to decoders/renderer which enables various
glGetError() calls. Also changed emugen to add glGetError() after every dispatch call (based on
defintion of CHECK_GL_ERROR). Also cleaned some annoying printf's.
2011-07-03 15:21:48 +03:00
Stas Gurtovoy
3034c35701 opengles Translator: sort conformant configs first
When sorting configs, we want the conformant ones first.
This also makes Wave Blazer Lite work - specifically by placing a non
conformant config (rgba=0) at the end of the list.
2011-07-03 15:21:48 +03:00
David Turner
f5c108a877 Merge "opengl renderer: create rendering subwindow" 2011-07-03 05:20:05 -07:00
David Turner
deebe1a62b Merge "opengl renderer: windows runtime fix" 2011-07-03 05:17:59 -07:00
David Turner
76e5815193 Merge "opengl translator: EGL Windows bug fix" 2011-07-03 05:17:22 -07:00
David Turner
2dc5560581 Merge "opengl translator: fixing 2 Windows EGL issues:" 2011-07-03 05:16:39 -07:00
Amit Feller
1d3f5f58ce opengl renderer: create rendering subwindow
The application provides the window handle to which the
OpenglRenderer should render to however only a sub-region of
this window needs to be rendered. This change adds this functionality
by creating a native child subwindow into which rendering will happen.
2011-07-03 15:14:59 +03:00
Amit Feller
31580f42b1 opengl renderer: windows runtime fix
Need to initialize networking by calling WSAStartup
in the renderer process.
2011-07-03 15:14:59 +03:00
Amit Feller
950192dbe3 opengl translator: EGL Windows bug fix
Fixed bug caused the creation of context
without setting it's pixel format.
Also removing unnecessary printfs.
2011-07-03 15:14:59 +03:00
Amit Feller
6adfa495ba opengl translator: fixing 2 Windows EGL issues:
- runtime segfaults
- pbuffer creation
2011-07-03 15:14:58 +03:00
David Turner
2a22352982 Merge "1.1 Translator: fix conversion of compressed textures" 2011-07-03 05:12:53 -07:00
Yochai Shefi Simchon
03d0055dc9 1.1 Translator: fix conversion of compressed textures
There were several bugs in the code converting palleted textures into
RGB/RGBA - fixed.
2011-07-03 15:08:42 +03:00
David Turner
76580a4381 Merge "1.1 Translator: fix drawing of GL_POINT_SIZE_ARRAY" 2011-07-03 05:05:55 -07:00
David Turner
4ca8cd8582 Merge "1.1 Translator: fix bug in glDeleteTexture" 2011-07-03 05:04:57 -07:00
David Turner
450b32be2d Merge "1.1 Translaotr: handle glGet(POINT_SIZE_ARRAY)" 2011-07-03 05:04:30 -07:00
Yochai Shefi Simchon
747b20cf9d 1.1 Translator: fix drawing of GL_POINT_SIZE_ARRAY
When translating point size arrays from GLES to GL, an optimization
was implemented where all points of the same size in an array or elements
array where drawn together. This is wrong, since it means points
are not drawn in the order the app has requested, creating the wrong
result when points in the array are overlapping in screen space.
So removed this mechanism, and now just drawing the points in the right
order.
Some optimization is still there, where if there are several
consecutive points of the same size they are drawn together.

The change in GLEScmImp.cpp is only to make the condition more readable -
the functionality is identical.
2011-07-03 15:03:25 +03:00
Yochai Shefi Simchon
0b5684abbd 1.1 Translator: fix bug in glDeleteTexture
When glDeleteTexture is called for the currently bound texture,
binding should be reset to 0.
Also, calling glDeleteTexture on 0 should do nothing.
2011-07-03 15:03:25 +03:00
Yochai Shefi Simchon
fbae5aacb0 1.1 Translaotr: handle glGet(POINT_SIZE_ARRAY)
Should be handled internaly, like all other ARRAY queries.
2011-07-03 15:03:25 +03:00
David Turner
1fb2e92816 Merge "1.1 Translator conformance: fix texture issues" 2011-07-03 05:00:55 -07:00
David Turner
a48c6f24f5 Merge "opengl translator: fixed glGetString(GL_EXTENSIONS) for GLESv2" 2011-07-03 05:00:06 -07:00
David Turner
e5dfc06819 Merge "Translator 1.1 conformance: fix ARRAY related gets" 2011-07-03 04:59:38 -07:00