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

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

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

  • Property svn:eol-style set to native
File size: 918 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 "PointShader.h"
7
8PointShader::PointShader() :
9    NvShader(),
10    _scale(1.0f),
11    _normal(NULL)
12{
13    loadVertexProgram("pointsvp.cg", "main");
14}
15
16PointShader::~PointShader()
17{
18}
19
20void PointShader::bind()
21{
22    setGLStateMatrixVPParameter("modelview", MODELVIEW_MATRIX, MATRIX_IDENTITY);
23    setGLStateMatrixVPParameter("projection", PROJECTION_MATRIX, MATRIX_IDENTITY);
24
25    setVPParameter1f("atten", 1.0f);
26    setVPParameter4f("posoffset", 1.0f, 1.0f, 1.0f, 1.0f);
27    setVPParameter4f("basepos", 1.0f, 1.0f, 1.0f, 1.0f);
28    setVPParameter4f("scale", _scale, 1.0f, 1.0f, 1.0f);
29    //setVPTextureParameter("normal", _normal->getGraphicsObjectID());
30
31    NvShader::bind();
32}
33
34void PointShader::unbind()
35{
36    //disableVPTextureParameter("normal");
37
38    NvShader::unbind();
39}
Note: See TracBrowser for help on using the repository browser.