Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

which version of mac os can this lwjgl3-awt support #44

Open
hubert-hy opened this issue Mar 16, 2021 · 14 comments
Open

which version of mac os can this lwjgl3-awt support #44

hubert-hy opened this issue Mar 16, 2021 · 14 comments

Comments

@hubert-hy
Copy link

Hi,

I have a project that using swing and awt and lwjgl2. After I move to lwjgl3 with lwjgl3-awt canvas, everything seems working, except some old version like high sierra, the canvas get artifacts when resizing. So my question is, does this lwjgl3-awt has any OS requirement? what version of mac os has 100% support?

Thanks

Hubert Yang

@SWinxy
Copy link
Collaborator

SWinxy commented Mar 16, 2021

AFAIK the minimum version would be based on the graphics API you're using (OpenGL or Vulkan), or the Java JDK requirements. As for the graphical artifacts, could you elaborate what you mean (or have a short clip to show)?

@hubert-hy
Copy link
Author

idk version and OpenGL version are the same.
JDK version is 12
OpenGL version is 2.1
I have tested on Sierra, High Sierra, Mojave, Catalina, Big sur, so far Mojave, Catalina and Big sur are ok, there two get trouble when I resize the canvas. Here is the screen recording from Sierra.

It is a google share link https://drive.google.com/file/d/1GFzVaomcPX0n2mdyYxBJ10r9CItDZvSI/view?usp=sharing

@hubert-hy
Copy link
Author

Hi Here I attach for picture resized and regular view in Hi sierra, and same in Mojave,
resizedinHisIerra
regularviewinHisierra
resizedinMojave
regularviewInMojave
since the canvas only open initGL() and paintGL() two interfaces, you can see the resizing in Hi Sierra something is not right .

Thanks,

Hubert

@SWinxy
Copy link
Collaborator

SWinxy commented Mar 19, 2021

OpenGL has a lot of quirks that I am not familiar with. @httpdigest might know something.

@hubert-hy
Copy link
Author

Thanks, I will contact with him.

Hubert Yang

@SWinxy
Copy link
Collaborator

SWinxy commented Mar 19, 2021

Nah. Just wait. He'll respond eventually.

@httpdigest
Copy link
Member

I can't say anything about it. I neither have a mac to test/verify, nor did I do the macOS implementation.
@tisoft did all of the macOS implementation. Probably we should ask him. :)

@tisoft
Copy link
Contributor

tisoft commented Mar 22, 2021

Do you have a simple reproducer project?

In principle all current macOS versions should work. I have only tested on big sur, though, since that is the inly one I am currently using.

@hubert-hy
Copy link
Author

Sure, I will try to create simple example for that.

Thanks

@hubert-hy
Copy link
Author

Hi, I just use the awttest example and run it under Catalina and High Sierra, Here is the screen shot,
Screen Shot 2021-03-23 at 11 31 37 AM
Screen Shot 2021-03-23 at 11 31 50 AM
Screen Shot 2021-03-23 at 11 33 00 AM
Screen Shot 2021-03-23 at 11 33 19 AM
Screen Shot 2021-03-23 at 11 33 36 AM
you can see In High Sierra, both resizing big and small causing the canvas get wrong width and height. but Catalina canvas always return correct size.

Thanks

@SWinxy
Copy link
Collaborator

SWinxy commented Mar 23, 2021

I've not been able to run the demos on my mac for some reason, despite my other engine working. Strange.

@OndrejSpanel
Copy link
Contributor

I am now trying this on MacBook Air (Early 2015), Intel Core i5 Dual Core, Intel HD Graphics 6000

I have tried running AWTTest, AWTThreadTest and Core32Test, with all of them I see the same result:

  • without -XstartOnFirstThread it crashes
  • with -XstartOnFirstThread OpenGL is reported as version 0.0 and no Window appears

The computer seems to support OpenGL 4.1. I am able to run non-AWT LWJGL applications on this Mac, but I need to provide -Djava.awt.headless for them if they use any AWT (including IOImage or awt.Color), otherwise all OpenGL calls just return 0 (including glGetError, which makes things very confusing).

@lqyaos
Copy link

lqyaos commented Dec 5, 2021

I also have the same problem, whether mac and javafx and lwjgl are contradictory, can you help me solve this doubt

@SWinxy
Copy link
Collaborator

SWinxy commented Dec 6, 2021

Incidentally I'd been looking up minimum version documentation without remembering this was still a lingering question. For Vulkan, the minimum is 10.11 (Mac OS X El Capitan), since MoltenVK runs on top of the Metal API that was introduced in 10.11. From what I can tell from looking at the code, the minimum for OpenGL is 10.5 (Mac OS X Leopard). I've not touched the OpenGL code (I don't know OpenGL), so I may be wrong.
The dependencies of this library don't provide documentation on the minimum OS version it can theoretically work on (LWJGL3, AWT and JAWT). Let me know if there are any issues with my analysis.

These artifacts @hubert-hy showed are definitely a bug, and look like they're due to resizing and Swing isn't refreshing the pixels. Could you create a new issue with screen recordings of them for examination? I'd like to see both correct behavior in the modern macOS versions, and the LWJGL2 version if possible.
Same for @OndrejSpanel, could you also create a separate issue for your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants