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

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

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

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