shader-pipeline: Error compiling on OS X

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
afuzzyllama
Posts: 13
Joined: Thu Oct 10, 2013 2:20 am
Location: Tampa, FL

shader-pipeline: Error compiling on OS X

Post by afuzzyllama »

Operating System: OS X 10.9
IDE: Xcode 5.0.1

When compiling the static library, in COpenGLSLMaterialRenderer.cpp @ line 107:

Code: Select all

 
    if (Driver->getActiveGLSLProgram() == Program)
 
On OS X GLhandleARB is defined as a void* and cannot be cast correctly for this comparison. After looking at the code, is the following code necessary in the destructor?

Code: Select all

 
if (Program2)
{
    if (Driver->getActiveGLSLProgram() == Program2)
        Driver->setActiveGLSLProgram(0);
}
else if (Program)
{
    if (Driver->getActiveGLSLProgram() == Program)
        Driver->setActiveGLSLProgram(0);
}   
 
setActiveGLSLProgram(0) just "nulls" out ActiveGLSLProgram. Looking over the code briefly, it does not seem like this is something you need to do when the object is being destroyed anyway?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: shader-pipeline: Error compiling on OS X

Post by Nadro »

Thanks for a report. I'll check it.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply