Changeset 161 for trunk/src/gl


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/src/gl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_device.cc

    r153 r161  
    4444        SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
    4545        SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
    46         SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
     46        SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24 );
    4747        SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
     48
     49        SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 );
     50        SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4 );
     51
    4852}
    4953
  • trunk/src/gl/gl_program.cc

    r121 r161  
    105105        if (!vertex_shader.compile( vertex_program )) { return false; }
    106106        if (!fragment_shader.compile( fragment_program )) { return false; }
     107
     108        glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::POSITION ), "nv_position" );
     109        glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::TEXCOORD ), "nv_texcoord" );
     110        glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::NORMAL   ), "nv_normal"   );
     111        glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::COLOR    ), "nv_color"    );
     112        glBindAttribLocation( m_name.get_value(), static_cast<GLuint>( slot::TANGENT  ), "nv_tangent"  );
    107113
    108114        glAttachShader( m_name.get_value(), fragment_shader.get_id() );
Note: See TracChangeset for help on using the changeset viewer.