Changeset 3de31cf in opengl-game


Ignore:
Timestamp:
Oct 3, 2019, 3:46:06 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
ee75487
Parents:
7d2b0b9
git-author:
Dmitry Portnoy <dmp1488@…> (10/03/19 03:45:53)
git-committer:
Dmitry Portnoy <dmp1488@…> (10/03/19 03:46:06)
Message:

Add and begin implementing an OpenGL version of the GraphicsPipeline class

Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • OpenGLGame.vcxproj

    r7d2b0b9 r3de31cf  
    2323    <ClCompile Include="FileStackWalker.cpp" />
    2424    <ClCompile Include="game-gui-glfw.cpp" />
     25    <ClCompile Include="graphics-pipeline_opengl.cpp" />
    2526    <ClCompile Include="IMGUI\imgui.cpp" />
    2627    <ClCompile Include="IMGUI\imgui_demo.cpp" />
     
    3940    <ClInclude Include="game-gui-glfw.hpp" />
    4041    <ClInclude Include="game-gui.hpp" />
     42    <ClInclude Include="graphics-pipeline.hpp" />
     43    <ClInclude Include="graphics-pipeline_opengl.hpp" />
    4144    <ClInclude Include="IMGUI\imgui.h" />
    4245    <ClInclude Include="IMGUI\imgui_internal.h" />
     
    4851    <ClInclude Include="opengl-game.hpp" />
    4952    <ClInclude Include="StackWalker.h" />
     53  </ItemGroup>
     54  <ItemGroup>
     55    <None Include="gl-shaders\asteroid.frag" />
     56    <None Include="gl-shaders\asteroid.vert" />
     57    <None Include="gl-shaders\explosion.frag" />
     58    <None Include="gl-shaders\explosion.vert" />
     59    <None Include="gl-shaders\laser.frag" />
     60    <None Include="gl-shaders\laser.vert" />
     61    <None Include="gl-shaders\ship.frag" />
     62    <None Include="gl-shaders\ship.vert" />
    5063  </ItemGroup>
    5164  <PropertyGroup Label="Globals">
  • opengl-game.cpp

    r7d2b0b9 r3de31cf  
    103103   // Otherwise, it seems they get overridden by ImGui
    104104   ((GameGui_GLFW*)gui)->bindEventHandlers();
     105
     106   graphicsPipelines.push_back(GraphicsPipeline_OpenGL());
     107   graphicsPipelines.back().createPipeline("gl-shaders/ship.vert", "gl-shaders/ship.frag");
     108
     109   graphicsPipelines.push_back(GraphicsPipeline_OpenGL());
     110   graphicsPipelines.back().createPipeline("gl-shaders/asteroid.vert", "gl-shaders/asteroid.frag");
     111
     112   graphicsPipelines.push_back(GraphicsPipeline_OpenGL());
     113   graphicsPipelines.back().createPipeline("gl-shaders/laser.vert", "gl-shaders/laser.frag");
     114
     115   graphicsPipelines.push_back(GraphicsPipeline_OpenGL());
     116   graphicsPipelines.back().createPipeline("gl-shaders/explosion.vert", "gl-shaders/explosion.frag");
     117
     118   cout << "Created " << graphicsPipelines.size() << " graphics pipelines" << endl;
    105119}
    106120
  • opengl-game.hpp

    r7d2b0b9 r3de31cf  
    66
    77#include "game-gui-glfw.hpp"
     8#include "graphics-pipeline_opengl.hpp"
    89
    910class OpenGLGame {
     
    1617   private:
    1718      GameGui* gui;
     19
     20      vector<GraphicsPipeline_OpenGL> graphicsPipelines;
     21
    1822      GLFWwindow* window;
    1923
Note: See TracChangeset for help on using the changeset viewer.