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

request for fork consolitation and and update to run on windows , plus advice maybe #2

Open
damian-666 opened this issue Sep 6, 2023 · 1 comment

Comments

@damian-666
Copy link

hello, hope you are not too busy there is no urgency ..
This is a minor fix to get this update to work on Windows .its working now with the latest from wannkunstbeikor:OpenTKAvalonia:master.. plus my change for windows via openGL i paste below.

Sorry im not a github expert or a collaborator , i cannot do a PR to a fork of a fork and
I cant even update my own fork because of a recent issue with sponsors (me) email leaking into the nugets or something MSFt is havign a crisis about. i get my push blocked to my own fork in my own vault. so i hoped we could get thisi one running , merged for now

mabye I'll or we can find a more general way.. since id like to support 3d graphics on all the avalonia targets, mobile and webassembly..

for now you ask for a PR from wannkunstbeikor , then take my changes?

to merge

  1. merge from master...wannkunstbeikor:OpenTKAvalonia:master via PR

copy paste thsi below to
program.cs on both samples : and test on non windows..

using System;
using Avalonia;
using System.Collections.ObjectModel;
namespace BasicCubeSample
{

class Program
{
    // Initialization code. Don't use any Avalonia, third-party APIs or any
    // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
    // yet and stuff might break.
    [STAThread]
    public static void Main(string[] args) => BuildAvaloniaApp()
        .StartWithClassicDesktopLifetime(args);

    // Avalonia configuration, don't remove; also used by visual designer.
    public static AppBuilder BuildAvaloniaApp()
    {
      
            //Add this line to set ths to UseWGL:
            return AppBuilder.Configure<App>()
                                  .UsePlatformDetect()
                                  .With(new Win32PlatformOptions{  
                                      RenderingMode=new Collection<Win32RenderingMode> { Win32RenderingMode.Wgl }
                                  }
                                  ).LogToTrace();

        }
     
    }
}
  1. Win32RenderingMode.Wgl to the
    the readme,
4.  fix a warning
   private OpenGlTexture? _brickTexture;   <<--- in the sample to fix a waring about nullable


<<<<<

if you want to know,
why im using this: ( in case you want to advise or have similar goals)

my goal is a IDE hosting a 2d or 3d physics window with docking . Something like a game level editor, with maybe scripting , and avalonia property inspectors and such for now. for mobile and web im not sure if i need avalonai UI next to or inside the 3d graphic, i might use custom UI.. Its much like stride was.

I am testing this for now , the only reason im looking to try to to be using openTK right now , because BepuPhysicsV2 demos are using OpenTK. but that is just on desktops. he supports directx and openGl vis a shaderconductor. i support mobile , and webasssemeby i hope, for a game / scientifici simulation rig based using physics engine and visuallized wiht monogame or something like it. i need just 3d graphics wiht basics shaders, and physics heavy / simulation code/ using a lockless producer consumer pattern.

the only issue wht this demo remain seems to be.. resizing.. havent tried with dockiong yet.. wil report
there may be option im unaware of.. for now desktop mac, windows , pc might be a start...

also looking at this:
https://github.com/wieslawsoltes/AvaloniaInside.MonoGame
https://github.com/wieslawsoltes/Dock
and other avanoliaUI stuff.
or advise me if there s more to do on this...there may be other options now , avalonia does much and thers is silk and ideas from stride.. includes vulcan.. I will ask wieslawsoltes what i should do ultimately buit this might be ok for now..

thanks for making this.. and @wannkunstbeikor for updating it..

@wannkunstbeikor
Copy link
Contributor

Yeah I can change that, the use wgl thing changed with v11 and i was too lazy to figure out how to set it up since i only tested on linux. Also yeah i can make a pr if thats wanted, but i will wait for the next avalonia update since that will have my fix for the BaseOpenGlControl so i dont have to include that ugly hack

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

2 participants