Jump to content
  • Advertisement

lpswhuppy

Member
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

83 Neutral

About lpswhuppy

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. lpswhuppy

    DirectX or OpenGL - 2D

    Thanks servant i'll look into SDL and SFML.
  2. Okay so I would like to create a 2D game but I don't know if DirectX or OpenGL is better for 2D. Does anyone have any experience they could share?
  3. Hey I tried searching it.
  4. lpswhuppy

    WoA 3: Day 6 pt1

    NICE!
  5. lpswhuppy

    AOM

    Where did you get the chart....?
  6. lpswhuppy

    AOM

    What the hell is this a joke now?
  7. lpswhuppy

    AOM

      How?
  8. lpswhuppy

    AOM

    Is it 3D though?
  9. lpswhuppy

    AOM

    I mean like programming language and graphics like opengl or what...
  10. lpswhuppy

    AOM

    Does anyone know how Age of Mythology was made?
  11. Here is my code: I took it from an example and added a rectangle. When I resize the window the rectangle is not repositioning itself. //Include GLEW #include <GL/glew.h> //Include GLFW #include <GLFW/glfw3.h> //Include the standard C++ headers #include <stdio.h> #include <stdlib.h> //Define an error callback static void error_callback(int error, const char* description) { fputs(description, stderr); _fgetchar(); } //Define the key input callback static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } int main(void) { //Set the error callback glfwSetErrorCallback(error_callback); //Initialize GLFW if (!glfwInit()) { exit(EXIT_FAILURE); } //Set the GLFW window creation hints - these are optional //glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); //Request a specific OpenGL version //glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); //Request a specific OpenGL version //glfwWindowHint(GLFW_SAMPLES, 4); //Request 4x antialiasing //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); //Declare a window object GLFWwindow* window; //Create a window and create its OpenGL context window = glfwCreateWindow(640, 480, "Test Window", NULL, NULL); //If the window couldn't be created if (!window) { fprintf(stderr, "Failed to open GLFW window.\n"); glfwTerminate(); exit(EXIT_FAILURE); } //This function makes the context of the specified window current on the calling thread. glfwMakeContextCurrent(window); //Sets the key callback glfwSetKeyCallback(window, key_callback); //Initialize GLEW GLenum err = glewInit(); //If GLEW hasn't initialized if (err != GLEW_OK) { fprintf(stderr, "Error: %s\n", glewGetErrorString(err)); return -1; } //Set a background color glClearColor(0.0f, 0.0f, 0.0f, 0.0f); //Main Loop do { //Clear color buffer glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_QUADS); glVertex2f(-0.5f, 0.5f); glVertex2f(0.5f, 0.5f); glVertex2f(0.5f, -0.5f); glVertex2f(-0.5f, -0.5f); glEnd(); //Swap buffers glfwSwapBuffers(window); //Get and organize events, like keyboard and mouse input, window resizing, etc... glfwPollEvents(); } //Check if the ESC key had been pressed or if the window had been closed while (!glfwWindowShouldClose(window)); //Close OpenGL window and terminate GLFW glfwDestroyWindow(window); //Finalize and clean up GLFW glfwTerminate(); exit(EXIT_SUCCESS); }
  12. Have good game mechanics and it should be original.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!