Last change
on this file since 4809 was
3502,
checked in by ldelgass, 11 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 | |
---|
8 | NvStdVertexShader::NvStdVertexShader() |
---|
9 | { |
---|
10 | init(); |
---|
11 | } |
---|
12 | |
---|
13 | NvStdVertexShader::~NvStdVertexShader() |
---|
14 | { |
---|
15 | } |
---|
16 | |
---|
17 | void NvStdVertexShader::init() |
---|
18 | { |
---|
19 | loadVertexProgram("vertex_std.cg", "main"); |
---|
20 | } |
---|
21 | |
---|
22 | void 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.