~unity-team/nux/nux.armel-fixes

« back to all changes in this revision

Viewing changes to NuxGraphics/IOpenGLGLSLShader.cpp

  • Committer: Tarmac
  • Author(s): Eleni Maria Stea
  • Date: 2012-10-10 15:24:08 UTC
  • mfrom: (684.1.2 trunk)
  • Revision ID: tarmac-20121010152408-vtqrdacy1pd4om10
It fixes two null pointer exceptions found when running nux playground examples. There might be similar problems elsewhere!. Fixes: https://bugs.launchpad.net/bugs/1064918. Approved by Jay Taoko.

Show diffs side-by-side

added added

removed removed

Lines of Context:
515
515
    ObjectPtr<IOpenGLVertexShader> vs = GetGraphicsDisplay()->GetGpuDevice()->CreateVertexShader(); //new IOpenGLVertexShader;
516
516
 
517
517
    std::string ProcessedShaderSource;
 
518
    if(!VtxShaderPreprocessorDefines)
 
519
    {
 
520
      VtxShaderPreprocessorDefines = "";
 
521
    }
518
522
    std::string Defines(VtxShaderPreprocessorDefines);
519
523
    InsertPreProcessorDefinitions(glslshader, ProcessedShaderSource, Defines);
520
524
 
530
534
    ObjectPtr<IOpenGLPixelShader> ps = GetGraphicsDisplay()->GetGpuDevice()->CreatePixelShader(); //new IOpenGLPixelShader;
531
535
 
532
536
    std::string ProcessedShaderSource;
 
537
    if (!FrgShaderPreprocessorDefines)
 
538
    {
 
539
      FrgShaderPreprocessorDefines = "";
 
540
    }
533
541
    std::string Defines(FrgShaderPreprocessorDefines);
534
542
    InsertPreProcessorDefinitions(glslshader, ProcessedShaderSource, Defines);
535
543