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

Last change on this file since 5722 was 4904, checked in by ldelgass, 5 years ago

Merge serveral changes from trunk. Does not include threading, world space
changes, etc.

  • Property svn:eol-style set to native
File size: 729 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"); 
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.