|
|
|
@ -54,42 +54,82 @@ PhongGLTest::PhongGLTest() { |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compile() { |
|
|
|
void PhongGLTest::compile() { |
|
|
|
Shaders::Phong shader; |
|
|
|
Shaders::Phong shader; |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileAmbientTexture() { |
|
|
|
void PhongGLTest::compileAmbientTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileDiffuseTexture() { |
|
|
|
void PhongGLTest::compileDiffuseTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::DiffuseTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::DiffuseTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileSpecularTexture() { |
|
|
|
void PhongGLTest::compileSpecularTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::SpecularTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::SpecularTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileAmbientDiffuseTexture() { |
|
|
|
void PhongGLTest::compileAmbientDiffuseTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture|Shaders::Phong::Flag::DiffuseTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture|Shaders::Phong::Flag::DiffuseTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileAmbientSpecularTexture() { |
|
|
|
void PhongGLTest::compileAmbientSpecularTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture|Shaders::Phong::Flag::SpecularTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture|Shaders::Phong::Flag::SpecularTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileDiffuseSpecularTexture() { |
|
|
|
void PhongGLTest::compileDiffuseSpecularTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::DiffuseTexture|Shaders::Phong::Flag::SpecularTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::DiffuseTexture|Shaders::Phong::Flag::SpecularTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void PhongGLTest::compileAmbientDiffuseSpecularTexture() { |
|
|
|
void PhongGLTest::compileAmbientDiffuseSpecularTexture() { |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture|Shaders::Phong::Flag::DiffuseTexture|Shaders::Phong::Flag::SpecularTexture); |
|
|
|
Shaders::Phong shader(Shaders::Phong::Flag::AmbientTexture|Shaders::Phong::Flag::DiffuseTexture|Shaders::Phong::Flag::SpecularTexture); |
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef CORRADE_TARGET_APPLE |
|
|
|
|
|
|
|
CORRADE_EXPECT_FAIL("OSX drivers need insane amount of state to validate properly."); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
CORRADE_VERIFY(shader.validate().first); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}}} |
|
|
|
}}} |
|
|
|
|