Changeset 40 for trunk/src/gl


Ignore:
Timestamp:
05/28/13 02:11:06 (12 years ago)
Author:
epyon
Message:
  • bugfixes
Location:
trunk/src/gl
Files:
2 edited

Legend:

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

    r36 r40  
    99using namespace nv;
    1010
    11 unsigned int clear_state_buffers_to_mask( clear_state::buffers_type type )
     11unsigned int nv::clear_state_buffers_to_mask( clear_state::buffers_type type )
    1212{
    1313        unsigned int mask = 0;
     
    1818}
    1919
    20 unsigned int depth_state_function_to_enum( depth_test::function_type type )
     20unsigned int nv::depth_state_function_to_enum( depth_test::function_type type )
    2121{
    2222        switch( type )
     
    3434}
    3535
    36 unsigned int blending_factor_to_enum( blending::factor type )
     36unsigned int nv::blending_factor_to_enum( blending::factor type )
    3737{
    3838        switch( type )
     
    5757}
    5858
    59 unsigned int blending_equation_to_enum( blending::equation type )
     59unsigned int nv::blending_equation_to_enum( blending::equation type )
    6060{
    6161        switch( type )
     
    7070}
    7171
    72 unsigned int culling_face_type_to_enum( culling::face_type type )
     72unsigned int nv::culling_face_type_to_enum( culling::face_type type )
    7373{
    7474        switch( type )
     
    8181}
    8282
    83 unsigned int culling_order_type_to_enum( culling::order_type type )
     83unsigned int nv::culling_order_type_to_enum( culling::order_type type )
    8484{
    8585        switch( type )
     
    9191}
    9292
    93 unsigned int stencil_function_to_enum( stencil_test_face::function_type type )
     93unsigned int nv::stencil_function_to_enum( stencil_test_face::function_type type )
    9494{
    9595        switch( type )
     
    107107}
    108108
    109 unsigned int stencil_operation_to_enum( stencil_test_face::operation type )
     109unsigned int nv::stencil_operation_to_enum( stencil_test_face::operation type )
    110110{
    111111        switch( type )
     
    123123}
    124124
    125 unsigned int type_to_gl_enum( type type )
     125unsigned int nv::type_to_gl_enum( type type )
    126126{
    127127        switch( type )
     
    142142}
    143143
    144 nv::type gl_enum_to_type( unsigned int gl_enum )
     144nv::type nv::gl_enum_to_type( unsigned int gl_enum )
    145145{
    146146        switch( gl_enum )
  • trunk/src/gl/gl_program.cc

    r37 r40  
    6060        char buffer[ buffer_size ] = { 0 };
    6161        int length;
     62        int compile_ok = GL_FALSE;
     63        glGetShaderiv(object_id, GL_COMPILE_STATUS, &compile_ok);
    6264        glGetShaderInfoLog( object_id, buffer_size, &length, buffer );
    6365
    6466        if ( length > 0 )
    6567        {
    66                 NV_LOG( LOG_INFO, "Shader #" << object_id << " compiled: " << buffer );
     68                if ( compile_ok == 0 )
     69                {
     70                        NV_LOG( LOG_ERROR, "Shader #" << object_id << " error: " << buffer );
     71                }
     72                else
     73                {
     74                        NV_LOG( LOG_INFO, "Shader #" << object_id << " compiled successfully: " << buffer );
     75                }
    6776        }
    6877        else
     
    7079                NV_LOG( LOG_INFO, "Shader #" << object_id << " compiled successfully." );
    7180        }
    72         return true;
     81        return compile_ok != 0;
    7382}
    7483
     
    182191        glGetProgramInfoLog( m_name.get_value(), buffer_size, &length, buffer );
    183192
    184         NV_LOG( LOG_INFO, "Program #" << m_name.get_value() << (status == GL_FALSE ? "failed to compile!" : "compiled successfuly.") );
     193        NV_LOG( LOG_INFO, "Program #" << m_name.get_value() << (status == GL_FALSE ? " failed to compile!" : " compiled successfully.") );
    185194
    186195        if ( length > 0 )
Note: See TracChangeset for help on using the changeset viewer.