Graham
453289f189
Add glPixelZoom() binding
...
Used by the high DPI client patch.
4 years ago
Graham
fd392a59c1
Fix jaggl_pix cleanup if an error occurs
...
The previous pix_free label was in the wrong place, and the code
wouldn't break out of the loop.
4 years ago
Graham
01548cb617
Remove unused component_location variable
4 years ago
Graham
0a20f4954c
Reduce the amount of time the framebuffer lock is held for
4 years ago
Graham
37efde58ef
Check for CGLSetCurrentContext errors in drawInCGLContext
4 years ago
Graham
6c75a3c590
Delete framebuffer in dealloc
...
This seems to work reliably now.
4 years ago
Graham
380ada79d7
Remove autoresizingMask
...
It isn't required - AWT resizes the CALayer when the size of the Canvas
changes. I think this might be left over from the insets hack.
4 years ago
Graham
a0de6a8f4c
Compute insets on macOS
...
This isn't as hard as I imagined it would be, as we actually have a
Component reference in the appropriate method.
This fixes the fixed size HD client in a maximized window.
4 years ago
Graham
d5598a93cf
Fix build on macOS
...
A previous commit accidentally renamed platformInfo field in a DSI
struct field access to platform_info. It was only intended to rename the
platformInfo local variable to fit in with the naming scheme.
4 years ago
Graham
74f7a247d1
Align DSI bounds comments
5 years ago
Graham
6e702752d1
Use // for single-line comments
5 years ago
Graham
cf6597f45f
Fix typo: carry -> carray
5 years ago
Graham
409306d7ed
Rename platformInfo to platform_info
5 years ago
Graham
d048d99890
Revert "Remove unnecessary jaggl locks"
...
This reverts commit 57012072a3ac3d4f63c8faa5584331d94f61fb7c.
This causes crashes when the canvas is resized.
5 years ago
Graham
b01f8b7737
Use CGSize/CGRect where appropriate for 32-bit support
5 years ago
Graham
a7c56c9bef
Check that jaggl_context_appkit is non-NULL before update call
...
It is created after the observer is added, so there is a race condition.
5 years ago
Graham
ede4a96a09
Update NSView-backed OpenGL context on resize
5 years ago
Graham
5fbd3fec80
Add legacy NSView support
...
NSView is used in preference to CALayer if available, as we avoid all the
framebuffer blitting overhead.
5 years ago
Graham
097b3d244a
Include more specific headers on macOS
...
This reduces the compile time fairly significantly.
5 years ago
Graham
74516baaa6
Reduce screen corruption when resizing
...
This commit clears framebuffers when they are created, copies the contents of
the previous framebuffer to the new framebuffer when resizing and moves all the
resizing code into the blit method. All of these help to reduce screen
corruption, although a small amount still remains if you resize quickly.
5 years ago
Graham
5f22187451
Blit before swapping framebuffers
...
This fixes latency (and also screen corruption when resizing), as we blitted a
framebuffer that had already been displayed on the off-screen window rather
than the one that had just been rendered.
5 years ago
Graham
1a6793fb62
Make releaseCGLContext a no-op
...
It is sometimes called after the context is destroyed. Attempting to call any
gl* functions in this case causes a segfault.
5 years ago
Graham
1b85ddf874
Resize off-screen window after resizing the framebuffer
5 years ago
Graham
f50b381f95
Lock framebuffer variables accessed from multiple threads
5 years ago
Graham
733790a23b
Add comment to the flushBuffer/glFlush call on macOS
5 years ago
Graham
dc34668b5b
Set swap interval of the onscreen context on macOS
5 years ago
Graham
064ecf3497
Disable CAOpenGLLayer asynchronous mode
...
canDrawInCGLContext is called far more often than blit, so it seems like a
waste of effort.
5 years ago
Graham
c5b8487e1b
Create NSOpenGLContext synchronously
...
This is consistent with all other code that runs on the main UI thread, and
slightly easier to reason about.
5 years ago
Graham
d3687ab98d
Fix JagGLLayer frame in resizable mode
5 years ago
Graham
753508ea26
Remove unnecessary jaggl locks
...
We only need to lock GLX calls, not standard OpenGL calls. This should
improve the performance of the jaggl bindings on UNIX systems.
5 years ago
Graham
7357273daa
Document why our ChoosePixelFormat usage is correct
5 years ago
Graham
3650637b81
Update TODO in jaggl.c
5 years ago
Graham
96f9f19de5
Document that CGL lacks extensions in getExtensionsString
5 years ago
Graham
69a80074ea
Return empty string if wglGetExtensionsStringEXT is not supported
5 years ago
Graham
fa2bde7e0d
Add initial Mac OS X jaggl support
5 years ago
Graham
0897a87e27
Add missing unsupported platform branch
5 years ago
Graham
fb3b0b59c3
Use JNI_ABORT to release arrays that we don't expect OpenGL to change
5 years ago
Graham
aa2da469fa
Cast void * pointers to const void * where possible
5 years ago
Graham
ddb1b39880
Improve variable names in jaggl_bootstrap_proc_table
5 years ago
Graham
53a3bbf43f
Enable and fix MSVC warnings
5 years ago
Graham
d6b6e3fd21
Reduce indentation in choosePixelFormat
5 years ago
Graham
b849d1a093
Use alpha_bits instead of cAlphaBits for consistency with X11
5 years ago
Graham
e71e07adf0
Remove unnecessary global AWT lock on Windows
5 years ago
Graham
f9c439ffe6
Unregister class after jaggl_bootstrap_proc_table
5 years ago
Graham
f218ba381a
Avoid passing GLX_SAMPLE* to glXChooseVisual if num_samples is zero
...
I think glXChooseVisual will return an error if GLX_SAMPLE* is present
even if we set it to False/0, so we might never get a context on old
hardware.
5 years ago
Graham
21718583e8
Add multisample support to WGL contexts
5 years ago
Graham
609baccbe0
Populate jaggl_alpha_bits with cAlphaBits from selected pixel format
5 years ago
Graham
d7ca52505f
Reduce indentation in chooseContext
...
We don't need to keep indenting like the X11 code as we only call
ChoosePixelFormat once.
5 years ago
Graham
1f03c312ed
Add #error case to all platform #if/else chains
...
This is a bit more robust: if we typo one of the platform defines, we'll
know about it rather than silently missing bits of code.
5 years ago
Graham
341078088b
Add initial WGL support
5 years ago