Added support for glArrayElement(EXT|) to the immediate mode layer.
Support NUM_EXTENSIONS in glGet(Integer|Float|Double|Boolean|Integer64)v(EXT|)
Added interception for glGetStringi and glGetIntergerv
Improve loading of GLES and EGL libraries on Android
Various bug fixes...
Merged pull requests:
#131 NaCL Pepper now uses GLES2 prefix for ES2.0 functions, rather than gl
#130 Copyright bump to 2014
#129 NaCL-related build tweaks for regaltest, nacl example and pnacl.
#128 GLEW refresh
#126 boost::print fix for mapping 'long' and 'long long' to 32-bit or 64-bit for length purposes
#125 Resolve clang compilation error: lookup of 'Depth' in member access expression is ambiguous
#124 Add Makefile support for gcc-4.4, gcc-4.6 and clang toolchains on Linux.
#116 Make it compile with Visual Studio 2013 (VC12)
Major enhancements to the state web server.
Added state-based shader instancing to avoid recompiles.
Fixed issue #113 - Possible bug with REGAL_STATISTICS
Corrected handling of GL_POINT_SIZE_MAX state in RegalState.
Refreshed apitrace, civetweb, libpng, and GLEW from upstream.
Update googletest sources
Add ContextInfo support for GL 4.3 and 4.4
Improved Ppca test coverage
Added logging for Regal API methods
Improved layer enable/disable logic in RegalContext
JSON parser updates
Makefile build of tiger example added
Using scoped_ptr for RegalContext data
Initial scaffolding for GLX emulation on EGL/WGL/CGL.
Ppca refinements.
Add GL_NV_blend_equation_advanced and GL_NV_blend_equation_advanced_coherent support.
RegalX11.cpp added for fake X11 purposes for GLX emulation.
GLEW refresh.
Fixups for REGAL_SYS_EMSCRIPTEN_STATIC mode.
ARB_texture_cube_map and EXT_texture_cube_map for ES 2.0
IFF emulation improvements
Emscripten build improvements
Update zlib to version 1.2.8
Update libpng to version 1.6.3
Update mongoose to version 3.8
GLEW refresh to Sourceforge top-of-tree
Codegen refinement - sort enums by name for switch statements, etc
ARB_multitexture emulation for ES 2.0
(ARB|EXT)_texture_env_combine and (ARB|EXT)_texture_env_dot3 for ES 2.0
Initial implementation of Draw*Elements*BaseVertex* emulation.
IBM_texture_mirrored_repeat extension emulation for ES 2.0.
Use REGAL_CALL for GLDEBUGPROC* function typedefs.
Fix logging of string in glNamedProgramStringARB.
Fix logging of commands with ref and mask.
Add RegalPlugin private API for plugin dispatch layers to call back into Regal.
Resolve snappy library Windows compilation warnings.
Improvements for filtering emulation.
Support EXT_framebuffer_object on ES 2
Python is not a Java - no need to use classes where
they are not needed. The __main__ convention makes
it easier to locate entrypoints for experienced
Python users, and also allows to use Export.py as a
library.
Extend GL database to list per-extension information
EmuFilter layer - selective ES 2.0 filtering
Increase the strictness of emulation regex matching - must be unique
Initial implementation of JSON output
* Integrate Google Mock (at their trunk SVN revision 410 --
http://code.google.com/p/googlemock/source/detail?r=410). Note only
a subset of files are included (things like the LICENSE file, the include/
directory, and the src/ directory)
* Revise the build rules for libgtest. Just compile gmock-all.cc, and
also compile gmock-all.cc to build a libgtest that includes both
Google Test and Google Mock. Initially I had a separate library, but
I didn't think it made sense to keep them separate.
* Add a RegalDispatchGMock.py dispatch generator, which generates
test/RegalDispatchGMock.cpp/.h, which in turn takes the C style
functions used by the Regal dispatch table and turns them into calls on
a Google Mock implementation. Modifies scripts/Export.py to know about
a test source code directory, and to invoke the new code generator.
* Add testRegalState.cpp which requires Google Mock work correctly, and
which adds a simple test that Regal::State::Depth::Set() invokes
the right series of calls in the dispatch layer in order to set a new
depth state.
* Remove the demonstrative test I added to tests/test_main.cpp, as there
are now many tests and this one was not valuable beyond the "Google
Test works" stage.
* Fix the null build. `make` and then `make` immediately afterwards
was rebuilding libraries since the libraries depended on the lib/
subdirectory, but that directory ended up with a modification time
later than that of the library, causing make to think it needed to
build the library again on the next round. Likewise there were
dependencies on bin/ for things that were then built into bin/.
Rather than having a rule `bin: mkdir -p bin`, I modified other
rules to do a `mkdir -p $(dir $@)` to ensure the destination
directory existed before running the linker or archiver.
* Fix a few other dependency issues I uncovered when doing `make clean
&& make -j20`, where some libraries were being used before being
built.
Caveats -- Please read!
1. Google Mock does quite a bit of code generation through its macros
and templated implementation. RegalDispatchGMock.cpp can take
minutes to compile, due to the size of the API. On my machine,
the output .o file is a huge 24 megabyte binary.
2. The incremental compile time is also unfortunately a bit large.
Touching testRegalState.cpp means reading and expanding the macros
in RegalDispatchMock.h, which takes tens of seconds to do.
Unfortunately with the way that Google Mock interfaces are defined,
there is no seperation of the mock interface from its
implementation. All tests that include RegalDispatchMock.h will
incur overhead in expanding macros and setting up class data for the
full API.
3. Google Mock by default only supports functions with at most ten
arguments. There were a handful of functions that are larger than
this in the dispatch interface. I chose to set up the code
generator to silently ignore these calls rather than forwarding
them to the generated mock interface.
Google Mock contains a number of .pump files which define a default
call arity of 10, and it is perfectly possible to invoke
googletest/scripts/pump.py to regenerate these files to allow for a
larger arity, but I felt that keeping the default for now was fine.
Regal looks like it needs an arity of 15 if all functions are to be
mocked.
A patch for issue #31.
Under an GLES2 API (and specifically Pepper implementation of GLES2),
calls to glTexSubImage2D may be required to use a type and format for
the new data that matches the underlying texture type/format, so that
the GLES2 implementation is a simple, straight copy of the data.
This means that in order for Regal to emulate the less strict OpenGL
interface, it must perform texture format conversions when calling a
GLES2 backend.
This patch adds such an emulation recipe, that:
1) Shadows the state of textures, so that Regal knows the underlying
formats, and
2) On a call to glTexSubImage2D, if the caller is passing something that
doesn't match the underlying texture format, Regal will handle the
conversion.
This patch makes a few assumptions that may need to be relaxed with
further changes:
* Only OpenGLES 2.0 compatible texture types and formats are supported.
GL_BGRA and GL_UNSIGNED_BYTE_3_2_2 for example, while easy to add, are
not. Other more general OpenGL formats could be added to, with a bit
more work.
* As per the GLES2.x spec, only GL_UNPACK_ALIGNMENT is assumed to be
relevant.
* To avoid a combinatorial explosion, all texture conversions are too
and from a simple GL_RGBA, GL_UNSIGNED_BYTE intermedate format.
RegalSo optimizations.
Merged GLX/EGL and GL/GLES entry-point loading for Linux. x86, x86_64 and ARM.
GLenum to string conversion refinements, prefer non-extension, ARB, KHR and so on.
GL spec database entries for maxSize of input parameters. (vs output size)
PPAPI is an API which contains GLES2 calls. The Chrome plugin,
on the other hand, could be NaCl-based or Trusted (for Windows,
Linux and perhaps Mac). So, the API name (PPAPI in our case)
is somewhat orthogonal to the target platform.
See https://github.com/p3/regal/pull/30
Initially supporting single-threaded operation only.
Uses Regal::shared_map and Regal::shared_list alternatives to std::map and std::list.
RegalShareContext API added for grouping OpenGL contexts that share state.
RegalDestroyContext API added for releasing per GL context Regal resources.
Some consolidation of threading code into RegalThread.h
Refresh mongoose sources from github
Resolves MS compiler warnings by casting double to float for remapping.
Regal.h refinements
Initial GLX enum support for RegalToken.h
Do checking in RegalDispatchEmu.cpp to avoid invalid glEnable/glDisable calls.
Tag ES 2.0 defines with .esVersions = [ 2.0 ]
Support per-function re-mapping to ES2.0 API - for example glClearDepth -> glClearDepthf
NaCL dreamtorus added.
Re-do ES2 dispatch table initialization.
eglMakeCurrent calls RegalMakeCurrent.
Avoid crashing if Regal::GetProcAddress points to Regal entry point. (oops!)
README.rst updates - REGAL_NO_TLS, etc.
Rename GL_REGAL_enable GL_LOADER_REGAL to GL_DRIVER_REGAL
Compile-time support for REGAL_DRIVER.
Add support for compile-time REGAL_EMULATION=0 to compile-out emulation support.
Add support for REGAL_EMULATION environment variable - replaces REGAL_NO_EMULATION.
Initial GL_REGAL_enable infrastructure for runtime glEnable/glDisable control of Regal features such as error and debug checking.
Add support for REGAL_NO_TLS compile flag.
GLEW refresh.
Public domain license for dreamtorus example code.
Extend GL_REGAL_log extension to support callback function for output.
Consolidate glBegin/glEnd state tracking into RegalContext.
glBegin/glEnd indentation for logging.
GLEW refresh for GL_REGAL_log.
Optionally reduce binary size by use of REGAL_LOG=0, REGAL_DEBUG=0 and REGAL_ERROR=0 at compile time.
Fix for GL_TRIANGLE_FAN emulation buffer restart.
Fixes for environment variable handling for REGAL_LOG, REGAL_DEBUG and REGAL_ERROR.
Resolve zero-size glBufferData/glDrawArrays calls.
Cleanup minimal win32 dreamtorus example code.
GL_KTX_buffer_region functions do not have EXT suffix.
Workaround for gdi32 SetPixelFormat without opengl32.dll loaded.