Results 1 to 3 of 3

Thread: help in game graphics using OpenGL

  1. #1
    Member Newbie
    Join Date
    Nov 2010
    Location
    IIT Roorkee, India
    Posts
    31

    help in game graphics using OpenGL

    Hi friends

    Currently I am developing a classical 2d game. In the game there are bricks in the upper screen and the bricks are to be broken by ball and we can move the paddle right and left. Hope you understood the game as I do not know the standard name for it.

    So the problem is when I am trying to give keyboard input, it is not that smooth. I mean if I keep on pressing a key, say left key, then the number of times that input is read in a second by OpenGL is finite and which that finite number of inputs I am unable to smoothly animate the paddle. I am using the glutKeyboardFunc(); for taking user input. Suggest me if there is any better way of giving input so that the paddle animates smoothly.
    learning to breathe

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: help in game graphics using OpenGL

    Use GLFW instead of struggling with GLUT for that.
    Otherwise the idea is to only get events for key down and key up.

  3. #3
    Member Newbie
    Join Date
    Nov 2010
    Location
    IIT Roorkee, India
    Posts
    31

    Re: help in game graphics using OpenGL

    yeah the second one worked.
    learning to breathe

Similar Threads

  1. Replies: 19
    Last Post: 02-01-2013, 12:57 AM
  2. GUI for OpenGL graphics
    By Gabba123XXL in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 10-24-2011, 04:15 PM
  3. 2d graphics with OpenGL
    By mbk in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-28-2007, 08:37 AM
  4. Replies: 6
    Last Post: 11-01-2004, 08:26 PM
  5. 2D Graphics with OpenGL
    By donev in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-23-2003, 11:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean