Changes in / [95d7add:a9e808e] in network-game


Ignore:
Files:
9 added
4 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    r95d7add ra9e808e  
    263263   {
    264264      ALLEGRO_EVENT ev;
    265      
     265
    266266      al_wait_for_event(event_queue, &ev);
    267267
    268268      if(wndCurrent->handleEvent(ev)) {
     269         cout << "Processed gui event: " << getCurrentMillis() << endl;
    269270         // do nothing
    270271      }
  • client/makefile

    r95d7add ra9e808e  
    3636
    3737clean:
    38         rm *.o
    39         rm gameClient
     38        rm -f *.o
     39        rm -f gameClient
  • graphics_library/main.cpp

    r95d7add ra9e808e  
    77
    88// Include GLFW
    9 #include <GL/glfw.h>
     9#include <GLFW/glfw3.h>
     10GLFWwindow* window;
    1011
    1112// Include GLM
     
    2728        }
    2829
    29         glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
    30         glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
    31         glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
    32         glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
     30        glfwWindowHint(GLFW_SAMPLES, 4);
     31        glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
     32        glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
     33        glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    3334
    3435        // Open a window and create its OpenGL context
    35         if( !glfwOpenWindow( 1024, 768, 0,0,0,0, 32,0, GLFW_WINDOW ) )
    36         {
     36        window = glfwCreateWindow( 1024, 768, "Tutorial 0 - Keyboard and Mouse", NULL, NULL);
     37        if( window == NULL ){
    3738                fprintf( stderr, "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials.\n" );
    3839                glfwTerminate();
    3940                return -1;
    4041        }
     42        glfwMakeContextCurrent(window);
    4143
    4244        // Initialize GLEW
     
    4749        }
    4850
    49         glfwSetWindowTitle( "Tutorial 06" );
    50 
    5151        // Ensure we can capture the escape key being pressed below
    52         glfwEnable( GLFW_STICKY_KEYS );
    53         glfwSetMousePos(1024/2, 768/2);
     52        glfwSetInputMode(window, GLFW_STICKY_KEYS, GL_TRUE);
     53        glfwSetCursorPos(window, 1024/2, 768/2);
    5454
    5555        // Dark blue background
     
    227227
    228228                // Swap buffers
    229                 glfwSwapBuffers();
     229                glfwSwapBuffers(window);
     230                glfwPollEvents();
    230231
    231232        } // Check if the ESC key was pressed or the window was closed
    232         while( glfwGetKey( GLFW_KEY_ESC ) != GLFW_PRESS &&
    233                    glfwGetWindowParam( GLFW_OPENED ) );
     233        while( glfwGetKey(window, GLFW_KEY_ESCAPE ) != GLFW_PRESS &&
     234                   glfwWindowShouldClose(window) == 0 );
    234235
    235236        // Cleanup VBO and shader
  • graphics_library/makefile

    r95d7add ra9e808e  
    11CC = g++
    2 LIB_FLAGS = -lGL -lglut -lGLEW -lglfw
     2LIB_FLAGS = -lGL -lglut -lGLEW `pkg-config glfw3 --static --cflags --libs`
    33FLAGS = -Wall
    4 DEPENDENCIES =
     4DEPENDENCIES = common/texture.o common/controls.o common/shader.o
    55
    66graphics_engine : main.cpp $(DEPENDENCIES)
     
    1111
    1212clean:
    13         rm graphics_engine
    14         rm *.o
     13        rm -f *.o
     14        rm -f common/*.o
     15        rm -f graphics_engine
Note: See TracChangeset for help on using the changeset viewer.