Ignore:
Timestamp:
Apr 9, 2012, 11:13:08 PM (8 years ago)
Author:
ldelgass
Message:

First batch of converting shaders to use new parameter support in NvShader?.

File:
1 edited

Legend:

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

    r2953 r2956  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    2 
    3 #include <GL/glew.h>
    4 #include <Cg/cgGL.h>
    5 
    62#include "NvStdVertexShader.h"
    73
     
    1814{
    1915    loadVertexProgram("vertex_std.cg", "main");
    20     _mvpVertStdParam = getNamedParameterFromVP("modelViewProjMatrix");
    21     _mviVertStdParam = getNamedParameterFromVP("modelViewInv");
    2216}
    2317
    2418void NvStdVertexShader::bind()
    2519{
    26     cgGLSetStateMatrixParameter(_mvpVertStdParam, CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY);
    27     cgGLSetStateMatrixParameter(_mviVertStdParam, CG_GL_MODELVIEW_MATRIX, CG_GL_MATRIX_INVERSE);
     20    setGLStateMatrixVPParameter("modelViewProjMatrix", MODELVIEW_PROJECTION_MATRIX, MATRIX_IDENTITY);
     21    setGLStateMatrixVPParameter("modelViewInv", MODELVIEW_MATRIX, MATRIX_INVERSE);
    2822
    2923    NvShader::bind();
Note: See TracChangeset for help on using the changeset viewer.