Polytonic / Glitter

Dead Simple OpenGL
http://polytonic.github.io/Glitter/
2.46k stars 416 forks source link

Does not work on windows #57

Closed inputusernamehere closed 3 years ago

inputusernamehere commented 4 years ago

I followed the readme and used the win64 version of the latest visual studio as my parameter for the last step.

This gave me a ..\Glitter folder with Headers, Shaders, Sources and Vendor subdirectories, that contain code files. I would have expected a solution file here as well, but I take it I am supposed to use the solution file that was created in the Build folder, \Build\Glitter.sln. When trying to compile and run this solution, it compiles fine but won't start due to an "Access is denied" error. The thing being denied access to is Glitter\Build\x64\Debug\ALL_BUILD.

I'm not sure if I did something wrong, or if the latest visual studio option does not work out of the box.

Polytonic commented 4 years ago

Hiya! Sorry for the delayed response. I'm not sure why you would be running into permissions issues, but my initial guess is that you have placed your project into a directory your user does not have write access to. Visual Studio works out of the box on both Windows machines I have access to.

inputusernamehere commented 4 years ago

Weird, I tried again in the My Documents folder, which I definitely have write access to, and got the same error. Launched Visual Studio as administrator to no avail, same error still. Can you confirm these are the commands you used?

git clone --recursive https://github.com/Polytonic/Glitter
cd Glitter
cd Build
cmake -G "Visual Studio 15 2017 Win64" ..

If so it's probably something particular to my setup, but I have no idea what it could be.

Polytonic commented 4 years ago

Hmm, that's strange. Yes, those are the commands I used (granted, older version of Visual Studio, but should work nonetheless).

cainmartin commented 4 years ago

If you build and run the project in VS as it is generated, you will get this error. I believe it is because ALL_BUILD is set as the default project. Try setting Glitter to be the startup project (right click "Set as StartUp project") - and you will no longer get the error and you will see the blank OpenGL window.

inputusernamehere commented 4 years ago

Thanks, that does the trick! No idea how I missed that.

zinwalin commented 4 years ago

@cainmartin

curious about example as below, where and how to run it ? appreciated.

image

pratikone commented 3 years ago

I also faced this issue. A good idea would be to tweak Cmake script to set Glitter as the startup project. Alternatively, add this to the README. It seems to be an easy fix

Polytonic commented 3 years ago

The last I checked (maybe a year ago) it's not possible to set the default project in Visual Studio using cmake, but I haven't really looked into it recently. Maybe it's different now.

Anyway, it does seem the original issue has been solved, so I'm going to close this for now.