Michael Pfaff
4f7fee2ed4
Remove a lot of synchronization
2022-08-14 13:21:03 -04:00
Michael Pfaff
325db15a1d
More progress, nearly fixed native header generation
...
BufferUtils.c and CallbackUtil.c have been modified to not include the
generated header file. This is because `javac` is choosing to ignore
those files for generation of headers for unknown reasons.
2022-08-10 11:43:59 -04:00
Michael Pfaff
134263f5cd
More progress, Windows build is definitely broken for now
2022-08-09 21:59:46 -04:00
Ioannis Tsakpinis
a5c4462a3e
Ignore setDisplayMode when the Display parent is set. Fix #98
2015-05-20 15:24:16 +03:00
kappaOne
d20d5546a3
Finalise implementation of HiDPI mode for OS X
2013-11-12 01:25:06 +00:00
kappaOne
eb2e7176b8
Add new LWJGL API Display.getPixelScaleFactor() for use in high DPI
...
modes, like HiDPI retina mode on OS X.
2013-11-11 23:12:51 +00:00
kappaOne
98f8bddce3
Implement 8 bit Icon transparency support on Linux, now using the modern
...
_NET_WM_ICON method to set the icon, removed legacy
method and associated code.
2013-11-09 19:47:32 +00:00
kappaOne
5fb66cce46
Make the WM_CLASS implementation more flexible by giving users
...
an option to set it manually by VM parameter or system property
2013-10-27 15:07:07 +00:00
Ioannis Tsakpinis
c0b19b7743
Another attempt to fix focus problems with Display.setParent on Windows:
...
- Reverted to WS_CHILD in window flags.
- Added WM_MOUSEACTIVATE handling: Focus the display + return MA_NOACTIVATE.
- Removed unnecessary appActivate calls in WM_ACTIVATE. We don't receive WM_ACTIVATE with WS_CHILD and the focus events do the job just fine.
- Detect parent window focus in update and force focus the display. This is useful when we alt-tab to the parent window and we don't receive any events.
2013-04-17 22:19:38 +03:00
kappaOne
5738477a7b
Merge pull request #19 from LWJGL/osx-java7
...
LWJGL OS X Java 7 Branch is Ready!
2013-03-14 04:49:43 -07:00
Ioannis Tsakpinis
5400bb27db
Misc fixes and improvements on Windows:
...
- Cleaned up cl flags and enabled parallel compilation. Native compilation
is now multiple times faster.
- Fixed all /W3 compilation warnings.
- Changed window flag from WS_CHILDWINDOW to WS_POPUP when Display.setParent
is used, in an attempt to fix focus-related issues.
2013-01-29 22:53:11 +02:00
Brian Matzon
c09f5698b4
Comitting EmuMogs 28008537/src.zip drop to branch
2012-11-01 20:54:17 +00:00
kappa1
6c0e3d0484
Minor tweak to remove unused code
2012-05-13 18:03:05 +00:00
kappa1
f74af79c19
Display.wasResized() should now work correctly when using Display.setParent()
2012-05-13 18:01:12 +00:00
kappa1
ffdcf4db13
fix minor javadoc typo's
2012-03-24 00:20:02 +00:00
kappa1
92ba9d8ccb
Replace Display.sync(int fps) with an even better implementation, special thanks to Riven.
2012-03-24 00:04:52 +00:00
kappa1
35e075e979
Display.sync() fix excessive CPU using on windows
2012-03-21 19:34:51 +00:00
kappa1
e0c6b24536
Fix the new accurate Display.sync() method to use less CPU on Mac.
2012-03-18 16:25:23 +00:00
kappa1
d099a86e50
Tweak Display.sync() method a little to reduce the Thread.yield() time even further, now with a minimum of 0 yield time.
2012-03-01 22:34:34 +00:00
kappa1
4293976506
Implement a much more accurate Display.sync() method that auto adapts to the systems timer resolution and load.
2012-02-29 23:18:35 +00:00
kappa1
e5ebf82c81
Added the new public API's Display.getX() and Display.getY(). Currently implemented for Linux and Mac. Windows implementation pending.
2012-02-18 16:30:38 +00:00
Brian Matzon
4a1755ef5a
make Display.destroy a NOP if it hasn't been created yet
2011-10-18 17:23:39 +00:00
Ioannis Tsakpinis
d52a8bce90
Removed org.lwjgl.opengles.PixelFormat dependency from Display.
2011-10-12 18:54:40 +00:00
Brian Matzon
cfe74c2013
undoing r3539 to fix issue with fullscreen
2011-10-11 19:24:55 +00:00
Ioannis Tsakpinis
41af142324
Added support for OpenGL 3.2 on MacOS X 10.7+.
2011-09-03 18:52:45 +00:00
kappa1
5949d57bb1
Implement Resizing Display API for OS X
2011-07-13 22:15:35 +00:00
kappa1
f0766fb6c4
Updated JavaDoc for the new resizing api to clarify behaviour when running in fullscreen or with Display.setParent().
2011-07-13 19:29:15 +00:00
kappa1
9aafabd728
Add placeholder methods for initial resizing api for the Display
2011-07-12 22:07:32 +00:00
Ioannis Tsakpinis
f1fee0624b
Replaced Display.createES() with Display.create(ContextType.GLES).
2011-07-10 17:45:43 +00:00
Ioannis Tsakpinis
1dd8817855
Update current DisplayMode when the Display's parent is resized.
2011-05-31 13:32:38 +00:00
Ioannis Tsakpinis
40cbf3e45f
Added support for OpenGL ES.
2011-05-17 16:53:57 +00:00
kappa1
63e79ab5b3
Changed initial alpha value of glClearColor from 1 to 0 which is set when Initialising the Display. This now matches expected OpenGL behaviour. Thanks to Ryanm for spotting this. If you use FBO's make sure your setting glClearColor properly.
2010-11-11 21:25:20 +00:00
Ioannis Tsakpinis
a8bcb7fd25
Ported codebase to Java 1.5.
...
Misc OpenCL fixes and API improvements.
Changed fractal demo to use events/sync objects instead of cl/glFinish for synchronization. (untested)
2010-09-28 21:11:35 +00:00
kappa1
b911005854
Display sync modified to allow it to be interrupted.
...
Thanks to bobjob for this, further thanks to MatthiasM for pointing out that the interrupt should not be swallowed.
2010-07-09 19:37:14 +00:00
Ioannis Tsakpinis
47c9991b41
Fixed ByteOrder of @Return ByteBuffers.
...
Cleaned up Drawable interface and introduced a reusable base implementation.
Added support for disabling runtime function checks, buffer checks and state tracking. Activated with -Dorg.lwjgl.util.NoChecks=true
2010-04-22 23:21:48 +00:00
Ioannis Tsakpinis
e650319d5b
Added support for a new Drawable type (SharedDrawable) that shares its context with another Drawable.
...
Added new methods to the Drawable interface (makeCurrent, releaseContext, destroy).
Added a background thread texture loading test (using either Pbuffer or SharedDrawable).
2010-04-20 18:21:05 +00:00
Ioannis Tsakpinis
3035e3c95c
Moved processMessages call after swapBuffers in Display.update.
...
Added option to not call processMessages during Display.update.
2010-04-03 19:03:49 +00:00
Ioannis Tsakpinis
6998610cce
Fixed mouse grabbing on secondary monitors.
...
Added extra device polling when vsync is enabled, to reduce input lag.
2010-03-31 23:56:24 +00:00
Ioannis Tsakpinis
7ef37e9858
Changed BaseReferences to use GL20.GL_MAX_TEXTURE_IMAGE_UNITS when available (GL13.GL_MAX_TEXTURE_UNITS is deprecated).
...
Catch and log OpenGL errors during context creation, instead of throwing an exception.
2010-02-10 11:22:16 +00:00
kappa1
2e07a03a4e
added the Display.setInitialBackground(r,g,b) method, this will allow you to select the initial background color of the lwjgl Display window. Useful to create more polished applications and smoother looking applets.
2009-12-01 15:12:52 +00:00
Ioannis Tsakpinis
f4eb23f860
Fixed Context init when using the debug library.
...
Removed glGetError call before buffer swapping.
2009-09-08 12:27:59 +00:00
Elias Naur
2f3fbf28de
Added Display.setDisplayModeAndFullscreen(mode) to switch mode and set fullscreen in one call (idea stolen from MatthiasM). Tweaked FullScreenWindowedTest to use the new method.
2008-12-28 19:30:43 +00:00
Elias Naur
825e724904
Renamed DisplayMode.isFullscreen() to DisplayMode.isFullscreenCapable and made it public
2008-12-28 17:50:08 +00:00
Elias Naur
ed1f8d70f4
Removed redundant fullscreen argument from DisplayImplementation.createWindow
2008-10-28 10:05:37 +00:00
Elias Naur
95a13203a1
Properly handle non-fullscreen DisplayModes
2008-10-02 08:10:47 +00:00
Elias Naur
a7accb99a0
Added Display.getDesktopDisplayMode()
2008-10-02 07:34:22 +00:00
Ioannis Tsakpinis
d7ee23f9b2
Added support for OpenGL 3.0 functionality
...
Added support for OpenGL 3.0 context creation (MAJOR/MINOR versions, DEBUG mode, FORWARD_COMBATIBLE mode)
Added support for OpenGL 3.0 context sharing
Added support for OpenGL 3.0 extension detection
Improved support for floating point PixelFormats (ARB_color_buffer_float)
Added support for packed floating point PixelFormats (EXT_packed_float)
Added support for sRGB PixelFormats (ARB_framebuffer_sRGB)
Added support for pseudo-FORWARD_COMBATIBLE mode (deprecated functions not loaded)
Added support for EXT_direct_state_access
2008-08-19 16:46:03 +00:00
Elias Naur
d3b13b23dd
Display.setIcon: Preserve icon buffer positions
2008-06-16 18:29:18 +00:00
Elias Naur
1071c31bc0
Removed dead code from Display
2008-05-30 07:08:14 +00:00
Elias Naur
f18b5baa09
Removed Display.sync2 and Display.sync3
2008-05-30 06:53:33 +00:00
Elias Naur
37ab6afff2
Don't set icon when Display is parented
2008-04-13 18:26:22 +00:00
Elias Naur
9aefad3f09
Linux: Some DRI drivers don't like to have the context destroyed before the window, even though the context is not current anymore. The destroy ordering in Display.destroy is now flipped as a workaround
2008-04-13 18:11:38 +00:00
Elias Naur
d8333fb279
Added line about tracking parent size to Display.setParent javadoc
2008-04-07 20:39:46 +00:00
Elias Naur
61a71ea912
Let the Display resize itself to match its parent, if non null
2008-04-07 19:21:40 +00:00
Brian Matzon
bb16ec7492
updated and added license where needed
2008-04-07 18:36:09 +00:00
Elias Naur
c499f33bcf
Added experimental Display.setParent to allow Display to be embedded in an AWT Canvas. Added basic linux implementation and test.
2008-04-06 20:56:52 +00:00
Elias Naur
abd3f75d6c
Removed 2D OpenGL initialization code from Display. It messes with the implicit, but well-defined, opengl default state and doesn't fit well with multiple context types (gl3 and d3d)
2008-03-23 15:51:10 +00:00
Elias Naur
65309d759c
Added notes to Mouse.poll() and Keyboard.poll() that Display.processMessages() (or Display.update()) must be called to receive new input state
2008-03-02 18:16:39 +00:00
Elias Naur
31669b02ec
javdoc fixes
2008-01-21 22:15:12 +00:00
Elias Naur
e9a3b7a556
Display: Removed display_impl.update() from isCloseRequested(), isVisible(), isDirty() and isActive() since it can be an expensive call on at least linux. Display.update() is now required to be called to update the internal state.
2008-01-21 20:21:21 +00:00
Elias Naur
fa4bc30097
Only let Display.update() call display_impl.update() once
2008-01-19 09:53:14 +00:00
Elias Naur
a9f9a38c4c
Mac OS X: Release and clear the context from the drawable in the correct order
2007-08-30 18:27:12 +00:00
Elias Naur
bc09bd11e3
Don't let Display.sync* sleep with the global lock held
2007-08-30 12:34:56 +00:00
Elias Naur
7e05654cd2
Made Display.timeNow local
2007-08-30 12:19:34 +00:00
Elias Naur
15cf41553c
Don't allow switching to fullscreen when a custom display mode is in effect. This is a change from before, where the current mode was simply overwritten with the initial (desktop) mode
2007-08-16 08:55:06 +00:00
Elias Naur
03749c312c
Revert 2872
2007-08-16 08:49:14 +00:00
Brian Matzon
e809c1f7f0
fix: make sure that we return to the same display mode that was set in windowed mode when toggling between fullscreen and windowed mode
2007-08-15 20:14:29 +00:00
Elias Naur
befe34e32d
Removed unused, private Display.getContext()
2007-06-06 13:56:03 +00:00
Elias Naur
748c826af4
Display: Add GL error check after initial makeCurrent() (for real this time)
2007-05-27 13:09:48 +00:00
Elias Naur
1ccab9e810
Display: Add GL error check after initial makeCurrent()
2007-05-27 07:48:43 +00:00
Elias Naur
ef37c0e897
Make sure the swap interval is reset in Display when switching Display modes and toggling fullscreen
2007-04-28 20:10:21 +00:00
Elias Naur
6402783a9e
Removed debug output
2007-04-24 13:41:31 +00:00
Elias Naur
56178d97fd
Make the rest of LWJGL thread safe. No attempt have been done to make the locking minimal. Instead, one global lock is shared by Display, Mouse, Keyboard and Cursor. The lock surrounds all public methods.
2007-02-12 12:18:26 +00:00
Elias Naur
1602a74f42
Tweaked comment for Display.getAvailableDisplayModes to make it clear that invalid modes can be returned and that create() won't always detect such modes
2007-01-22 10:14:13 +00:00
Elias Naur
083137884b
Remove the rest of the implementation reflection
2007-01-17 12:58:38 +00:00
Elias Naur
7adffdb0cc
Display: Fixed a NPE when create() fails on context creation
2007-01-13 19:24:05 +00:00
Elias Naur
b7b203d29a
Windows: Clear the window with OpenGL to replace UpdateWindow(HWND) and run message loop once in Display.create().
2007-01-04 14:12:36 +00:00
Elias Naur
7ca70d8c5e
Display: Don't add the shutdown hook twice when a previous create() call has failed
2006-11-19 11:43:00 +00:00
Elias Naur
0a17002082
Don't register the Display shutdown hook in the static initializer. Register it at create() and remove it at destroy(). This avoids unnecessary conflicts when only using AWT stuff
2006-10-26 19:41:15 +00:00
Elias Naur
ec9b449b78
Made Display.getImplementation package private, and made the input.* packages access it through reflection.
2006-10-08 09:05:16 +00:00
Elias Naur
def08f06f8
Display.java: Moved Context creation to after createWindow to relax the requirement that the Display PeerInfo must be valid before createWindow(). This will help Windows get rid of a dummy window.
2006-09-19 13:41:18 +00:00
Elias Naur
4c9edffc85
Linux: Remove 32x32 icons size check, since other sizes seem to work alright. Document the fact that Display.setIcon use the icons from the icon array in order of decreasing preference
2006-07-22 21:30:31 +00:00
Elias Naur
bb8dcf3996
Windows: Rename Win32* files to Windows*
2006-07-12 18:32:58 +00:00
Elias Naur
5a83c8de35
Reverted Display.getPrivilegedBoolean access modifier change - package private is alright
2006-07-02 22:45:56 +00:00
Brian Matzon
a9edd6af6e
made Display priveledged action private. Fixes a possible security exploit that would allow anyone to get a boolean from System properties *gasp*
2006-07-02 20:26:49 +00:00
Elias Naur
aedb5ad912
Mac OS X: Fixed flickering caused by the new context handling in AWTGLCanvas
2006-06-07 06:35:52 +00:00
Elias Naur
684ee48641
Added Display.swapBuffers(). Combined with Display.processMessages() and Mouse/Keyboard/Controllers.poll() this method allows an application to create a custom policy for the rendering/polling loop in addition to the static Display.update() policy.
2006-05-03 20:53:16 +00:00
Caspian Rychlik-Prince
16524516cd
Tidied up unused variables, added serialVersionUIDs as appropriate,
...
removed a few unnecessary casts and brackets and exceptions.
2006-04-21 11:11:21 +00:00
Caspian Rychlik-Prince
64f58414b4
*** empty log message ***
2006-01-16 21:04:49 +00:00
Elias Naur
c9f35b917d
Made Display.releaseContext static (duh)
2006-01-02 14:15:24 +00:00
Elias Naur
95bc8cc4e5
Fixed exception messages
2006-01-02 14:05:30 +00:00
Elias Naur
9ccb31416e
Added Display.releaseContext()
2006-01-02 13:49:36 +00:00
Elias Naur
5faf661f04
Added setSwapInterval to Display and AWTGLCanvas
2006-01-01 19:50:06 +00:00
Elias Naur
2a9b8de2fb
Make Display, Pbuffer and AWTGLCanvas fail on null PixelFormats
2005-12-29 22:31:46 +00:00
Elias Naur
6ea1739399
Make Display, Pbuffer and AWTGLCanvas fail on null PixelFormats
2005-12-29 22:30:14 +00:00
Brian Matzon
483d6bcf38
create windows with LWJGL logo
...
dont recache same icons
2005-10-21 18:53:21 +00:00
Brian Matzon
eb795b9ecb
caching of window icon
2005-07-16 11:15:37 +00:00
Kevin Glass
94e0bb30c0
Added methods to set the window icon. MacOS implementation added using AWT images.
2005-07-05 21:54:12 +00:00
Brian Matzon
105c859ed7
automatic polling via Display.update();
2005-06-29 20:48:58 +00:00
Elias Naur
839306597b
Check for null pixel format in Display.create
2005-06-16 20:59:55 +00:00