Changeset 4e0b82b in opengl-game for new-game.cpp


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

Add an ImGui example project

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.