Changeset 161 for trunk/tests/gui_test


Ignore:
Timestamp:
07/15/13 02:48:06 (12 years ago)
Author:
epyon
Message:
  • unified naming of attributes in nv
  • predefined attribute bindings based on unified names
  • unified naming of attributes in all tests
Location:
trunk/tests/gui_test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/gui_test/gui.frag

    r127 r161  
    11#version 120
    2 varying vec4 f_color;
    3 varying vec2 f_tcoord;
     2varying vec4 v_color;
     3varying vec2 v_texcoord;
    44uniform sampler2D tex;
    55 
    66void main(void) {
    7         vec4 texture = texture2D(tex,f_tcoord);
    8         gl_FragColor = f_color * texture;
     7        vec4 texture = texture2D(tex,v_texcoord);
     8        gl_FragColor = v_color * texture;
    99}
  • trunk/tests/gui_test/gui.vert

    r127 r161  
    11#version 120
    2 attribute vec2 coord;
    3 attribute vec2 tcoord;
    4 attribute vec4 color;
    5 uniform mat4 projection;
    6 varying vec4 f_color;
    7 varying vec2 f_tcoord;
     2attribute vec2 nv_position;
     3attribute vec2 nv_texcoord;
     4attribute vec4 nv_color;
     5uniform mat4 nv_projection;
     6varying vec4 v_color;
     7varying vec2 v_texcoord;
    88
    99void main(void) {
    10         f_color  = color;
    11         f_tcoord = tcoord;
    12         gl_Position = projection * vec4( coord.x, coord.y, 0.0, 1.0 );
     10        v_color     = nv_color;
     11        v_texcoord  = nv_texcoord;
     12        gl_Position = nv_projection * vec4( nv_position.x, nv_position.y, 0.0, 1.0 );
    1313}
Note: See TracChangeset for help on using the changeset viewer.