Skip to content

Global ofGetMaxTextureSize() and UseTexture Option in ofTrueTypeFont. - #8670

Open
NickHardeman wants to merge 1 commit into
openframeworks:masterfrom
NickHardeman:of-get-max-texture-size
Open

NickHardeman wants to merge 1 commit into
openframeworks:masterfrom
NickHardeman:of-get-max-texture-size

Conversation

@NickHardeman

Copy link
Copy Markdown
Contributor

Should close #8668

This is another step towards decoupling GL code from the core.
Introduced a new global function in ofTexture: int ofGetMaxTextureSize();
The function queries the current renderer using a new base renderer function int getMaxTextureSize();

Added two functions to ofTrueTypeFont, similar to other classes like ofImage, ofVideoGrabber, etc..

void setUseTexture(bool bUse);
bool isUsingTexture() const;

If a font is already loaded and setUseTexture(false) is called, it will clear the texture.
And if setUseTexture(true) is called, it will create the texture if the atlas pixels are allocated.
This functionality has been tested against the examples / graphics / fontsExample and fontShapesExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ofTrueTypeFont GL Specific Function for Texture Size

1 participant