Because OpenGL is being deprecated by Apple, use Metal instead of OpenGL for main VM window in OS X. Metal only works in 64 bits mode. So, I also made the needed changes to keep using OpenGL in the 32 bits version of the OS X VM. You can view, comment on, or merge this pull request online at:https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306 Commit Summary
File Changes
Patch Links:
— |
@ronsaldo pushed 1 commit.
— |
In reply to this post by David T Lewis
This is great! Could @johnmci have a look at this please? I'm not very familiar with the OpenGL API or Metal API... — |
In reply to this post by David T Lewis
@ronsaldo pushed 1 commit.
— |
In reply to this post by David T Lewis
@ronsaldo pushed 1 commit.
— |
In reply to this post by David T Lewis
@ronsaldo pushed 1 commit.
— |
In reply to this post by David T Lewis
@ronsaldo pushed 1 commit.
— |
In reply to this post by David T Lewis
On Sat, Nov 10, 2018 at 11:24:46PM -0800, Ronie Salgado wrote: > > Because OpenGL is being deprecated by Apple, use Metal instead of OpenGL for main VM window in OS X. > Very nice to see this :-) Dave |
In reply to this post by David T Lewis
@eliotmiranda pushed 1 commit.
— |
In reply to this post by David T Lewis
@eliotmiranda pushed 1 commit.
— |
In reply to this post by David T Lewis
Hi Ronie, can you add a comment to platforms/iOS/vm/OSX/SqueakMainShaders.metal.inc to explain what's in SqueakMainShaders_metallib? This is some mysterious s&%t ;-) — |
In reply to this post by David T Lewis
Superb work, Ronie. So thorough. Shame about the selector comparisons in doCommandBySelector:; I know the time isn't an issue but it's ugly :-) I suppose we could implement the selectors instead. — |
In reply to this post by David T Lewis
@ronsaldo pushed 1 commit.
— |
In reply to this post by David T Lewis
About platforms/iOS/vm/OSX/SqueakMainShaders.metal.inc , I agree, but the metal build tools were not working on CI, and I did not want to bump up the required version of XCode. So I ended copying the approach of offline compilation from SDL2. I just added the comment. Well as for the doCommandBySelector; comparison, I copied most of the event related stuff from the sqSqueakOSXOpenGLView.m and sqSqueakOSXCGView.m . I think that someone else should refactor these parts in order to avoid code duplication. — |
In reply to this post by David T Lewis
@ronsaldo maybe it's time to bump the macOS version our CI uses? The binaries should still work on older macOS systems, right? — |
In reply to this post by David T Lewis
Lets not allow this go stale. What is blocking it? — |
In reply to this post by David T Lewis
Please respond... — |
In reply to this post by David T Lewis
Sure, no need to bump the version at all if it's not required by this change. — |
In reply to this post by David T Lewis
I got super excited about this PR again, so I merged it locally into Mouse events seem to work fine, so only the rendering is off for some reason. — |
In reply to this post by David T Lewis
@fniephaus commented on this pull request. In platforms/iOS/vm/OSX/sqSqueakOSXMetalView.m: > + // Alawys try to fill the texture with the pixels. + if ( fullScreendispBitsIndex ) { + [self loadTexturesFrom: fullScreendispBitsIndex subRectangle: (clippyIsEmpty ? rect : NSRectFromCGRect(clippy))]; + //[self loadTexturesFrom: fullScreendispBitsIndex subRectangle: rect]; + clippyIsEmpty = YES; + syncNeeded = NO; + } + + MTLRenderPassDescriptor *renderPassDescriptor = self.currentRenderPassDescriptor; + if(renderPassDescriptor != nil && self.currentDrawable) + { + currentCommandBuffer = [graphicsCommandQueue commandBuffer]; + currentRenderEncoder = [currentCommandBuffer renderCommandEncoderWithDescriptor: renderPassDescriptor]; + + // Set the viewport. + [currentRenderEncoder setViewport: (MTLViewport){0.0, 0.0, lastFrameSize.size.width, lastFrameSize.size.height}]; When I change this line to [currentRenderEncoder setViewport: (MTLViewport){0.0, 0.0, lastFrameSize.size.width * 2, lastFrameSize.size.height * 2}]; the problem I mentioned in #306 (comment) goes away. But this is probably not the right fix. — |
Free forum by Nabble | Edit this page |