Ignore:
Timestamp:
Nov 19, 2012, 1:45:47 AM (8 years ago)
Author:
sam
Message:

neercs: do not pass the texture coordinates from the application to
the GL server; instead, simply deduce them from the vertex coordinates
and interpolate them in the fragment shader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/render.cpp

    r2059 r2092  
    6868float fx_angle;            // current angle
    6969/* fs_quad variable */
    70 float fs_quad_vtx[] = {-1.0f, 1.0f, 0, 1.0f, -1.0f, -1.0f, 0, 1.0f, 1.0f, -1.0f, 0, 1.0f, 1.0f, 1.0f, 0, 1.0f};
    71 float fs_quad_tex[] = {0, 1.0f, 0, 0, 1.0f, 0, 1.0f, 1.0f};
     70float fs_quad_vtx[] =
     71{
     72    -1.0f,  1.0f, 0, 1.0f,
     73    -1.0f, -1.0f, 0, 1.0f,
     74     1.0f, -1.0f, 0, 1.0f,
     75     1.0f,  1.0f, 0, 1.0f
     76};
    7277/* flash variable */
    7378bool flash_flag = false;   // flag
     
    14721477    glMatrixMode(GL_MODELVIEW);
    14731478
    1474     fx_angle=main_angle-part_angle;
     1479    fx_angle = main_angle - part_angle;
    14751480}
    14761481
     
    14851490    glEnableClientState(GL_VERTEX_ARRAY);
    14861491    glVertexPointer(4, GL_FLOAT, 0, fs_quad_vtx);
    1487 
    1488     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    1489     glTexCoordPointer(2, GL_FLOAT, 0, fs_quad_tex);
    14901492
    14911493    if (m_shader_copper)
     
    17241726
    17251727    glDisableClientState(GL_VERTEX_ARRAY);
    1726     glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    17271728}
    17281729
Note: See TracChangeset for help on using the changeset viewer.