зеркало из https://github.com/microsoft/cocos2d-x.git
Merge pull request #6667 from super626/improved_glprogram
remove unused shadertest
This commit is contained in:
Коммит
006fe7eb94
|
@ -32,7 +32,6 @@ namespace ShaderTest2
|
||||||
{
|
{
|
||||||
static std::function<Layer*()> createFunctions[] =
|
static std::function<Layer*()> createFunctions[] =
|
||||||
{
|
{
|
||||||
CL(AttribShaderTest),
|
|
||||||
CL(NormalSpriteTest),
|
CL(NormalSpriteTest),
|
||||||
CL(GreyScaleSpriteTest),
|
CL(GreyScaleSpriteTest),
|
||||||
CL(BlurSpriteTest),
|
CL(BlurSpriteTest),
|
||||||
|
@ -42,10 +41,6 @@ namespace ShaderTest2
|
||||||
CL(CelShadingSpriteTest),
|
CL(CelShadingSpriteTest),
|
||||||
CL(LensFlareSpriteTest),
|
CL(LensFlareSpriteTest),
|
||||||
CL(OutlineShadingSpriteTest),
|
CL(OutlineShadingSpriteTest),
|
||||||
CL(UniformShaderTest),
|
|
||||||
|
|
||||||
CL(UniformAttribShaderTest)
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned int TEST_CASE_COUNT = sizeof(ShaderTest2::createFunctions) / sizeof(ShaderTest2::createFunctions[0]);
|
static unsigned int TEST_CASE_COUNT = sizeof(ShaderTest2::createFunctions) / sizeof(ShaderTest2::createFunctions[0]);
|
||||||
|
@ -698,21 +693,6 @@ void UniformSprite::onDraw(const Matrix &transform, bool transformUpdated)
|
||||||
CHECK_GL_ERROR_DEBUG();
|
CHECK_GL_ERROR_DEBUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UniformShaderTest::UniformShaderTest()
|
|
||||||
{
|
|
||||||
if (ShaderTestDemo2::init()) {
|
|
||||||
auto s = Director::getInstance()->getWinSize();
|
|
||||||
UniformSprite* sprite = UniformSprite::create();
|
|
||||||
setContentSize(Size(256, 256));
|
|
||||||
setAnchorPoint(Vector2(0.5f, 0.5f));
|
|
||||||
sprite->initShader();
|
|
||||||
sprite->setPosition(64,64);
|
|
||||||
addChild(sprite);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class AttribSprite : public Sprite
|
class AttribSprite : public Sprite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -793,22 +773,3 @@ void AttribSprite::onDraw(const Matrix &transform, bool transformUpdated)
|
||||||
|
|
||||||
CHECK_GL_ERROR_DEBUG();
|
CHECK_GL_ERROR_DEBUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
AttribShaderTest::AttribShaderTest()
|
|
||||||
{
|
|
||||||
if (ShaderTestDemo2::init())
|
|
||||||
{
|
|
||||||
auto s = Director::getInstance()->getWinSize();
|
|
||||||
AttribSprite* sprite = AttribSprite::create();
|
|
||||||
sprite->setTexture("Images/powered.png");
|
|
||||||
sprite->initShader();
|
|
||||||
sprite->setPosition(Vector2(s.width/2, s.height/2));
|
|
||||||
addChild(sprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
UniformAttribShaderTest::UniformAttribShaderTest()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -102,28 +102,5 @@ public:
|
||||||
virtual std::string subtitle() const {return "OutlineShadingSpriteTest";}
|
virtual std::string subtitle() const {return "OutlineShadingSpriteTest";}
|
||||||
};
|
};
|
||||||
|
|
||||||
class UniformShaderTest : public ShaderTestDemo2
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CREATE_FUNC(UniformShaderTest);
|
|
||||||
UniformShaderTest();
|
|
||||||
virtual std::string subtitle() const {return "UniformShaderTest";}
|
|
||||||
};
|
|
||||||
|
|
||||||
class AttribShaderTest : public ShaderTestDemo2
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CREATE_FUNC(AttribShaderTest);
|
|
||||||
AttribShaderTest();
|
|
||||||
virtual std::string subtitle() const {return "AttribShaderTest";}
|
|
||||||
};
|
|
||||||
|
|
||||||
class UniformAttribShaderTest : public ShaderTestDemo2
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
CREATE_FUNC(UniformAttribShaderTest);
|
|
||||||
UniformAttribShaderTest();
|
|
||||||
virtual std::string subtitle() const {return "UniformAndShaderTest";}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
Загрузка…
Ссылка в новой задаче