Ignore:
Timestamp:
Apr 1, 2012, 3:40:04 PM (8 years ago)
Author:
ldelgass
Message:

Start converting shader subclasses to use NvShader::bind/unbind, loader methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/NvStdVertexShader.cpp

    r2882 r2914  
    1919{
    2020    loadVertexProgram("vertex_std.cg", "main");
    21     _mvp_vert_std_param = cgGetNamedParameter(_cgVP, "modelViewProjMatrix");
    22     _mvi_vert_std_param = cgGetNamedParameter(_cgVP, "modelViewInv");
     21    _mvpVertStdParam = getNamedParameterFromVP("modelViewProjMatrix");
     22    _mviVertStdParam = getNamedParameterFromVP("modelViewInv");
    2323}
    2424
    2525void NvStdVertexShader::bind()
    2626{
    27     cgGLSetStateMatrixParameter(_mvp_vert_std_param, CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY);
    28     cgGLSetStateMatrixParameter(_mvi_vert_std_param, CG_GL_MODELVIEW_MATRIX, CG_GL_MATRIX_INVERSE);
    29     cgGLBindProgram(_cgVP);
    30     cgGLEnableProfile(CG_PROFILE_VP40);
     27    cgGLSetStateMatrixParameter(_mvpVertStdParam, CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY);
     28    cgGLSetStateMatrixParameter(_mviVertStdParam, CG_GL_MODELVIEW_MATRIX, CG_GL_MATRIX_INVERSE);
     29
     30    NvShader::bind();
    3131}
    32 
    33 void NvStdVertexShader::unbind()
    34 {
    35     cgGLDisableProfile(CG_PROFILE_VP40);
    36 }
Note: See TracChangeset for help on using the changeset viewer.