Or, how do I include OpenGL source in my project?
Copyright 2015-2022 by Rebecca Ann Heineman [email protected]
It is released under an MIT Open Source license. Please see LICENSE for license details. Yes, you can use it in a commercial title without paying anything, just give me a credit.
Please? It's not like I'm asking you for money!
This is a plug in for Visual Studio 2010 or higher that will allow files with the GLSL extension to automatically be processed with a tool that will remove all white space and comments and then create a C/C++ header that can be directly included in a C++ program for use with OpenGL.
The tool will be listed as "Comment stripper tool"
Visual Studio 2010, 2012, 2013 or any other MSBuild compatible IDE.
Copy the contents of the "plugin" folder to the folder C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations
Find this line in your .vcxproj file <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
Insert this after it
<ImportGroup Label="ExtensionSettings"/>
<Import Project="$(VCTargetsPath)\BuildCustomizations\glsl.props" />
</ImportGroup>
Find this line near the end of your .vcxproj file <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Insert this after it.
<ImportGroup Label="ExtensionTargets"/>
<Import Project="$(VCTargetsPath)\BuildCustomizations\glsl.targets" />
</ImportGroup>
The source code to the tool is in the folder "source". It will require Burgerlib for some subroutines. https://github.com/Olde-Skuul/KitchenSink has the binaries of the library and https://github.com/Olde-Skuul/burgerlib has the source to the library.
- Install Visual Studio 2022
- Install the Visual Studio SDK
- Install the Windows SDK 10 (Any version should do)
- Install the ARM and ARM64 C++ compilers V143
- In the Visual Studio extensions, install Microsoft Visual Studio Installer Projects 2022
- Install Python (Prefer 3)
- pip install makeprojects
- Ensure python scripts are in the PATH so python scripts can be run from the command line
- Set the directory to the folder these instructions reside, usually "GLSL"
- buildme
- Install XCode
- Install Python (Prefer 3 using brew or macports)
- pip install makeprojects
- Ensure python scripts are in the PATH so python scripts can be run from the terminal
- Set the directory to the folder "stripcomments"
- buildme
- Rename the executable in the bin folder to "stripcomments"
- move the tool into the folder that contains tools, /opt/local/bin is an example