source: trunk/packages/vizservers/nanovis/ColorTableShader.cpp @ 3612

Last change on this file since 3612 was 3612, checked in by ldelgass, 6 years ago

Remove Nv prefix from shader classes now that they are in nv namespace.

  • Property svn:eol-style set to native
File size: 737 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 "ColorTableShader.h"
7
8using namespace nv;
9
10ColorTableShader::ColorTableShader()
11{
12    init();
13}
14
15ColorTableShader::~ColorTableShader()
16{
17}
18
19void ColorTableShader::init()
20{
21    loadFragmentProgram("one_plane.cg", "main"); 
22}
23
24void ColorTableShader::bind(Texture2D *plane, TransferFunction *tf)
25{
26    setFPTextureParameter("data", plane->id());
27    setFPTextureParameter("tf", tf->id());
28
29    setFPParameter4f("render_param", 0., 0., 0., 0.);
30
31    Shader::bind();
32}
33
34void ColorTableShader::unbind()
35{
36    disableFPTextureParameter("data");
37    disableFPTextureParameter("tf");
38
39    Shader::unbind();
40}
Note: See TracBrowser for help on using the repository browser.