source: trunk/packages/vizservers/nanovis/NvStdVertexShader.cpp @ 3464

Last change on this file since 3464 was 3362, checked in by ldelgass, 7 years ago

Merge nanovis2 branch to trunk

  • Property svn:eol-style set to native
File size: 740 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#include "NvStdVertexShader.h"
3
4NvStdVertexShader::NvStdVertexShader()
5{
6    init();
7}
8
9NvStdVertexShader::~NvStdVertexShader()
10{
11}
12
13void NvStdVertexShader::init()
14{
15    loadVertexProgram("vertex_std.cg", "main");
16}
17
18void NvStdVertexShader::bind(float *mvp, float *mvInv)
19{
20    if (mvp != NULL) {
21        setVPMatrixParameterf("modelViewProjMatrix", mvp);
22    } else {
23        setGLStateMatrixVPParameter("modelViewProjMatrix", MODELVIEW_PROJECTION_MATRIX);
24    }
25    if (mvInv != NULL) {
26        setVPMatrixParameterf("modelViewInv", mvInv);
27    } else {
28        setGLStateMatrixVPParameter("modelViewInv", MODELVIEW_MATRIX, MATRIX_INVERSE);
29    }
30
31    NvShader::bind();
32}
Note: See TracBrowser for help on using the repository browser.