openGL optimization text2d
Sep 11, 2008 at 12:15am
openGL optimization text2d
If there is a related thread, please just point me there…
Before I go and build this, can someone confirm that if nothing is changing in my gl world, I should have a performance gain by initially rendering each object to a matrix(picture), then for each output frame, adding/mixing each matrix together rather than re-rendering the entire openGL all over again. Currently, rendering swamps my machine.
This is the short version, some details are:
Sep 11, 2008 at 9:06am
On Sep 11, 2008, at 2:15 AM, Brian Mohr wrote:
> performance gain by initially rendering each object to a
This depends soo much on the stuff you’re rendering. Can you be a bit
Is your text predefined(than perhaps it could be a picture/texture),
> Multiple long texts with jit.gl.text2d
jit.gl.text2d renders every displayed character into a texture, and
So one trick is to force jit.gl.text2d into making all textures(for
Sep 11, 2008 at 4:34pm
Certainly, it’s an art installation based on narrative text. The artist will write each piece of text, and place in a “space” currently consisting of 3 projections, which for all intents and purposes, can be said to be side by side. The artist will only add or edit one piece of text at a time, so all others would remain constant in content. Any text can be grabbed and moved around the space, or automatically gathered by keyword. I *think* it’s safe to say that all text will be the same font, point type, and simply white on black background.
I think you have partly answered my question already, if gl.text2d is keeping track of changes, and therefor maintaining a texture (rather than creating the texture every frame) then it’s already saving the step I thought I might need to get around. And thanks for the reminder about the first rendering, had forgotten about that, however, my performance drop occurs even when nothing is changing. One thing that interests me, my worst performance was when I accidentally sent a 320×240 matrix to one of the gl.text2d, even though it was mostly empty, my machine was not happy thinking about so many characters, but once it’s rendered to a texture, most of which was probably off screen, why would this slow me up so much?
Also, when you say text2d makes a texture, do you mean for a single character, or the entire text content, that is, for each new unchanged frame, is there a single texture it recalls, or it is recalling a texture for each character and assembling them together into the whole? Not sure that’s clear, but hopefully you follow?
Thanks so much for your insights,
Sep 12, 2008 at 11:06am
On Sep 11, 2008, at 6:34 PM, Brian Mohr wrote:
Well, I don’t know internals of jit.gl.text2d, but probably the object
> Also, when you say text2d makes a texture, do you mean for a single
A texture per used character.
In theory, you should be able to render almost any gl object to
So, if there’s no workaround for @capture, perhaps you could draw the
You must be logged in to reply to this topic.