source: nanovis/branches/1.1/NvStdVertexShader.cpp @ 4804

Last change on this file since 4804 was 3502, checked in by ldelgass, 7 years ago

Add basic VTK structured points reader to nanovis, update copyright dates.

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