当前位置: 首页>>代码示例>>C++>>正文


C++ FunctionParser::GetFunctionData方法代码示例

本文整理汇总了C++中FunctionParser::GetFunctionData方法的典型用法代码示例。如果您正苦于以下问题:C++ FunctionParser::GetFunctionData方法的具体用法?C++ FunctionParser::GetFunctionData怎么用?C++ FunctionParser::GetFunctionData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FunctionParser的用法示例。


在下文中一共展示了FunctionParser::GetFunctionData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Init

bool GLDriver::Init()
{

  //Read in the configuration data
  defaultConfigData.ReadConfigData(); //Read basic config
  configData = defaultConfigData;
  setConfigDataExport(&configData, this);

  //Set if the logger mirrors to the debugger
  //if(gliLog)
  //{
  //  gliLog->SetDebuggerLogEnabled(configData.errorDebuggerErrorLog);
  //}

  //Attempt to open the driver
  if(!openGLLib.Init(configData.openGLFileName.c_str()))
  {
    LOGERR(("GLDriver::Init - Unable to open OpenGL lib file %s",configData.openGLFileName.c_str())); 
    return false;
  }

#ifdef GLI_BUILD_WINDOWS

  //Check that we have not loaded our own DLL (Windows can sometimes force this)
  if(openGLLib.IsDLLHandleMatch(dllHandle))
  {
    LOGERR(("GLDriver::Init - OpenGL lib file points to GLIntercept lib - using <appname>.exe.local file?")); 
    return false;
  }

#endif //GLI_BUILD_WINDOWS

  //Do the core OpenGL function mapping
  if(!MapCoreOpenGLFunctions(openGLLib) || !MapWGLFunctions(openGLLib))
  {
    LOGERR(("GLDriver::Init - Unable to map core/windows OpenGL functions")); 
    return false;
  }

  //Create the function table if necessary
  if(!functionTable)
  { 
    InitFunctionTable();
  }


  //Create the extension function handler
  extensionFunction = new ExtensionFunction(functionTable);

  //Parse the include files
  FunctionParser    parser;
  FunctionDataArray tmpFuncArray;
  EnumDataArray     tmpEnumArray;

  //If parsing was successful, get the known function table data
  if(parser.Parse(configData.functionDataFileName.c_str()))
  {
    //Get the data from the parser (A double copy, slow -may need to speed up)
    parser.GetFunctionData(tmpFuncArray,tmpEnumArray);
  }

  //Init the function table with known data (even if there is no known data or parsing faild)
  functionTable->InitKnownFunctionTable(tmpFuncArray,tmpEnumArray);
  
  //Assign thread checking flag
  threadCheckingEnabled = configData.errorThreadChecking;

  //Assign the current logging directory
  //currLogDir = configData.logPath;

  //Set if the any logging is enabled
  loggingEnabled = !configData.logPerFrame;

  //If we are not-perframe logging, create the initial logger here
  if(loggingEnabled && configData.logEnabled)
  {
    //Init the initial function log
    if(!InitFunctionLog())
    {
      return false;
    }
  }

  //Create the error data log
  errorDataLog =  new InterceptLog(functionTable);

  //Register the rendering functions.
  functionTable->SetFunctionFlag("glEvalMesh1",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glEvalMesh2",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRectd",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRectf",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRecti",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRects",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRectdv",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRectfv",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRectiv",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glRectsv",FDF_RENDER_FUNC);

  functionTable->SetFunctionFlag("glBegin",FDF_RENDER_FUNC);
  functionTable->SetFunctionFlag("glDrawPixels",FDF_RENDER_FUNC);
//.........这里部分代码省略.........
开发者ID:jrco,项目名称:nau,代码行数:101,代码来源:GLDriver.cpp


注:本文中的FunctionParser::GetFunctionData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。