Commit graph

353 commits

Author SHA1 Message Date
Nigel Stewart
39a386c369 Revert "Consolidation of various GL context limits into RegalEmu.h and ContextInfo"
Due to performance regression in Emu::Iff

This reverts commit b92e6bb26a.
2013-09-06 12:08:08 -05:00
Nigel Stewart
b92e6bb26a Consolidation of various GL context limits into RegalEmu.h and ContextInfo
Improved array bounds checking for emulation
More querable states for GL database
2013-09-06 09:40:29 -05:00
Nigel Stewart
89ff20c375 Fixes for Android
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
2013-08-30 18:57:56 -05:00
Nigel Stewart
5157da1820 Emscripten now working for dreamtorus.
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.
2013-08-23 09:49:09 -05:00
Nigel Stewart
22e2bc95ce Merge snations branch 2013-08-23 09:44:42 -05:00
Nigel Stewart
89dfc6fce8 Touch-ups, mostly for emscripten. 2013-08-15 14:08:33 -05:00
Nigel Stewart
7eedcd0443 Merge branch 'master' of https://github.com/vvuk/regal 2013-08-15 13:56:11 -05:00
Vladimir Vukicevic
ff09ad3190 Fix emscripten config; make dreamtorus work 2013-08-12 16:15:29 -04:00
Ben Pye
80d46c8f7d Make it build on VS2013 2013-08-10 16:28:02 +01:00
Nigel Stewart
41f9b271b0 Consolidation of environment variable queries at runtime.
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
2013-08-09 16:54:25 -05:00
Scott Nations
d4065e8033 New version of RegalPpca based on RegalClientState.h 2013-08-05 20:46:49 -05:00
Nigel Stewart
b1128f1a0c Reorganize Makefile build into a more modular scheme.
Cleanup of RegalDispatchTraceExclude.py for better clarity / TODO purposes.
2013-08-05 14:58:34 -05:00
Nigel Stewart
8969282b18 Add GL_ARB_multi_bind
Merge and harmonize src/apitrace with upstream
Merging Emscripten changes from Vladimir Vukicevic, except Makefile
More entry points for RegalDispatchGMock
2013-07-26 10:36:56 -05:00
Vladimir Vukicevic
756b3c4bc3 Implement some GL_FOG getters 2013-07-24 15:30:57 -04:00
Vladimir Vukicevic
11d3600690 More EMSCRIPTEN/webgl fixes 2013-07-24 15:30:57 -04:00
Vladimir Vukicevic
8524da1f65 Update core sources for Emscripten/WebGL 2013-07-24 15:30:57 -04:00
Vladimir Vukicevic
e12d8152f8 Update scripts and generated sources for Emscripten
- Add REGAL_SYS_EMSCRIPTEN and REGAL_SYS_EMSCRIPTEN_STATIC defines
- Guard extension static EGL entry points on non-EMSCRIPTEN
2013-07-24 15:30:42 -04:00
Vladimir Vukicevic
9baf0efc39 Add unsigned_length() for EMSCRIPTEN in boost/print/detail.hpp 2013-07-24 15:30:42 -04:00
Vladimir Vukicevic
97d0fd3f06 Update Makefiles to support Emscripten
- Use BIN.SUFFIX instead of BIN_EXTENSION for consistency
- Don't build static/shared lib if the filename isn't specified
- Examples should depend on static lib if shared isn't built
- Allow overriding release-mode defines for LOG/TLS
- Add SYSTEM=emscripten config
2013-07-24 15:30:42 -04:00
Nigel Stewart
d1c422ac11 Add OpenGL 4.4 support
Update GLEW to 1.10.0
2013-07-22 13:08:39 -05:00
Nigel Stewart
b79468111a Initial integration of apitrace as Regal dispatch layer
http://apitrace.github.io/
Update current context only when MakeCurrent call succeeds
Check parsed ES version number
2013-07-21 23:51:29 -05:00
Nigel Stewart
47bbe699cd Add Regal support for GL_ANGLE_timer_query and GL_INTEL_map_texture
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
2013-07-17 16:40:10 -05:00
Nigel Stewart
917b7726b7 Add GL_R and GL_RG formats from ARB_texture_rg and EXT_texture_rg
ARB_multitexture emulation for ES 2.0
2013-07-10 14:21:57 -05:00
Nigel Stewart
20b5c5379d Extend RegalPlugin to provide name based lookup.
Regal.h touch-ups for harmonizing with apitrace.
API database support for maps of per-platform types.
2013-07-06 00:17:05 -05:00
Nigel Stewart
b3a8796961 Leave Doxygen-generated documentation out of git repository. 2013-06-29 18:59:05 -05:00
Nigel Stewart
6d683dd297 ARB_draw_buffers emulation for ES 2.0
glReadBuffer emulation for ES 2.0
JSON support for hint emulation layer.
2013-06-29 18:56:47 -05:00
Igor Chernyshev
908d2b2164 Initialize TexenvCombineState to proper defaults.
Without correct defaults some combinations miss texture data.
For example the following sequence of calls will fail to produce
RGB colors upon rendering:

  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE)
  glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE)
  glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_PRIMARY_COLOR)

The spec tells that correct defaults are:
  mode=GL_MODULATE
  src0=GL_TEXTURE
  src1=GL_PREVIOUS
  src2=GL_CONSTANT

See pages 185 and 279 at http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf

Also updates paths in README.
2013-06-26 12:18:59 -07:00
Nigel Stewart
29115d6b88 Extend emulation dispatch to hinting.
GLEW refresh (w.r.t opengl.org)
Some GL API harmonization with apitrace.
Add Regal support for GL_SGIX_ycrcb
Further GL_REGAL_enable support for glEnable/glDisable of dispatch layers.
DSA emulation moved to downstream of Regal::Emu::Iff
Trace dispatch fixes for WGL
Support for REGAL_TRACE_FILE setting, and JSON property.
Tidy-up of Regal::Emu::Filt
2013-06-25 14:22:53 -05:00
Igor Chernyshev
e53bf69f15 Update uniforms after glColor().
The updates were not propagated because Iff::UpdateUniforms()
did not think that there was a change.
2013-06-24 05:04:48 -07:00
Nigel Stewart
1c72872ed1 Enable GL_CLAMP on ES2.0/3.0 and core GL contexts by remapping to equivalent GL_CLAMP_TO_EDGE
Add emulation support for glInterleavedArrays().
Add emulation support for DSA VertexArray*OffsetEXT routines.
RegalUtil.h namespace macros moved to RegalNamespace.h
2013-06-20 12:26:56 -05:00
Nigel Stewart
0718c4428b Initial Doxygen generated Regal manual - work in progress. 2013-06-20 12:20:57 -05:00
Nigel Stewart
be8dc8b892 Emulation support for DSA gl(Enable|Disable)VertexArrayEXT and VertexArrayOffset commands.
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.
2013-06-15 08:52:59 -05:00
Nigel Stewart
f649ec6e0e Android build fixups - not linking snappy and apitrace yet. 2013-06-06 09:50:51 -05:00
Nigel Stewart
0c089bf5bc DispatcherGlobal added for global (GLX/WGL/EGL) API dispatch layering.
Work-in-progress: apitrace dispatch layer for Regal, not enabled yet.
Added All.sln for VC10 purposes.
2013-06-05 23:06:03 -05:00
Nigel Stewart
1105d274ad Initial implementation of statistics gathering dispath. REGAL_STATISTICS=1
FreeGLUT refresh.
RegalClientState functionally complete.
2013-05-30 07:13:53 -05:00
Nigel Stewart
21ad75c27b Revamp TLS (thread local storage) for storing more than context pointer per thread.
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
2013-05-26 14:19:58 -05:00
Nigel Stewart
1f4c135d78 Add google snappy compression library sources, for apitrace purposes.
GLX: __GLXextFuncPtr
Code dispatch refinements.
Fixups for iOS XCode projects.
2013-05-22 18:42:49 -05:00
Nigel Stewart
41d5cb4f2c Merge branch 'add_glibc' of git://github.com/sbc100/regal 2013-05-22 18:38:56 -05:00
Nigel Stewart
425835f81a Remove stale dreamtorus VC project. 2013-05-21 11:11:59 -05:00
Sam Clegg
64d847d9e1 [NaCl] Add glibc support 2013-05-17 21:51:39 -07:00
Nigel Stewart
a2368ee9ed Update ES 2.0 extensions.
Cube map support for texture caching.
Improved ES 2.0 API filtering.
Fix for MAX_TEXTURE_SIZE and SUBPIXEL_BITS queries.
Improved logging for glSamplerParmeter calls.
2013-05-16 18:11:30 -05:00
Sam Clegg
cde67856d1 [NaCl] Fix warnings in ARM build 2013-05-16 15:09:44 -07:00
Lloyd Pique
370eb43e04 Fix a typo I introduced.
I accidentally reversed the intended logic. Switch a not-equal
comparison to an equality check.
2013-05-13 17:12:31 -07:00
Nigel Stewart
4b3cc1c0d1 Further Regal::Emu::Ppa refinements.
Initial glRect emulation layer.
Fixes.
2013-05-10 16:03:02 -05:00
Nigel Stewart
ced1ce161a Merge commit '3ee34c803dfffb8d2b187ed1bff1fc6ab9ca884f' 2013-05-10 15:55:00 -05:00
Nigel Stewart
95923523f4 Merge commit 'dcbd54385de2bd675419b10d0ef3cb2e64826ca4' 2013-05-10 15:54:37 -05:00
Cass Everitt
ff8d7c145f proposed fix for issue #78 - bypass Regal IFF when a non-zero PPO is bound 2013-05-08 15:09:29 -05:00
Cass Everitt
f0f9bf4d3a silence debug marker push/pop Info() messages 2013-05-08 14:48:06 -05:00
Lloyd Pique
3ee34c803d Fix some glErrors under Pepper GLES
Eliminate some errors being reported when running under the Pepper
implementation of GLES.

1) With 8 vertex attributes allowed, RegalIff.cpp was passing in 99
   (RFF2A_Invalid) for the index of the SecondaryColor attribute,
   presumably from RFF2AMap8. Added a check for Invalid before
   binding the attribute.

2) Pepper GLES does not allow client side array data to be passed in via
   glVertexAttribPointer without an ARRAY_BUFFER being bound, and will
   generate an error if it is done. There were two places in the code where
   this could happen.

   * In Iff::Cleanup() the code was calling glVertexAttribPointer directly to
     reset state to default values with no ARRAY_BUFFER bound.

   * In RegalPpca when popping the client vertex array state, the code makes
     calls to the fixed function glVertexPointer, glNormalPointer, etc, which
     are then translated to calls to glVertexAttribPointer

   For both cases, I added some checks to detect PepperGLES, and avoid calls
   to reset the client vertex array state when non ARRAY_BUFFER is bound.

Tested by building and running the unit tests under osx/darwin x86_64,
and under nacl_x86-64 and nacl_i686 (on Linux). Tested more fully with
an integration test framework on nacl_i686 for our application which
will is set to fail for any detected GL errors.
2013-05-07 12:11:47 -07:00
Lloyd Pique
dcbd54385d Cleanup build warnings
Mostly in the tests there were warnings about unsigned/signed comparison
mismatches.

Tested under gcc, nacl-i686, nacl-x86-64
2013-05-07 11:45:29 -07:00