Changeset 4e0b82b in opengl-game


Ignore:
Timestamp:
May 3, 2018, 2:45:49 AM (7 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
54b6d6b
Parents:
9f4986b
Message:

Add an ImGui example project

Files:
15 added
3 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r9f4986b r4e0b82b  
    55
    66gl.log
     7
     8imgui.ini
    79
    810# Visual Studio files
  • NewOpenGLGame.vcxproj

    r9f4986b r4e0b82b  
    125125  </ItemDefinitionGroup>
    126126  <ItemGroup>
     127    <ClCompile Include="gl3w.c" />
     128    <ClCompile Include="imgui.cpp" />
     129    <ClCompile Include="imgui_demo.cpp" />
     130    <ClCompile Include="imgui_draw.cpp" />
     131    <ClCompile Include="imgui_impl_glfw_gl3.cpp" />
    127132    <ClCompile Include="logger.cpp" />
    128133    <ClCompile Include="new-game.cpp" />
     134    <ClCompile Include="imgui_example.cpp" />
     135    <ClCompile Include="stb_image_write.h" />
    129136    <ClCompile Include="stb_image.cpp" />
    130137  </ItemGroup>
    131138  <ItemGroup>
     139    <ClInclude Include="gl3w.h" />
     140    <ClInclude Include="glcorearb.h" />
     141    <ClInclude Include="imgui_internal.h" />
     142    <ClInclude Include="imgui_impl_glfw_gl3.h" />
     143    <ClInclude Include="imgui.h" />
    132144    <ClInclude Include="logger.h" />
    133145    <ClInclude Include="stb_image.h" />
     146    <ClInclude Include="stb_rect_pack.h" />
     147    <ClInclude Include="stb_textedit.h" />
     148    <ClInclude Include="stb_truetype.h" />
    134149  </ItemGroup>
    135150  <ItemGroup>
  • new-game.cpp

    r9f4986b r4e0b82b  
    22
    33#include "stb_image.h"
     4
     5// I think this was for the OpenGL 4 book font file tutorial
     6//#define STB_IMAGE_WRITE_IMPLEMENTATION
     7//#include "stb_image_write.h"
    48
    59#define _USE_MATH_DEFINES
     
    105109         obj = &*it;
    106110
    107          for (int p_idx = 0; p_idx < it->points.size(); p_idx += 9) {
     111         for (unsigned int p_idx = 0; p_idx < it->points.size(); p_idx += 9) {
    108112            if (faceClicked({
    109113               vec3(it->points[p_idx], it->points[p_idx + 1], it->points[p_idx + 2]),
     
    131135}
    132136
    133 int main(int argc, char* argv[]) {
     137int realmain(int argc, char* argv[]) {
    134138   cout << "New OpenGL Game" << endl;
    135139
     
    537541
    538542      // group scene objects by shader
    539       for (int i=0; i < objects.size(); i++) {
     543      for (unsigned int i=0; i < objects.size(); i++) {
    540544         if (objects[i].shader_program == shader_program) {
    541545            program1_objects.push_back(i);
Note: See TracChangeset for help on using the changeset viewer.