Ignore:
Timestamp:
Apr 16, 2013 12:52:20 AM (9 years ago)
Author:
ldelgass
Message:

Nanovis refactoring to fix problems with scaling and multiple results.
Do rendering in world space to properly place and scale multiple data sets.
Also fix flows to reduce resets of animations. More work toward removing
Cg dependency. Fix panning to convert viewport coords to world coords.

File:
1 edited

Legend:

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

    r3612 r3630  
    2222CGcontext Shader::_cgContext = NULL;
    2323
    24 void Shader::initCg(CGprofile defaultVertexProfile,
    25                     CGprofile defaultFragmentProfile)
     24void Shader::init()
    2625{
    27     _defaultVertexProfile = defaultVertexProfile;
    28     _defaultFragmentProfile = defaultFragmentProfile;
    2926    _cgContext = cgCreateContext();
    3027}
    3128
    32 void Shader::exitCg()
     29void Shader::exit()
    3330{
    3431    setErrorCallback(NULL);
     
    9491}
    9592
    96 void Shader::loadVertexProgram(const char *fileName, const char *entryPoint)
     93void Shader::loadVertexProgram(const char *fileName)
    9794{
    9895    if (_cgVP != NULL) {
     
    10097    }
    10198    _cgVP = loadCgSourceProgram(_cgContext, fileName,
    102                                 _vertexProfile, entryPoint);
     99                                _vertexProfile, "main");
    103100    _vpFile = fileName;
    104101}
    105102
    106 void Shader::loadFragmentProgram(const char *fileName, const char *entryPoint)
     103void Shader::loadFragmentProgram(const char *fileName)
    107104{
    108105    if (_cgFP != NULL) {
     
    110107    }
    111108    _cgFP = loadCgSourceProgram(_cgContext, fileName,
    112                                 _fragmentProfile, entryPoint);
     109                                _fragmentProfile, "main");
    113110    _fpFile = fileName;
    114111}
     
    127124}
    128125
    129 void Shader::setErrorCallback(CgCallbackFunction callback)
     126void Shader::setErrorCallback(ShaderCallbackFunction callback)
    130127{
    131128    TRACE("Shader setting error callback to: %p", callback);
Note: See TracChangeset for help on using the changeset viewer.