Changeset 3612


Ignore:
Timestamp:
Apr 2, 2013, 11:31:43 PM (7 years ago)
Author:
ldelgass
Message:

Remove Nv prefix from shader classes now that they are in nv namespace.

Location:
trunk/packages/vizservers/nanovis
Files:
22 edited
14 moved

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/ColorTableShader.cpp

    r3611 r3612  
    44 *
    55 */
    6 #include "NvColorTableShader.h"
     6#include "ColorTableShader.h"
    77
    88using namespace nv;
    99
    10 NvColorTableShader::NvColorTableShader()
     10ColorTableShader::ColorTableShader()
    1111{
    1212    init();
    1313}
    1414
    15 NvColorTableShader::~NvColorTableShader()
     15ColorTableShader::~ColorTableShader()
    1616{
    1717}
    1818
    19 void NvColorTableShader::init()
     19void ColorTableShader::init()
    2020{
    2121    loadFragmentProgram("one_plane.cg", "main");
    2222}
    2323
    24 void NvColorTableShader::bind(Texture2D *plane, TransferFunction *tf)
     24void ColorTableShader::bind(Texture2D *plane, TransferFunction *tf)
    2525{
    2626    setFPTextureParameter("data", plane->id());
     
    2929    setFPParameter4f("render_param", 0., 0., 0., 0.);
    3030
    31     NvShader::bind();
     31    Shader::bind();
    3232}
    3333
    34 void NvColorTableShader::unbind()
     34void ColorTableShader::unbind()
    3535{
    3636    disableFPTextureParameter("data");
    3737    disableFPTextureParameter("tf");
    3838
    39     NvShader::unbind();
     39    Shader::unbind();
    4040}
  • trunk/packages/vizservers/nanovis/ColorTableShader.h

    r3611 r3612  
    77#define NV_COLORTABLE_SHADER_H
    88
    9 #include "NvShader.h"
     9#include "Shader.h"
    1010#include "Texture2D.h"
    1111#include "TransferFunction.h"
     
    1313namespace nv {
    1414
    15 class NvColorTableShader : public NvShader
     15class ColorTableShader : public Shader
    1616{
    1717public:
    18     NvColorTableShader();
     18    ColorTableShader();
    1919
    20     virtual ~NvColorTableShader();
     20    virtual ~ColorTableShader();
    2121
    2222    virtual void bind(Texture2D *plane, TransferFunction *tf);
  • trunk/packages/vizservers/nanovis/HeightMap.cpp

    r3611 r3612  
    3939    _heights(NULL)
    4040{
    41     _shader = new NvShader();
     41    _shader = new Shader();
    4242    _shader->loadFragmentProgram("heightcolor.cg", "main");
    4343}
  • trunk/packages/vizservers/nanovis/HeightMap.h

    r3611 r3612  
    1212
    1313#include "TransferFunction.h"
    14 #include "NvShader.h"
     14#include "Shader.h"
    1515#include "AxisRange.h"
    1616
     
    132132    TransferFunction *_transferFunc;
    133133    float _opacity;
    134     NvShader *_shader;
     134    Shader *_shader;
    135135    int *_indexBuffer;
    136136    int _indexCount;
  • trunk/packages/vizservers/nanovis/LIC.cpp

    r3611 r3612  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * NvLIC.h: line integral convolution class
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Insoo Woo <iwoo@purdue.edu, Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168#include <stdlib.h>
     
    2214
    2315#include "LIC.h"
    24 #include "NvShader.h"
     16#include "Shader.h"
    2517#include "Trace.h"
    2618
     
    111103    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboOrig);
    112104
    113     _renderVelShader = new NvShader();
     105    _renderVelShader = new Shader();
    114106    _renderVelShader->loadFragmentProgram("render_vel.cg", "main");
    115107
  • trunk/packages/vizservers/nanovis/LIC.h

    r3611 r3612  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * NvLIC.h: line integral convolution class
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168#ifndef NV_LIC_H
     
    2214
    2315#include "Volume.h"
    24 #include "NvShader.h"
     16#include "Shader.h"
    2517
    2618namespace nv {
     
    8476private:
    8577    /**
    86      * @brief the normal vector of the NvLIC plane,
     78     * @brief the normal vector of the LIC plane,
    8779     * the inherited Vector3 location is its center
    8880     */
     
    111103    GLuint _disListID;
    112104
    113     NvShader *_renderVelShader;
     105    Shader *_renderVelShader;
    114106
    115107    GLuint _colorTex, _patternTex, _magTex;
  • trunk/packages/vizservers/nanovis/Makefile.in

    r3611 r3612  
    111111                Chain.o \
    112112                CmdProc.o \
     113                ColorTableShader.o \
    113114                Command.o \
    114115                ContourLineFilter.o \
     
    122123                HeightMap.o \
    123124                LIC.o \
    124                 NvColorTableShader.o \
    125                 NvParticleAdvectionShader.o \
    126                 NvRegularVolumeShader.o \
    127                 NvShader.o \
    128                 NvStdVertexShader.o \
    129                 NvVolumeShader.o \
    130                 NvZincBlendeVolumeShader.o \
    131125                OrientationIndicator.o \
     126                ParticleAdvectionShader.o \
    132127                ParticleRenderer.o \
    133128                PerfQuery.o \
     
    137132                ReadBuffer.o \
    138133                ReaderCommon.o \
     134                RegularVolumeShader.o \
    139135                RenderVertexArray.o \
    140136                ResponseQueue.o \
     137                Shader.o \
     138                StdVertexShader.o \
    141139                Switch.o \
    142140                Texture1D.o \
     
    150148                VolumeInterpolator.o \
    151149                VolumeRenderer.o \
     150                VolumeShader.o \
    152151                VtkReader.o \
    153152                ZincBlendeReconstructor.o \
    154153                ZincBlendeVolume.o \
     154                ZincBlendeVolumeShader.o \
    155155                dxReader.o \
    156156                md5.o \
     
    282282Chain.o: Chain.cpp Chain.h
    283283CmdProc.o: CmdProc.cpp CmdProc.h
     284ColorTableShader.o: ColorTableShader.cpp ColorTableShader.h Shader.h
    284285Command.o: Command.cpp nanovis.h config.h define.h FlowCmd.h CmdProc.h Trace.h PlaneRenderer.h PPMWriter.h BMPWriter.h dxReader.h Grid.h HeightMap.h Camera.h ZincBlendeReconstructor.h OrientationIndicator.h Unirect.h Volume.h VolumeRenderer.h
    285286ContourLineFilter.o: ContourLineFilter.cpp ContourLineFilter.h
     
    293294HeightMap.o: HeightMap.cpp HeightMap.h
    294295LIC.o: LIC.cpp LIC.h
    295 NvColorTableShader.o: NvColorTableShader.cpp NvColorTableShader.h NvShader.h
    296 NvParticleAdvectionShader.o: NvParticleAdvectionShader.cpp NvParticleAdvectionShader.h NvShader.h
    297 NvRegularVolumeShader.o: NvRegularVolumeShader.cpp NvRegularVolumeShader.h NvVolumeShader.h NvShader.h
    298 NvShader.o: NvShader.cpp NvShader.h
    299 NvStdVertexShader.o: NvStdVertexShader.cpp NvStdVertexShader.h NvShader.h
    300 NvVolumeShader.o: NvVolumeShader.cpp NvVolumeShader.h NvShader.h
    301 NvZincBlendeVolumeShader.o: NvZincBlendeVolumeShader.cpp NvZincBlendeVolumeShader.h NvVolumeShader.h NvShader.h
    302296OrientationIndicator.o: OrientationIndicator.cpp OrientationIndicator.h
     297ParticleAdvectionShader.o: ParticleAdvectionShader.cpp ParticleAdvectionShader.h Shader.h
    303298ParticleEmitter.o: ParticleEmitter.cpp ParticleEmitter.h
    304299ParticleRenderer.o: ParticleRenderer.cpp ParticleRenderer.h
     
    314309PPMWriter.o: PPMWriter.cpp PPMWriter.h
    315310ReaderCommon.o: ReaderCommon.cpp ReaderCommon.h GradientFilter.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
     311RegularVolumeShader.o: RegularVolumeShader.cpp RegularVolumeShader.h VolumeShader.h Shader.h
    316312RenderVertexArray.o: RenderVertexArray.cpp RenderVertexArray.h
     313Shader.o: Shader.cpp Shader.h
     314StdVertexShader.o: StdVertexShader.cpp StdVertexShader.h Shader.h
    317315Switch.o: Switch.cpp Switch.h
    318316Texture1D.o: Texture1D.cpp Texture1D.h
     
    325323Volume.o: Volume.cpp Volume.h config.h define.h
    326324VolumeInterpolator.o: VolumeInterpolator.cpp VolumeInterpolator.h Volume.h
    327 VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h ConvexPolygon.h Volume.h nanovis.h Trace.h Plane.h NvStdVertexShader.h NvShader.h
     325VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h ConvexPolygon.h Volume.h nanovis.h Trace.h Plane.h StdVertexShader.h Shader.h
     326VolumeShader.o: VolumeShader.cpp VolumeShader.h Shader.h
    328327VtkReader.o: VtkReader.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h ReaderCommon.h nanovis.h
    329328ZincBlendeReconstructor.o: ZincBlendeReconstructor.cpp ZincBlendeReconstructor.h ZincBlendeVolume.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
    330329ZincBlendeVolume.o: ZincBlendeVolume.cpp ZincBlendeVolume.h config.h define.h
     330ZincBlendeVolumeShader.o: ZincBlendeVolumeShader.cpp ZincBlendeVolumeShader.h VolumeShader.h Shader.h
    331331dxReader.o: dxReader.cpp ReaderCommon.h config.h nanovis.h Unirect.h ZincBlendeVolume.h ZincBlendeReconstructor.h
    332332md5.o: md5.h
    333333nanovis.o: nanovis.cpp nanovis.h config.h define.h Command.h Flow.h Grid.h HeightMap.h Camera.h LIC.h ZincBlendeReconstructor.h OrientationIndicator.h PerfQuery.h PlaneRenderer.h PointSetRenderer.h PointSet.h Switch.h Trace.h Unirect.h VelocityArrowsSlice.h VolumeInterpolator.h VolumeRenderer.h ZincBlendeVolume.h Axis.h Chain.h
    334 nanovisServer.o: nanovisServer.cpp nanovisServer.h config.h nanovis.h define.h Command.h PPMWriter.h ReadBuffer.h NvShader.h ResponseQueue.h Trace.h
     334nanovisServer.o: nanovisServer.cpp nanovisServer.h config.h nanovis.h define.h Command.h PPMWriter.h ReadBuffer.h Shader.h ResponseQueue.h Trace.h
  • trunk/packages/vizservers/nanovis/ParticleAdvectionShader.cpp

    r3611 r3612  
    44 *
    55 */
    6 #include "NvParticleAdvectionShader.h"
     6#include "ParticleAdvectionShader.h"
    77
    88using namespace nv;
    99
    10 NvParticleAdvectionShader::NvParticleAdvectionShader() :
     10ParticleAdvectionShader::ParticleAdvectionShader() :
    1111    _velocityVolumeID(0),
    1212    _scale(1.0f, 1.0f, 1.0f),
     
    1818}
    1919
    20 NvParticleAdvectionShader::~NvParticleAdvectionShader()
     20ParticleAdvectionShader::~ParticleAdvectionShader()
    2121{
    2222}
    2323
    24 void NvParticleAdvectionShader::init()
     24void ParticleAdvectionShader::init()
    2525{
    2626    loadFragmentProgram("update_pos.cg", "main");
     
    2828
    2929void
    30 NvParticleAdvectionShader::bind(unsigned int texID, unsigned int initPosTexID)
     30ParticleAdvectionShader::bind(unsigned int texID, unsigned int initPosTexID)
    3131{
    3232    setFPTextureParameter("pos_tex", texID);
     
    3939    setFPParameter3f("scale", _scale.x, _scale.y, _scale.z);
    4040
    41     NvShader::bind();
     41    Shader::bind();
    4242}
    4343
    4444void
    45 NvParticleAdvectionShader::unbind()
     45ParticleAdvectionShader::unbind()
    4646{
    4747     disableFPTextureParameter("pos_tex");
     
    4949     disableFPTextureParameter("vel_tex");
    5050
    51      NvShader::unbind();
     51     Shader::unbind();
    5252}
  • trunk/packages/vizservers/nanovis/ParticleAdvectionShader.h

    r3611 r3612  
    99#include <vrmath/Vector3f.h>
    1010
    11 #include "NvShader.h"
     11#include "Shader.h"
    1212
    1313namespace nv {
    1414
    15 class NvParticleAdvectionShader : public NvShader
     15class ParticleAdvectionShader : public Shader
    1616{
    1717public:
    18     NvParticleAdvectionShader();
     18    ParticleAdvectionShader();
    1919
    20     virtual ~NvParticleAdvectionShader();
     20    virtual ~ParticleAdvectionShader();
    2121
    2222    virtual void bind(unsigned int texID, unsigned int initPosTexID);
  • trunk/packages/vizservers/nanovis/ParticleRenderer.cpp

    r3611 r3612  
    1919using namespace nv;
    2020
    21 NvParticleAdvectionShader *ParticleRenderer::_advectionShader = NULL;
     21ParticleAdvectionShader *ParticleRenderer::_advectionShader = NULL;
    2222ParticleAdvectionShaderInstance shaderInstance;
    2323
     
    103103
    104104    if (_advectionShader == NULL) {
    105         _advectionShader = new NvParticleAdvectionShader();
     105        _advectionShader = new ParticleAdvectionShader();
    106106    }
    107107}
  • trunk/packages/vizservers/nanovis/ParticleRenderer.h

    r3611 r3612  
    1414#include <vrmath/Vector4f.h>
    1515
    16 #include "NvParticleAdvectionShader.h"
     16#include "ParticleAdvectionShader.h"
    1717#include "RenderVertexArray.h"
    1818
     
    8484    }
    8585
    86    static NvParticleAdvectionShader *_advectionShader;
     86   static ParticleAdvectionShader *_advectionShader;
    8787
    8888private:
  • trunk/packages/vizservers/nanovis/ParticleSystem.cpp

    r3502 r3612  
    3030#include "Texture2D.h"
    3131#include "Texture3D.h"
    32 #include "NvShader.h"
     32#include "Shader.h"
    3333#include "Trace.h"
    3434
     
    423423{
    424424    // TBD...
    425     _context = NvShader::getCgContext();
     425    _context = Shader::getCgContext();
    426426
    427427    std::string path = FilePath::getInstance()->getPath("distance.cg");
  • trunk/packages/vizservers/nanovis/PlaneRenderer.cpp

    r3611 r3612  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * PlaneRenderer.cpp : PlaneRenderer class for volume visualization
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168
     
    2719    _renderWidth(width),
    2820    _renderHeight(height),
    29     _shader(new NvColorTableShader())
     21    _shader(new ColorTableShader())
    3022{
    3123    _plane.clear();
  • trunk/packages/vizservers/nanovis/PlaneRenderer.h

    r3611 r3612  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * PlaneRenderer.h : PlaneRenderer class for 2D visualization
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168#ifndef PLANE_RENDERER_H
     
    1911#include <vector>
    2012
    21 #include "NvColorTableShader.h"
     13#include "ColorTableShader.h"
    2214#include "TransferFunction.h"
    2315#include "Texture2D.h"
     
    5446    int _renderHeight; 
    5547
    56     NvColorTableShader *_shader;
     48    ColorTableShader *_shader;
    5749};
    5850
  • trunk/packages/vizservers/nanovis/PointSet.cpp

    r3502 r3612  
    1212#include "PointSet.h"
    1313#include "PCASplit.h"
     14
     15using namespace nv;
    1416
    1517void
  • trunk/packages/vizservers/nanovis/PointSet.h

    r3502 r3612  
    1111
    1212#include "PCASplit.h"
     13
     14namespace nv {
    1315
    1416class PointSet
     
    8789};
    8890
     91}
     92
    8993#endif
  • trunk/packages/vizservers/nanovis/PointSetRenderer.cpp

    r3502 r3612  
    1414#include "PCASplit.h"
    1515
     16using namespace nv;
    1617using namespace nv::util;
    1718
  • trunk/packages/vizservers/nanovis/PointSetRenderer.h

    r3502 r3612  
    1414#include "PointShader.h"
    1515#include "Texture2D.h"
     16
     17namespace nv {
    1618
    1719class PointSetRenderer
     
    3436};
    3537
     38}
     39
    3640#endif
  • trunk/packages/vizservers/nanovis/PointShader.cpp

    r3502 r3612  
    66#include "PointShader.h"
    77
     8using namespace nv;
     9
    810PointShader::PointShader() :
    9     NvShader(),
     11    Shader(),
    1012    _scale(1.0f),
    1113    _normal(NULL)
     
    2931    //setVPTextureParameter("normal", _normal->getGraphicsObjectID());
    3032
    31     NvShader::bind();
     33    Shader::bind();
    3234}
    3335
     
    3638    //disableVPTextureParameter("normal");
    3739
    38     NvShader::unbind();
     40    Shader::unbind();
    3941}
  • trunk/packages/vizservers/nanovis/PointShader.h

    r3502 r3612  
    77#define POINTSHADER_H
    88
    9 #include "NvShader.h"
     9#include "Shader.h"
    1010#include "Texture3D.h"
    1111
    12 class PointShader : public NvShader
     12namespace nv {
     13
     14class PointShader : public Shader
    1315{
    1416public:
     
    3739};
    3840
     41}
     42
    3943#endif
  • trunk/packages/vizservers/nanovis/RegularVolumeShader.cpp

    r3611 r3612  
    44 *
    55 */
    6 #include "NvRegularVolumeShader.h"
     6#include "RegularVolumeShader.h"
    77
    88using namespace nv;
    99
    10 NvRegularVolumeShader::NvRegularVolumeShader()
     10RegularVolumeShader::RegularVolumeShader()
    1111{
    1212    init();
    1313}
    1414
    15 NvRegularVolumeShader::~NvRegularVolumeShader()
     15RegularVolumeShader::~RegularVolumeShader()
    1616{
    1717}
    1818
    19 void NvRegularVolumeShader::init()
     19void RegularVolumeShader::init()
    2020{
    2121    loadFragmentProgram("one_volume.cg", "main");
    2222}
    2323
    24 void NvRegularVolumeShader::bind(unsigned int tfID, Volume *volume,
     24void RegularVolumeShader::bind(unsigned int tfID, Volume *volume,
    2525                                 int sliceMode, float sampleRatio)
    2626{
     
    4646                     (volume->twoSidedLighting() ? 1.0f : 0.0f));
    4747
    48     NvShader:: bind();
     48    Shader:: bind();
    4949}
    5050
    51 void NvRegularVolumeShader::unbind()
     51void RegularVolumeShader::unbind()
    5252{
    5353    disableFPTextureParameter("volume");
    5454    disableFPTextureParameter("tf");
    5555
    56     NvShader::unbind();
     56    Shader::unbind();
    5757}
  • trunk/packages/vizservers/nanovis/RegularVolumeShader.h

    r3611 r3612  
    88
    99#include "Volume.h"
    10 #include "NvVolumeShader.h"
     10#include "VolumeShader.h"
    1111
    1212namespace nv {
    1313
    1414/// Shader for regular volume (uniform grid)
    15 class NvRegularVolumeShader : public NvVolumeShader
     15class RegularVolumeShader : public VolumeShader
    1616{
    1717public:
    18     NvRegularVolumeShader();
     18    RegularVolumeShader();
    1919
    20     virtual ~NvRegularVolumeShader();
     20    virtual ~RegularVolumeShader();
    2121
    2222    virtual void bind(unsigned int tfID, Volume *volume,
  • trunk/packages/vizservers/nanovis/Shader.cpp

    r3611 r3612  
    1212#include <util/FilePath.h>
    1313
    14 #include "NvShader.h"
     14#include "Shader.h"
    1515#include "Trace.h"
    1616
     
    1818using namespace nv::util;
    1919
    20 CGprofile NvShader::_defaultVertexProfile = CG_PROFILE_VP40;
    21 CGprofile NvShader::_defaultFragmentProfile = CG_PROFILE_FP40;
    22 CGcontext NvShader::_cgContext = NULL;
     20CGprofile Shader::_defaultVertexProfile = CG_PROFILE_VP40;
     21CGprofile Shader::_defaultFragmentProfile = CG_PROFILE_FP40;
     22CGcontext Shader::_cgContext = NULL;
    2323
    24 void NvShader::initCg(CGprofile defaultVertexProfile,
    25                       CGprofile defaultFragmentProfile)
     24void Shader::initCg(CGprofile defaultVertexProfile,
     25                    CGprofile defaultFragmentProfile)
    2626{
    2727    _defaultVertexProfile = defaultVertexProfile;
     
    3030}
    3131
    32 void NvShader::exitCg()
     32void Shader::exitCg()
    3333{
    3434    setErrorCallback(NULL);
     
    4242}
    4343
    44 bool NvShader::printErrorInfo()
     44bool Shader::printErrorInfo()
    4545{
    4646    CGerror lastError = cgGetError();
     
    5656
    5757CGprogram
    58 NvShader::loadCgSourceProgram(CGcontext context, const char *fileName,
    59                               CGprofile profile, const char *entryPoint)
     58Shader::loadCgSourceProgram(CGcontext context, const char *fileName,
     59                            CGprofile profile, const char *entryPoint)
    6060{
    6161    std::string path = FilePath::getInstance()->getPath(fileName);
     
    7676}
    7777
    78 NvShader::NvShader():
     78Shader::Shader():
    7979    _vertexProfile(_defaultVertexProfile),
    8080    _fragmentProfile(_defaultFragmentProfile),
     
    8484}
    8585
    86 NvShader::~NvShader()
     86Shader::~Shader()
    8787{
    88     TRACE("In ~NvShader");
     88    TRACE("Enter");
    8989    if (_cgContext == NULL) {
    9090        TRACE("Lost Cg context: vp: %s, fp: %s", _vpFile.c_str(), _fpFile.c_str());
     
    9494}
    9595
    96 void NvShader::loadVertexProgram(const char *fileName, const char *entryPoint)
     96void Shader::loadVertexProgram(const char *fileName, const char *entryPoint)
    9797{
    9898    if (_cgVP != NULL) {
     
    104104}
    105105
    106 void NvShader::loadFragmentProgram(const char *fileName, const char *entryPoint)
     106void Shader::loadFragmentProgram(const char *fileName, const char *entryPoint)
    107107{
    108108    if (_cgFP != NULL) {
     
    114114}
    115115
    116 void NvShader::resetPrograms()
     116void Shader::resetPrograms()
    117117{
    118118    if (_cgVP != NULL) {
     
    127127}
    128128
    129 void NvShader::setErrorCallback(NvCgCallbackFunction callback)
     129void Shader::setErrorCallback(CgCallbackFunction callback)
    130130{
    131     TRACE("NvShader setting error callback to: %p", callback);
     131    TRACE("Shader setting error callback to: %p", callback);
    132132    cgSetErrorCallback(callback);
    133133}
  • trunk/packages/vizservers/nanovis/Shader.h

    r3611 r3612  
    1818namespace nv {
    1919
    20 class NvShader
     20class Shader
    2121{
    2222public:
    23     enum NvGLMatrix {
     23    enum GLMatrix {
    2424        MODELVIEW_MATRIX = CG_GL_MODELVIEW_MATRIX,
    2525        PROJECTION_MATRIX = CG_GL_PROJECTION_MATRIX,
    2626        MODELVIEW_PROJECTION_MATRIX = CG_GL_MODELVIEW_PROJECTION_MATRIX
    2727    };
    28     enum NvGLMatrixType {
     28    enum GLMatrixType {
    2929        MATRIX_IDENTITY = CG_GL_MATRIX_IDENTITY,
    3030        MATRIX_INVERSE = CG_GL_MATRIX_INVERSE
    3131    };
    3232
    33     typedef void NvCgCallbackFunction(void);
    34 
    35     NvShader();
    36 
    37     virtual ~NvShader();
     33    typedef void CgCallbackFunction(void);
     34
     35    Shader();
     36
     37    virtual ~Shader();
    3838
    3939    /**
     
    201201    }
    202202
    203     void setGLStateMatrixVPParameter(const char *name, NvGLMatrix matrix,
    204                                      NvGLMatrixType type = MATRIX_IDENTITY)
     203    void setGLStateMatrixVPParameter(const char *name, GLMatrix matrix,
     204                                     GLMatrixType type = MATRIX_IDENTITY)
    205205    {
    206206        CGparameter param = getVPParam(name);
     
    210210    }
    211211
    212     void setGLStateMatrixFPParameter(const char *name, NvGLMatrix matrix,
    213                                      NvGLMatrixType type = MATRIX_IDENTITY)
     212    void setGLStateMatrixFPParameter(const char *name, GLMatrix matrix,
     213                                     GLMatrixType type = MATRIX_IDENTITY)
    214214    {
    215215        CGparameter param = getFPParam(name);
     
    266266    static bool printErrorInfo();
    267267
    268     static void setErrorCallback(NvCgCallbackFunction callback);
     268    static void setErrorCallback(CgCallbackFunction callback);
    269269
    270270    static CGcontext getCgContext()
  • trunk/packages/vizservers/nanovis/StdVertexShader.cpp

    r3611 r3612  
    44 *
    55 */
    6 #include "NvStdVertexShader.h"
     6#include "StdVertexShader.h"
    77
    88using namespace nv;
    99
    10 NvStdVertexShader::NvStdVertexShader()
     10StdVertexShader::StdVertexShader()
    1111{
    1212    init();
    1313}
    1414
    15 NvStdVertexShader::~NvStdVertexShader()
     15StdVertexShader::~StdVertexShader()
    1616{
    1717}
    1818
    19 void NvStdVertexShader::init()
     19void StdVertexShader::init()
    2020{
    2121    loadVertexProgram("vertex_std.cg", "main");
    2222}
    2323
    24 void NvStdVertexShader::bind(float *mvp, float *mvInv)
     24void StdVertexShader::bind(float *mvp, float *mvInv)
    2525{
    2626    if (mvp != NULL) {
     
    3535    }
    3636
    37     NvShader::bind();
     37    Shader::bind();
    3838}
  • trunk/packages/vizservers/nanovis/StdVertexShader.h

    r3611 r3612  
    77#define NV_STD_VERTEX_SHADER_H
    88
    9 #include "NvShader.h"
     9#include "Shader.h"
    1010
    1111namespace nv {
    1212
    13 class NvStdVertexShader : public NvShader
     13class StdVertexShader : public Shader
    1414{
    1515public:
    16     NvStdVertexShader();
     16    StdVertexShader();
    1717
    18     virtual ~NvStdVertexShader();
     18    virtual ~StdVertexShader();
    1919
    2020    virtual void bind(float *mvp = NULL, float *mvInv = NULL);
     
    2222    virtual void unbind()
    2323    {
    24         NvShader::unbind();
     24        Shader::unbind();
    2525    }
    2626
  • trunk/packages/vizservers/nanovis/VelocityArrowsSlice.cpp

    r3611 r3612  
    1919#include "nanovis.h"
    2020#include "VelocityArrowsSlice.h"
    21 #include "NvShader.h"
     21#include "Shader.h"
    2222#include "Camera.h"
    2323
     
    424424                                         tan(NanoVis::getCamera()->fov() * 0.5) * NanoVis::winHeight * 0.5);
    425425        _particleShader.setGLStateMatrixVPParameter("modelview",
    426                                                     NvShader::MODELVIEW_MATRIX,
    427                                                     NvShader::MATRIX_IDENTITY);
     426                                                    Shader::MODELVIEW_MATRIX,
     427                                                    Shader::MATRIX_IDENTITY);
    428428        _particleShader.setGLStateMatrixVPParameter("mvp",
    429                                                     NvShader::MODELVIEW_PROJECTION_MATRIX,
    430                                                     NvShader::MATRIX_IDENTITY);
     429                                                    Shader::MODELVIEW_PROJECTION_MATRIX,
     430                                                    Shader::MATRIX_IDENTITY);
    431431
    432432        glEnableClientState(GL_VERTEX_ARRAY);
  • trunk/packages/vizservers/nanovis/VelocityArrowsSlice.h

    r3611 r3612  
    1212
    1313#include "Texture2D.h"
    14 #include "NvShader.h"
     14#include "Shader.h"
    1515
    1616namespace nv {
     
    105105    float _maxPointSize;
    106106
    107     NvShader _queryVelocityFP;
    108 
    109     NvShader _particleShader;
     107    Shader _queryVelocityFP;
     108    Shader _particleShader;
    110109
    111110    int _renderTargetWidth;
  • trunk/packages/vizservers/nanovis/VolumeRenderer.cpp

    r3611 r3612  
    2828#include "Plane.h"
    2929#include "ConvexPolygon.h"
    30 #include "NvStdVertexShader.h"
     30#include "StdVertexShader.h"
    3131#include "Trace.h"
    3232
     
    5353void VolumeRenderer::initShaders()
    5454{
    55     _cutplaneShader = new NvShader();
     55    _cutplaneShader = new Shader();
    5656    _cutplaneShader->loadVertexProgram("cutplane_vp.cg", "main");
    5757    _cutplaneShader->loadFragmentProgram("cutplane_fp.cg", "main");
    5858
    5959    //standard vertex program
    60     _stdVertexShader = new NvStdVertexShader();
     60    _stdVertexShader = new StdVertexShader();
    6161
    6262    //volume rendering shader: one cubic volume
    63     _regularVolumeShader = new NvRegularVolumeShader();
     63    _regularVolumeShader = new RegularVolumeShader();
    6464
    6565    //volume rendering shader: one zincblende orbital volume.
     
    7171    //The engine is already capable of rendering multiple volumes and combine them. Thus, we just invoke this shader on
    7272    //S, P, D and SS orbitals with different transfor functions. The result is a multi-orbital rendering.
    73     _zincBlendeShader = new NvZincBlendeVolumeShader();
     73    _zincBlendeShader = new ZincBlendeVolumeShader();
    7474}
    7575
     
    287287            glScalef(volScaling.x, volScaling.y, volScaling.z);
    288288            _cutplaneShader->setGLStateMatrixVPParameter("modelViewProjMatrix",
    289                                                          NvShader::MODELVIEW_PROJECTION_MATRIX);
     289                                                         Shader::MODELVIEW_PROJECTION_MATRIX);
    290290            glPopMatrix();
    291291
  • trunk/packages/vizservers/nanovis/VolumeRenderer.h

    r3611 r3612  
    2121#include "Volume.h"
    2222#include "VolumeInterpolator.h"
    23 #include "NvRegularVolumeShader.h"
    24 #include "NvZincBlendeVolumeShader.h"
    25 #include "NvStdVertexShader.h"
     23#include "RegularVolumeShader.h"
     24#include "ZincBlendeVolumeShader.h"
     25#include "StdVertexShader.h"
    2626
    2727namespace nv {
     
    8787     * Shader for single slice cutplane render
    8888     */
    89     NvShader *_cutplaneShader;
     89    Shader *_cutplaneShader;
    9090
    9191    /**
    9292     * Shader for rendering a single cubic volume
    9393     */
    94     NvRegularVolumeShader *_regularVolumeShader;
     94    RegularVolumeShader *_regularVolumeShader;
    9595
    9696    /**
     
    108108     * same space.
    109109     */
    110     NvZincBlendeVolumeShader *_zincBlendeShader;
     110    ZincBlendeVolumeShader *_zincBlendeShader;
    111111
    112112    /**
    113113     * standard vertex shader
    114114     */
    115     NvStdVertexShader *_stdVertexShader;
     115    StdVertexShader *_stdVertexShader;
    116116};
    117117
  • trunk/packages/vizservers/nanovis/VolumeShader.cpp

    r3611 r3612  
    44 *
    55 */
    6 #include "NvVolumeShader.h"
     6#include "VolumeShader.h"
    77
    88using namespace nv;
    99
    10 NvVolumeShader::NvVolumeShader()
     10VolumeShader::VolumeShader()
    1111{
    1212}
    1313
    14 NvVolumeShader::~NvVolumeShader()
     14VolumeShader::~VolumeShader()
    1515{
    1616}
  • trunk/packages/vizservers/nanovis/VolumeShader.h

    r3611 r3612  
    77#define NV_VOLUME_SHADER_H
    88
    9 #include "NvShader.h"
     9#include "Shader.h"
    1010
    1111namespace nv {
     
    1313class Volume;
    1414
    15 class NvVolumeShader : public NvShader
     15class VolumeShader : public Shader
    1616{
    1717public :
    18     virtual ~NvVolumeShader();
     18    virtual ~VolumeShader();
    1919
    2020    virtual void bind(unsigned int tfID, Volume *volume,
     
    2323    virtual void unbind()
    2424    {
    25         NvShader::unbind();
     25        Shader::unbind();
    2626    }
    2727
    2828protected :
    29     NvVolumeShader();
     29    VolumeShader();
    3030};
    3131
  • trunk/packages/vizservers/nanovis/ZincBlendeVolumeShader.cpp

    r3611 r3612  
    55 */
    66
    7 #include "NvZincBlendeVolumeShader.h"
     7#include "ZincBlendeVolumeShader.h"
    88#include "ZincBlendeVolume.h"
    99
    1010using namespace nv;
    1111
    12 NvZincBlendeVolumeShader::NvZincBlendeVolumeShader()
     12ZincBlendeVolumeShader::ZincBlendeVolumeShader()
    1313{
    1414    init();
    1515}
    1616
    17 NvZincBlendeVolumeShader::~NvZincBlendeVolumeShader()
     17ZincBlendeVolumeShader::~ZincBlendeVolumeShader()
    1818{
    1919}
    2020
    21 void NvZincBlendeVolumeShader::init()
     21void ZincBlendeVolumeShader::init()
    2222{
    2323    loadFragmentProgram("zincblende_volume.cg", "main");
    2424}
    2525
    26 void NvZincBlendeVolumeShader::bind(unsigned int tfID, Volume *volume,
     26void ZincBlendeVolumeShader::bind(unsigned int tfID, Volume *volume,
    2727                                    int sliceMode, float sampleRatio)
    2828{
     
    4646                     0.0f);
    4747
    48     NvShader::bind();
     48    Shader::bind();
    4949}
    5050
    51 void NvZincBlendeVolumeShader::unbind()
     51void ZincBlendeVolumeShader::unbind()
    5252{
    5353    disableFPTextureParameter("tf");
     
    5555    disableFPTextureParameter("volumeB");
    5656
    57     NvShader::unbind();
     57    Shader::unbind();
    5858}
  • trunk/packages/vizservers/nanovis/ZincBlendeVolumeShader.h

    r3611 r3612  
    77#define NV_ZINCBLENDE_SHADER_H
    88
    9 #include "NvVolumeShader.h"
     9#include "VolumeShader.h"
    1010
    1111namespace nv {
    1212
    13 class NvZincBlendeVolumeShader : public NvVolumeShader
     13class ZincBlendeVolumeShader : public VolumeShader
    1414{
    1515public:
    16     NvZincBlendeVolumeShader();
     16    ZincBlendeVolumeShader();
    1717
    18     virtual ~NvZincBlendeVolumeShader();
     18    virtual ~ZincBlendeVolumeShader();
    1919
    2020    virtual void bind(unsigned int tfID, Volume *volume,
  • trunk/packages/vizservers/nanovis/nanovis.cpp

    r3611 r3612  
    4242#include "Camera.h"
    4343#include "LIC.h"
    44 #include "NvShader.h"
     44#include "Shader.h"
    4545#include "OrientationIndicator.h"
    4646#include "PlaneRenderer.h"
     
    461461void cgErrorCallback(void)
    462462{
    463     if (!NvShader::printErrorInfo()) {
     463    if (!Shader::printErrorInfo()) {
    464464        TRACE("Cg error, exiting...");
    465465        exit(1);
     
    536536    ImageLoaderFactory::getInstance()->addLoaderImpl("bmp", new BMPImageLoaderImpl());
    537537
    538     NvShader::initCg();
    539     NvShader::setErrorCallback(cgErrorCallback);
     538    Shader::initCg();
     539    Shader::setErrorCallback(cgErrorCallback);
    540540
    541541    fonts = new Fonts();
  • trunk/packages/vizservers/nanovis/nanovisServer.cpp

    r3606 r3612  
    3333#include "PPMWriter.h"
    3434#include "ReadBuffer.h"
    35 #include "NvShader.h"
     35#include "Shader.h"
    3636#ifdef USE_THREADS
    3737#include <pthread.h>
     
    352352    NanoVis::removeAllData();
    353353
    354     NvShader::exitCg();
     354    Shader::exitCg();
    355355
    356356    //close log file
     
    436436void cgErrorCallback(void)
    437437{
    438     if (!NvShader::printErrorInfo()) {
     438    if (!Shader::printErrorInfo()) {
    439439        TRACE("Cg error, exiting...");
    440440        exitService(1);
     
    580580
    581581    // Override callback with one that cleans up server on exit
    582     NvShader::setErrorCallback(cgErrorCallback);
     582    Shader::setErrorCallback(cgErrorCallback);
    583583
    584584    if (!NanoVis::initGL()) {
Note: See TracChangeset for help on using the changeset viewer.