[OpenSmalltalk/opensmalltalk-vm] Use Metal instead of OpenGL for the main VM Window in OS X (#306)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Use Metal instead of OpenGL for the main VM Window in OS X (#306)

David T Lewis
 

@krono 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}];

Welcome to the cool world of backing scale factor.

see

and the like


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@krono commented on #306"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#discussion_r247033868"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#discussion_r247033868", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#discussion_r247033868", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Use Metal instead of OpenGL for the main VM Window in OS X (#306)

David T Lewis
In reply to this post by David T Lewis
 
Hi Ben,

On Thu, Jan 10, 2019 at 5:06 AM Ben Coman <[hidden email]> wrote:

> Please respond...
> @eliotmiranda <https://github.com/eliotmiranda>, are you satisfied with
> Ronnie's commit 6e1da75
> <https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/6e1da7500a653eb906606562145a8f863e25fab4>
> ?
>
yes

> @johnmci <https://github.com/johnmci>, are you available to review as
> Fabio requested? otherwise please advise us not to wait.
> @fniephaus <https://github.com/fniephaus>, unless its blocking, can any
> macOS version bump be done in a separate issue?
>
_,,,^..^,,,_
best, Eliot


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@eliotmiranda in #306: Hi Ben,\n\nOn Thu, Jan 10, 2019 at 5:06 AM Ben Coman \u003cnotifications@github.com\u003e wrote:\n\n\u003e Please respond...\n\u003e @eliotmiranda \u003chttps://github.com/eliotmiranda\u003e, are you satisfied with\n\u003e Ronnie's commit 6e1da75\n\u003e \u003chttps://github.com/OpenSmalltalk/opensmalltalk-vm/commit/6e1da7500a653eb906606562145a8f863e25fab4\u003e\n\u003e ?\n\u003e\nyes\n\n\u003e @johnmci \u003chttps://github.com/johnmci\u003e, are you available to review as\n\u003e Fabio requested? otherwise please advise us not to wait.\n\u003e @fniephaus \u003chttps://github.com/fniephaus\u003e, unless its blocking, can any\n\u003e macOS version bump be done in a separate issue?\n\u003e\n_,,,^..^,,,_\nbest, Eliot\n"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#issuecomment-454116709"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#issuecomment-454116709", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#issuecomment-454116709", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Use Metal instead of OpenGL for the main VM Window in OS X (#306)

David T Lewis
In reply to this post by David T Lewis
 

@ronsaldo pushed 1 commit.

  • 9b119d1 Use the size of the drawable, instead of the size of the frame. This should fix the HiDPI bug.


You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ronsaldo pushed 1 commit in #306"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306/files/6e1da7500a653eb906606562145a8f863e25fab4..9b119d1d8ea5ff4623d9c576cdbcec9af294d9e7"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306/files/6e1da7500a653eb906606562145a8f863e25fab4..9b119d1d8ea5ff4623d9c576cdbcec9af294d9e7", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306/files/6e1da7500a653eb906606562145a8f863e25fab4..9b119d1d8ea5ff4623d9c576cdbcec9af294d9e7", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Use Metal instead of OpenGL for the main VM Window in OS X (#306)

David T Lewis
In reply to this post by David T Lewis
 

@ronsaldo 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}];

Hi, sorry for taking too long. I was completely busy with my job. I just changed the code to use the size from the drawableSurface property, instead of the size of the window. Can you check whether this fixes the issue or not?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ronsaldo commented on #306"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#discussion_r257729663"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#discussion_r257729663", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#discussion_r257729663", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Use Metal instead of OpenGL for the main VM Window in OS X (#306)

David T Lewis
In reply to this post by David T Lewis
 

Merged #306 into Cog.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Merged #306 into Cog."}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#event-2146923726"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#event-2146923726", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/306#event-2146923726", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
12