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

Last change on this file since 3568 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
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[3502]2/*
3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
4 *
5 */
[580]6#include "NvColorTableShader.h"
7
8NvColorTableShader::NvColorTableShader()
9{
10    init();
11}
12
13NvColorTableShader::~NvColorTableShader()
14{
15}
16
17void NvColorTableShader::init()
18{
[2870]19    loadFragmentProgram("one_plane.cg", "main");
[580]20}
[2859]21
22void NvColorTableShader::bind(Texture2D *plane, TransferFunction *tf)
23{
[2956]24    setFPTextureParameter("data", plane->id());
25    setFPTextureParameter("tf", tf->id());
[2859]26
[2956]27    setFPParameter4f("render_param", 0., 0., 0., 0.);
28
[2914]29    NvShader::bind();
[2859]30}
31
32void NvColorTableShader::unbind()
33{
[2956]34    disableFPTextureParameter("data");
35    disableFPTextureParameter("tf");
[2914]36
37    NvShader::unbind();
[2859]38}
Note: See TracBrowser for help on using the repository browser.