Ignore:
Timestamp:
Dec 22, 2014, 7:18:59 AM (5 years ago)
Author:
ldelgass
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.1/Shader.cpp

    r4889 r4904  
    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.