source: nanovis/branches/1.1/ColorTableShader.cpp @ 4893

Last change on this file since 4893 was 4889, checked in by ldelgass, 9 years ago

Merge r3611:3618 from trunk

  • 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.