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: lerwen

Search: Search took 0.00 seconds.

  1. Replies
    11
    Views
    11,397

    Re: trouble with arcball rotation and translation

    you can try



    float current_matrix[16];
    glGetFloatv(GL_MODELVIEW_MATRIX, current_matrix);
    glLoadIdentity();
    glTranslatef(x_translate_amount, y_translate_amount, 0);...
  2. Replies
    4
    Views
    3,483

    Re: polygon rasterization and depth test

    The thing is though, The top-left convention alone, doesn't take care of the case when your edge is on the sillohuet of a mesh. The edge would be either the top-left in both triangles (the...
  3. Replies
    4
    Views
    3,483

    polygon rasterization and depth test

    According to the specification, the depth of a fragment is the weighted (by baricentric coordinates) avrage of the depth of the three points that define a triangle.

    The problem I see with this is...
  4. Replies
    10
    Views
    1,497

    Re: wanted zooming code

    I dont think it will reduce performance since you do the scale on the projection matrix, and all the normalization of normals (if any) takes place before the projection matrix is even used
  5. Replies
    10
    Views
    1,497

    Re: wanted zooming code

    do a glScale(x, x, 1) to your projection matrix right after you load the identity (before any calls to glFrustum glOrtho and such) this will have a zooming effect when x > 1 and the opposite when x <...
  6. Thread: Rotation

    by lerwen
    Replies
    2
    Views
    412

    Re: Rotation

    after you do translate(x,y,0)

    translate to the right w/2 and up h/2, do the rotate, and translate it left w/2 and down h/2.
  7. Replies
    3
    Views
    523

    Re: Zoom window in Perspective view?

    i think an easy way of doing this is to save the currect projection matrix (M), then create a matrix to do the apropriate mapping(A), and then make the projection matrix A times M.

    you can create...
  8. Replies
    2
    Views
    1,539

    Re: gluDisk Texture mapping problem

    I think gluDisk maps the texture coordinates in a doesnt gluDisk map coordinates like a polor coordinate system? but your texure looks like it's mapped out in cartesian space, so why not just draw a...
  9. Re: Is it possible to create an opengl space without glortho or glu perspective

    yes the size of your space is always a 2x2x2 cube centered at the origin and your transformation matrix maps coordinates into that space, so with the identity matrix ana point (x,y,z) with an x value...
  10. Replies
    2
    Views
    253

    Re: light position problem

    i tried changing it to draw a triangle instead of the teapot, and it was lit correctly with my normals. now I think the normals for the teapot are incorectly defined. IS THIS **** CRAZY OR WHAT?
  11. Replies
    2
    Views
    253

    light position problem

    it looks like my y and z coordinate for the light position are mixed up. before I position my light, it comes from +y (instead of +z) and to 'fix' it i have to set its position to {0, 1, 0, 0}. I...
Results 1 to 11 of 11