Open predo2810 opened 1 year ago
I have the same. I'll try to figure out a workaround but I have really no idea what's going on. And yes on Visual Studio 2022.
If I set SDF_ENABLED I get the same memory error but from LoadFontEx... 🤔
@zment4 something is definitely wrong XD You're using Windows 11?
Windows 10 Home
@zment4 ok... so the problem is not windows
I tested with a base raylib project, and it fails on creating a GL window. My current thesis on the problem is that my laptop's GPU is not supported by raylib 😢
oh no... That's probably my problem too... i don't really have a GPU so...
Talking with people on raylib discord we found the problem was OpenGL version support. Raylib defaults to OpenGL 3.3, but my laptop GPU doesn't support that high. Raylib can be compiled with an earlier version, so they made a test for OpenGL 2.1 and that worked just fine. I'm currently in the process of figuring out how to do it on my own so I can maybe share that if I get it working.
@zment4 Yeaaah! Thank you dude :D
Alright, managed to finally test the project with a Raylib DLL built for OpenGL 2.1. After building, the raylib.dll needs to be replaced with this one raylib_ogl21.zip at location Chess-Challenge\bin\Release\net6.0\runtimes\win-x64\native
and in case the problem was no support for OpenGL 3.3, this should make it run now.
If I understand the build system correctly, the raylib.dll will get replaced after every build, so it's a bit of a chore, but I'll try to figure out a way to either make the replacing automatic (post-build copy action maybe?) or replace the DLL where it gets copied from in the first place.
@zment4 Perfect, do you want to let the issue open?
(For further improvements)
I don't mind either way. Seeing as this is more a workaround than a fix it might as well be left open.
Oh and btw setting up a post-build step for copying the dll to the correct folder like so copy /Y $(ProjectDir)..\raylib_ogl21.dll $(OutDir)runtimes\win-x64\native\raylib.dll
made building and running the program so much easier.
I don't mind either way. Seeing as this is more a workaround than a fix it might as well be left open.
Oh and btw setting up a post-build step for copying the dll to the correct folder like so
copy /Y $(ProjectDir)..\raylib_ogl21.dll $(OutDir)runtimes\win-x64\native\raylib.dll
made building and running the program so much easier.
So, you found a "usable" fix for now? Until now i made nothing except for thinking about what to do because i couldn't test the project :,)
Yes, replacing the Raylib-cs provided raylib.dll (which use OpenGL 3.3) with one that was compiled targeting OpenGL 2.1 (the one I linked) fixes the issue for me. With the post-build step copy it's also pretty seamless, after setting it up it works after every build without unnecessary manual copying.
I will test it to see if i get something to work
@zment4 - Well, it seems like my computer is worst than i expected... After doing what you said, and even after that, fixing some more things, i still didn't get it to work...
I looked further into (at least my) the dotnet command lines and used
dotnet run Chess-Challenge.csproj --no-build
to run the project and it worked without error. You still have to replace the "raylib.dll" file every time, but that can be fixed from one of the comments from @zment4 .
So, when i try to run the application, a console window open, and, after about 1 second of loading, this show up:
I don't really know what's happening, and, since the only modifiable file is the MyBot.cs, i don't think it would be fair for me to try to fix this myself...
I'm using visual studio 2022, i installed the C# (.NET) development and the desktop development with C# (I don't I'm missing something)
(it's in Portuguese and it says: Desktop development with .NET (left one) and Universal Windows platform development (right one))