Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: Timppa

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,376

    You should indeed enable Vsync like mentioned...

    You should indeed enable Vsync like mentioned above.

    However on top of that it is also a good idea to use delta timing. Otherwise the game will run faster/slower on some systems even with vSync...
  2. Replies
    5
    Views
    878

    Everything you mentioned above seems correct. ...

    Everything you mentioned above seems correct.


    glOrtho can be used for an orthographic projection, may be useful for some 2d stuff. I guess you could also define your own matrix manually and load...
  3. Replies
    12
    Views
    7,367

    The reason that happens is because you do not...

    The reason that happens is because you do not have a projection matrix set up. By default it is using orthographic projection and does not have perspective, all non-normalized coordinates are clipped...
  4. Replies
    5
    Views
    878

    I drew a picture in ms paint....

    I drew a picture in ms paint.
    (EDIT: note that first arrow should read model matrix)

    So, if you have those tetris blocks defined in local coordinates, you multiply each one of them by a model...
  5. Replies
    12
    Views
    7,367

    Like I mentioned, you should use glPushMatrix()...

    Like I mentioned, you should use glPushMatrix() and glPopMatrix(), see the code example I posted above (replace glScalef with glTranslatef).
    For setting the near / far plane, you can use...
  6. Replies
    12
    Views
    7,367

    Ah, so you don't actually want to change the size...

    Ah, so you don't actually want to change the size of the object, you only want to move closer/further so that the object looks smaller/larger? In that case my previous example still works, just...
  7. Replies
    12
    Views
    7,367

    What are you exactly trying to achieve? If you...

    What are you exactly trying to achieve? If you want a binoculars-like zoom that affects everything, you can do this by decreasing the field of view in projection matrix. For example, if you are using...
Results 1 to 7 of 7