-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Opengl glext private #4310
Opengl glext private #4310
Conversation
@kekekeks note that Avalonia.Native package may not used directly by the Linux platform, ok, but if not generated there will be errors during restore because some other packages still refers it as described in #4148 (comment) ; btw I can revert that commit if this will be addressed in future. |
@@ -2,7 +2,7 @@ | |||
|
|||
<PropertyGroup> | |||
<IsPackable>false</IsPackable> | |||
<IsPackable Condition="'$([MSBuild]::IsOSPlatform(OSX))' == 'True'">true</IsPackable> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check is here for a reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but that not address the issue #4148 (comment)
@@ -23,7 +23,7 @@ public class GlInterfaceBase<TContext> | |||
public GlInterfaceBase(Func<string, IntPtr> getProcAddress, TContext context) | |||
{ | |||
_getProcAddress = getProcAddress; | |||
foreach (var prop in this.GetType().GetProperties()) | |||
foreach (var prop in this.GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initializing static properties from an instance constructor is usually a bad idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is other way to access to private members ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You right, thanks for clarification.
…s ( Instance is enough )
@kekekeks I ended up using Silk.NET as api for GL so there is no need for me to add more api with private delegates. Its not a clean solution like the OpenGLControlBase of Avalonia that uses framebuffer, btw everything worked as expected apart the fact that in X11 I got crashes if I close a modal window or if I use a tooltip ( may related to #3536 ), in general every time time that another window created while in Windows there is no issues.
Note that if I not open the silkNet window ( by commenting this the problem not appears ), so there are many possibilities that this is caused by my mistake in interleaving windowing mode but hopefully this could be of help to you to check against some robustness of the Avalonia.X11 If you want to look at the example just checkout the source: git clone https://github.com/devel0/netcore-sci.git
cd netcore-sci
git checkout 097f3978a3a95d96c1060f99b973eca1fdc94a17
dotnet build
dotnet run --project examples/0002 |
What does the pull request do?
Allow to write custom extension well prototyped, hiding entrypoint (private) property with a public method that forward to that.
What is the current behavior?
Can't declare entrypoint as private, it must public and that makes 2 member visible when using intellisense ( property and method ).
What is the updated/expected behavior with this PR?
With this I can write something like the follow to implement my own extension with method documentation:
and use them like this example
Checklist
Breaking changes
Fixed issues