Commit Graph
29 Commits
Author SHA1 Message Date
baldurk bda809f9dc Allow GL driver to switch current contexts when really necessary 2014-12-06 20:25:48 +00:00
baldurk d30ce5d6b2 Fixes for replay, and populating hooks (call through hooked func) 2014-12-03 18:16:06 +00:00
baldurk 185df924dc Use proper wglGetProcAddress hook 2014-12-03 16:52:37 +00:00
baldurk 2f48158a89 Add some extensions that we already support, and ARB func aliases 2014-12-03 16:03:19 +00:00
baldurk 1061948185 Implement AllowFullscreen (or rather, !AllowFullscreen) for win32 GL 2014-12-03 10:41:37 +00:00
baldurk 4aab1172a4 Save out multisample count on default framebuffer 2014-12-02 23:27:03 +00:00
baldurk 9369c85953 Mute the spam about supported extension functions not being returned 2014-12-02 01:31:35 +00:00
baldurk 50d6b62adf Proper SRGB handling in opengl. See gl-320-fbo-srgb
* We create fake backbuffer as SRGB if the original default backbuffer was
  SRGB in the program.
* All of our output backbuffers are also SRGB, and we enable
  GL_FRAMEBUFFER_SRGB when writing to them.
* Add the 'fake' srgb curve applied to linear data to display it as if it
  were srgb, which tends to look intuitively correct even if it's not 100%
  accurate. See the behaviour existing in D3D11 already.
2014-12-01 17:13:30 +00:00
baldurk 2484bc8bc7 Use UTF-8 everywhere possible and only use wchar_t where required.
* This means that all APIs pass byte string types. ALL strings everywhere
  in the entire codebase must be assumed to be and treated as UTF-8 content
  not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
  linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
  to use the Win32 API. Some windows specific code will stay in wide chars
  just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
  compatibility, so this change doesn't break backwards compatibility.
2014-11-23 14:45:16 +00:00
baldurk 67e5b28f3b Debug log for which extension functions the app is requesting 2014-11-11 22:54:54 +00:00
baldurk 1fc1e632b3 Just pass-through wglSwapIntervalEXT as we don't care about it 2014-11-11 17:47:55 +00:00
baldurk d3650cc73d Remove wgl/glx from hookset.pl - unused. Also skip blank lines 2014-11-08 13:48:39 +00:00
baldurk 6308d78cd4 Implement debug device/debug api message tracking for GL 2014-11-02 10:52:24 +00:00
baldurk 8d8c8a7c47 Hook into platform delete context function 2014-11-01 17:04:51 +00:00
baldurk 8d685de609 Reorganise 3rdparty, include breakpad with sln, drop mhook. Closes #84 2014-09-24 20:24:35 +01:00
baldurk 620067ec6b Fix %s to %hs usage 2014-08-25 17:23:03 +01:00
Baldur Karlsson 12a30a7b97 Add IAT based hooking to allow hooking 64bit opengl32.dll
* Needs vigorous testing in as many situations as I can think of, not least
  32bit, 64bit, D3D11, D3D9, OpenGL, managed apps, different windows SDKs,
  delay loading dlls (not sure if these will work), statically linked libs,
  LoadLibrary + GetProcAddress
* Credit goes to jslutter for originally bringing it to my attention &
  suggesting it.
* References:
  http://msdn.microsoft.com/en-us/magazine/bb985992.aspx
  http://msdn.microsoft.com/en-us/magazine/cc301808.aspx
  http://www.codeproject.com/Articles/6265/Process-wide-API-spying-an-ultimate-hack
2014-08-06 15:43:16 +01:00
Baldur Karlsson e5664a0838 Add global lock on all GL hook entry points
* This could be improved and moved further down, not all functions would
  need a lock (only things modifying shared resources), but it suffices
  for now.
2014-06-27 13:06:59 +01:00
Baldur Karlsson 6e1d976a48 Return pixel format WGL extensions and add do-nothing hooks 2014-06-24 15:45:04 +01:00
Baldur Karlsson 07e9855f0e Call GetRealFunctions on MakeCurrent to populate extensions.
* Even if the app only queries some subset of extensions, we may need
  more (e.g. need the DSA extensions). GetRealFunctions does a
  PopulateHooks which will fill out the extensions that we need.
2014-06-19 15:23:01 +01:00
Baldur Karlsson c9d8ab2dcf Add a few last buffer related hooks 2014-06-19 13:00:33 +01:00
Baldur Karlsson b345b9ceb7 Hook the EXT_direct_state_access functions.
* Normal selector functions are implemented via these, which requires
  EXT_direct_state_access to be available, but this isn't hard to work
  around with some wrapper functions should that become necessary.
2014-06-19 12:05:49 +01:00
baldurk cb67ae894a Demote some hook errors as they don't seem to succeed on win64 currently 2014-06-17 18:27:29 +01:00
baldurk 4822322509 Compile error fixes 2014-06-17 18:26:30 +01:00
baldurk a9df1e4ef2 Don't try and hook OpenGL functions if the dll isn't even loaded on win32 2014-06-16 00:00:00 +01:00
baldurk 4d59116a2d Add 1D/3D versions of glTexStorage and glTexSubImage 2014-06-01 15:58:06 +01:00
baldurk 2a9b7962ce Hook into wglCreateLayerContext 2014-05-31 00:51:21 +01:00
baldurk 05da325796 Print an error for each dll function that fails to hook. 2014-05-31 00:04:24 +01:00
baldurk c38affcded Initial commit of existing code.
* All renderdoc code up to this point was written by me, history is available by request
2014-05-02 08:33:01 +01:00