일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- C++
- List
- 쉘
- python
- sqlite
- SSH
- dataframe
- if
- 배열
- Unity
- Shader
- c++11
- boost
- expect
- sql
- pandas
- postgresql
- with
- SVN
- conda
- awk
- null
- autovacuum
- DROP
- ubuntu
- mysql
- FIND
- Eclipse
- pi
- ngui
- Today
- Total
목록프로그래밍/cocos2d (4)
その先にあるもの…
cocos에서 문자 출력하는 방법으로 bmpFont가 있다. fnt파일을 읽어 이름이 매칭된 그림 파일을 읽어 글자리를 렌더링 해주는데. 글자 사이의 길이 조절을 해주는 것이 kerning이라는 것이다. angelcode의 폰트 도움말을 보면 kerning The kerning information is used to adjust the distance between certain characters, e.g. some characters should be placed closer to each other than others. first The first character id. second The second character id. amount How much the x position should..
purgeXXX() 함수들 CCSpriteFrameCache.purgeSharedSpriteFrameCache();CCTextureCache.purgeSharedTextureCache();CCDirector.sharedDirector().purgeCachedData();
cocos2d-x는 레퍼런스 카운트(Reference count)로 메모리를 관리한다. 레퍼런스 카운트 과정은 기본적으로 객체가 생성될 때 카운트 1로 초기화 되고 카운트가 0일때 소멸시킨다. Reference count와 관계된 함수retain() //Reference Count를 1씩 증가 시킨다.release() //Reference Count를 1씩 감소 시킨다. 0일때 delete this로 소멸 autorelease() //cocos에서 다음 루프 때 release() 호출한다. //new로 생성할때//생성자에서 m_uReference가 1로 초기화 된다. CCSprite* pSprite = new CCSprite; //m_uReference가 1씩 감소하며 0일때 delete this;로 소..