Click here to Skip to main content
15,885,985 members
Articles / Mobile Apps / iPhone

FreeType on OpenGL ES (iPhone)

Rate me:
Please Sign up or sign in to vote.
4.75/5 (10 votes)
24 Nov 2010CPOL4 min read 86.5K   3K   27  
Faster, smarter and better looking fonts rendered with OpenGL ES
#ifndef _TREENODE_H_INCLUDED_
#define _TREENODE_H_INCLUDED_

class FTBitmapChar;

class TreeNode
{
public:
	TreeNode(int x, int y, int width, int height);
	~TreeNode();
	bool Add(FTBitmapChar* pFTBitmapChar);
	bool IsEmpty() const
	{
		return m_pLeaf1 == NULL && m_pLeaf2 == NULL;
	}
private:
	void CreateBranches(FTBitmapChar* pFTBitmapChar);
	bool Fits(FTBitmapChar* pFTBitmapChar);
	int m_x;
	int m_y;
	int m_width;
	int m_height;
	TreeNode* m_pLeaf1;
	TreeNode* m_pLeaf2;
};





#endif // _TREENODE_H_INCLUDED_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Astronautz
Spain Spain
After working in the software industry for many years, I've started my own games company that specialises in strategy games for mobile platforms.

Comments and Discussions