Too complex for my poor little chip

214 views
Skip to first unread message

dirk.va...@zappware.com

unread,
Aug 28, 2015, 3:44:44 AM8/28/15
to GLyphy
I'm looking for a way to draw text in OpenGL on a set-top box platform. It supports OpenGL ES 2.0, so GLyphy looked like a nice fit. Unfortunately, the shader seems to be a bit too complex:
ERROR:LINK-10 (line 0) Insufficient resources to schedule program
Too bad, I went through all the trouble to get it to compile, and now the chip barfs :( Oh well...

Just thought I'd let you know I wanted to use GLyphy, but unfortunately I'll have to look at a different solution.

Keep up the good work though!

Behdad Esfahbod

unread,
Aug 28, 2015, 9:23:00 AM8/28/15
to gly...@googlegroups.com
Hi,

Thanks for the note.  Yes, GLyphy is rather heavy... Plus, sometimes it's just the drivers that are not capable of handling it, not necessarily the chips themselves.

Do you know what chip+driver that was?

behdad

--
You received this message because you are subscribed to the Google Groups "GLyphy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glyphy+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dirk.va...@zappware.com

unread,
Aug 28, 2015, 3:37:50 PM8/28/15
to GLyphy
Hey,

It's a Broadcom chip (97252). It has an ARM core and Broadcom proprietary drivers.

OpenGL ES 2.0 is supposedly supported, but even the GL_OES_standard_derivatives extension is not available, limiting my options. I have tried a different approach, using freetype to render textures (on demand right now, no caching at all) and that made my framerate drop from frames per second to seconds per frame (for a single line of text).

The only thing that I found up to now that is fast enough to be considered is using OpenVG. No really my first choice, but fortunately the driver does support OpenGL and OpenVG simultaneously.

I have yet to try the old SDF technique (the Valve one) but haven't found ready to use sample code that works on ES so I'll have to brew my own. I'm not that big a fan of that technique either since we have to render all kinds of different languages (Croatian, Russian, Farsi, Arabic, Thai to name a few) that we have to be able to switch between on the fly. So I'd like to avoid using generated textures containing all glyphs.

Fun little project :)

Dirk

Nicolas Rougier

unread,
Aug 29, 2015, 1:58:43 AM8/29/15
to GLyphy, dirk.va...@zappware.com
You can have a look at https://github.com/rougier/freetype-gl.
It uses a single vertexe buffer, a texture atlas and there is a SDF example (GL ES compatible). Also, the Harfbuzz example shows complex layout (arabic display in this case).

Nicolas

Dirk Vangestel

unread,
Aug 31, 2015, 2:47:33 AM8/31/15
to Nicolas Rougier, GLyphy
Hi Nicolas,

I have looked at your code before, but gave up on it because it uses the GL_OES_standard_derivatives extension which is not available on my platform. I did only try the SDF samples, I'll have a look again at the others to see if I can use any of them.

Regards,
Dirk

Behdad Esfahbod

unread,
Aug 31, 2015, 4:31:33 AM8/31/15
to gly...@googlegroups.com, Nicolas Rougier
You can replace GL_OES_standard_derivatives usage with a uniform or vertex
attribute that contains font size, etc.

On 15-08-31 07:47 AM, Dirk Vangestel wrote:
> Hi Nicolas,
>
> I have looked at your code before, but gave up on it because it uses
> the GL_OES_standard_derivatives extension which is not available on my
> platform. I did only try the SDF samples, I'll have a look again at the others
> to see if I can use any of them.
>
> Regards,
> Dirk
>
>
> On Sat, Aug 29, 2015 at 7:58 AM, Nicolas Rougier <nicolas...@gmail.com
> <mailto:nicolas...@gmail.com>> wrote:
>
> You can have a look at https://github.com/rougier/freetype-gl.
> It uses a single vertexe buffer, a texture atlas and there is a SDF
> example (GL ES compatible). Also, the Harfbuzz example shows complex
> layout (arabic display in this case).
>
> Nicolas
>
> On Friday, August 28, 2015 at 9:37:50 PM UTC+2, dirk.va...@zappware.com
> <mailto:glyphy+un...@googlegroups.com>.

Dirk Vangestel

unread,
Sep 1, 2015, 4:26:25 AM9/1/15
to Nicolas Rougier, GLyphy
Hi Nicolas,

Preliminary results on trying to run the harfbuzz sample:
- demo-harfbuzz.c calls glEnable( GL_TEXTURE_2D ); which is not needed/supported anymore (it's for a fixed pipeline)
- vertex_buffer_render() calls glDrawElements( mode, icount, GL_UNSIGNED_INT, 0 ); but GL_UNSIGNED_INT is only available with the extension GL_OES_element_index_uint which is not available on my platform

The first one is harmless, I only found it because I was searching where the GL_INVALID_ENUM error came from.

I haven't looked yet if I can just render shorts instead of ints, I'm new to OpenGL so it takes me a bit longer to identify and fix problems :)

Regards,
Dirk

Reply all
Reply to author
Forward
0 new messages