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

Last change on this file since 3464 was 2956, checked in by ldelgass, 12 years ago

First batch of converting shaders to use new parameter support in NvShader?.

  • Property svn:eol-style set to native
File size: 674 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#include "NvColorTableShader.h"
3
4NvColorTableShader::NvColorTableShader()
5{
6    init();
7}
8
9NvColorTableShader::~NvColorTableShader()
10{
11}
12
13void NvColorTableShader::init()
14{
15    loadFragmentProgram("one_plane.cg", "main");
16}
17
18void NvColorTableShader::bind(Texture2D *plane, TransferFunction *tf)
19{
20    setFPTextureParameter("data", plane->id());
21    setFPTextureParameter("tf", tf->id());
22
23    setFPParameter4f("render_param", 0., 0., 0., 0.);
24
25    NvShader::bind();
26}
27
28void NvColorTableShader::unbind()
29{
30    disableFPTextureParameter("data");
31    disableFPTextureParameter("tf");
32
33    NvShader::unbind();
34}
Note: See TracBrowser for help on using the repository browser.