Skip to content

[opengles] Update to iOS 10.3 beta 1 - #1576

Merged
VincentDondain merged 2 commits into
dotnet:xcode8.3from
VincentDondain:opengles-b1
Jan 27, 2017
Merged

[opengles] Update to iOS 10.3 beta 1#1576
VincentDondain merged 2 commits into
dotnet:xcode8.3from
VincentDondain:opengles-b1

Conversation

@VincentDondain

Copy link
Copy Markdown
Contributor

No description provided.

@monojenkins

Copy link
Copy Markdown
Contributor

Build failure

Comment thread src/OpenGLES/EAGLContext.cs Outdated
return _PresentRenderbufferAfterMinimumDuration (target, presentationTime);
break;
default:
throw new ArgumentException ("The 'PresentationMode mode' argument needs a value.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like this would be more exact and helpful:

throw new ArgumentOutOfRangeException ($"Unknown presentation mode: {mode}", nameof (mode));

{
var obj = new EAGLContext (EAGLRenderingAPI.OpenGLES2);

Asserts.AreEqual (true, obj.PresentRenderBuffer ((int)RenderbufferTarget.Renderbuffer, 0), "PresentRenderBuffer");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add an overload that takes a RenderbufferTarget as the target instead of nuint (so that you don't have to cast)? Or are there many possible enums?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rolfbjarne I see that there are other enums being used:

OpenTK.Graphics.ES11.All.RenderbufferOes
OpenTK.Graphics.ES20.All.Renderbuffer
OpenTK.Graphics.ES20.RenderbufferTarget.Renderbuffer
OpenTK.Graphics.ES30.All.Renderbuffer
OpenTK.Graphics.ES30.RenderbufferTarget.Renderbuffer

All of the same value: 36161

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that would become messy if we added overloads for every one of those, so I guess typing it as nuint is good enough.

Comment thread src/OpenGLES/EAGLContext.cs Outdated

[iOS (10,0)]
[TV (10,0)]
public bool PresentRenderBuffer (nuint target, double presentationTime)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check api-diff - in most case what we move from generated to manual bindings needs to be virtual (and removing virtual is a breaking change)

Comment thread src/OpenGLES/EAGLContext.cs Outdated
switch (mode) {
case PresentationMode.AtTime:
return _PresentRenderbufferAtTime (target, presentationTime);
break;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for break after a return statement. IIRC the C# compiler should be warning you about this...

Comment thread src/OpenGLES/EAGLContext.cs Outdated
break;
case PresentationMode.AfterMinimumDuration:
return _PresentRenderbufferAfterMinimumDuration (target, presentationTime);
break;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@monojenkins

Copy link
Copy Markdown
Contributor

Build failure

@VincentDondain

Copy link
Copy Markdown
Contributor Author

@VincentDondain
VincentDondain merged commit 7747ad1 into dotnet:xcode8.3 Jan 27, 2017
@VincentDondain
VincentDondain deleted the opengles-b1 branch January 27, 2017 20:01
spouliot pushed a commit to spouliot/xamarin-macios that referenced this pull request Mar 28, 2017
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

Successfully merging this pull request may close these issues.

6 participants