PuzzleSDK
TextureGlRepeat类 参考

#include <Texture2dTest.h>

+ 类 TextureGlRepeat 继承关系图:
+ TextureGlRepeat 的协作图:

Public 成员函数

 CREATE_FUNC (TextureGlRepeat)
 
virtual ~TextureGlRepeat ()
 
virtual std::string title () const override
 
virtual void onEnter () override
 
- Public 成员函数 继承自 TextureDemo
virtual ~TextureDemo ()
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual std::string subtitle () const
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 Texture2dTest.h420 行定义.

构造及析构函数说明

◆ ~TextureGlRepeat()

TextureGlRepeat::~TextureGlRepeat ( )
virtual

在文件 Texture2dTest.cpp1642 行定义.

1643{
1644 Director::getInstance()->getTextureCache()->removeUnusedTextures();
1645}

成员函数说明

◆ CREATE_FUNC()

TextureGlRepeat::CREATE_FUNC ( TextureGlRepeat  )

◆ onEnter()

void TextureGlRepeat::onEnter ( )
overridevirtual

重载 TextureDemo .

在文件 Texture2dTest.cpp1610 行定义.

1611{
1613
1614 auto size = Director::getInstance()->getWinSize();
1615
1616 // The .png image MUST be power of 2 in order to create a continue effect.
1617 // eg: 32x64, 512x128, 256x1024, 64x64, etc..
1618 auto sprite = Sprite::create("Images/pattern1.png", Rect(0, 0, 4096, 4096));
1619 addChild(sprite, -1, kTagSprite1);
1620 sprite->setPosition(Vec2(size.width/2,size.height/2));
1621 Texture2D::TexParams descriptor = {
1622 backend::SamplerFilter::LINEAR,
1623 backend::SamplerFilter::LINEAR,
1624 backend::SamplerAddressMode::REPEAT,
1625 backend::SamplerAddressMode::REPEAT
1626 };
1627 sprite->getTexture()->setTexParameters(descriptor);
1628
1629 auto rotate = RotateBy::create(4, 360);
1630 sprite->runAction(rotate);
1631 auto scale = ScaleBy::create(2, 0.04f);
1632 auto scaleBack = scale->reverse();
1633 auto seq = Sequence::create(scale, scaleBack, nullptr);
1634 sprite->runAction(seq);
1635}
@ kTagSprite1
virtual void onEnter() override

引用了 kTagSprite1 , 以及 TextureDemo::onEnter().

+ 函数调用图:

◆ title()

std::string TextureGlRepeat::title ( ) const
overridevirtual

重载 TestCase .

在文件 Texture2dTest.cpp1637 行定义.

1638{
1639 return "Texture GL_REPEAT";
1640}

该类的文档由以下文件生成: