Changeset cbe946d in opengl-game


Ignore:
Timestamp:
Aug 23, 2019, 3:59:12 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
d53ef6a
Parents:
6544020
Message:

Add separate shaders for the scene and overlay to the Vulkan project and add some notes about future work

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NewOpenGLGame.vcxproj

    r6544020 rcbe946d  
    136136      <OptimizeReferences>true</OptimizeReferences>
    137137      <AdditionalDependencies>glew32s.lib;glfw3.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     138      <SubSystem>Console</SubSystem>
    138139    </Link>
    139140  </ItemDefinitionGroup>
     
    148149    <ClCompile Include="new-game.cpp" />
    149150    <ClCompile Include="StackWalker.cpp" />
    150     <ClCompile Include="stb_image.cpp" />
    151151    <ClCompile Include="utils.cpp" />
    152152  </ItemGroup>
  • README.txt

    r6544020 rcbe946d  
     1NOTE: NewOpenGLGame uses a 32-bit build, whule VulkanGame uses a 64-bit build.
     2Because of this, it's necessary to switch the glfw3 lib files when switching projects.
     3TODO: Make NewOpenGLGame work with a 64-bit build
     4
    15Installation Instructions for Linux
    26---------------------------------------
     
    3337---------------------------------------
    3438
    35 Download the precompiled 32bit binaries of GLFW and GLEW. Create lib/ and
     39Download the pre=compiled 32bit binaries of GLFW and GLEW. Create lib/ and
    3640include/ folders in the root opengl-game directory you cloned.
    3741Copy the include/GL/ and include/GLFW/ folders into your include/ folder.
     
    5559Create an include directory inside the opengl-game folder
    5660
    57 Download GLM and copy the glm folder into /include
     61Download GLM and copy the glm folder into your include directory
     62
     63Download the 64bit pre-compiledbinaries of GLFW3
     64 - Copy lib-vc2019/glfw3.lib into your lib directory
     65 - Copy the whole include/GLFW directory into your include directory
    5866
    5967Download the SDL2 pre-built Windows binaries
     
    6169 - Copy the contents of lib/x64 to lib
    6270
    63 Download the SDL_image Visual C++ development libraries from https://www.libsdl.org/projects/SDL_image/
     71Download the SDL2_image Visual C++ development libraries from https://www.libsdl.org/projects/SDL_image/
     72Download the SDL2_ttf Visual C++ development libraries from https://www.libsdl.org/projects/SDL_ttf/
     73(Might use SDL2_gfx later as well)
    6474
    65 Download the SDL_ttf Visual C++ development libraries from https://www.libsdl.org/projects/SDL_ttf/
     75Copy the 64-bit static libraries to the lib directory you created above
    6676
    6777TODO: Figure out how to do static compilation with SDL2
     78
     79Since I'm currently using dynamic SDL2 libraries for Windows, some DLLs from sdl2-ttf and sdl2-image
    6880
    6981Download the vulkan sdk
  • VulkanGame.vcxproj

    r6544020 rcbe946d  
    150150    <None Include="compile.bat" />
    151151    <None Include="compile.sh" />
    152     <None Include="shaders\shader.frag" />
    153     <None Include="shaders\shader.vert" />
     152    <None Include="shaders\overlay.frag" />
     153    <None Include="shaders\overlay.vert" />
     154    <None Include="shaders\scene.frag" />
     155    <None Include="shaders\scene.vert" />
    154156  </ItemGroup>
    155157  <ItemGroup>
  • vulkan-game.cpp

    r6544020 rcbe946d  
    7575   static VkVertexInputBindingDescription getBindingDescription() {
    7676      VkVertexInputBindingDescription bindingDescription = {};
     77
     78      // Since there is only one array of vertex data, we use binding = 0
     79      // I'll probably do that for the foreseeable future
     80      // I can calculate the stride myself given info about all the varying attributes
     81
     82      // In new-game.cpp, it looks like I had a C++ struct for each shader type anyway,
     83      // so I can use the same pattern for this as well probably
    7784
    7885      bindingDescription.binding = 0;
Note: See TracChangeset for help on using the changeset viewer.