Go to advanced search

by blackshard83
Wed Oct 29, 2014 12:47 pm
Forum: Graphics programming
Topic: Concurrent eglSwapBuffers, doing it synchronously
Replies: 1
Views: 1834

Concurrent eglSwapBuffers, doing it synchronously

Hi all, I have a bit of complex question for the gurus here. My project has multiple graphical threads and each thread is bound to its own dispmanx layer. I draw things on them using openVG API and manage the surfaces with EGL quite the standard way. A question arises when I call eglSwapBuffers(). E...
by blackshard83
Wed Jun 04, 2014 9:40 am
Forum: OpenVG
Topic: Rendering text with shadow
Replies: 0
Views: 1163

Rendering text with shadow

Hello all, I'm working to obtain some text with a shadow behind it. The main idea I had can be resumed in these three simple passages: 1) draw a text, using vgDrawGlyph 2) apply a convolution to blur the image, using vgConvolve or vgSeparateConvolve 3) redraw the same text on top of the blurred text...
by blackshard83
Mon May 19, 2014 9:26 am
Forum: Graphics programming
Topic: Using bitmap glyphs with openVG is a waste of VRAM?
Replies: 5
Views: 3920

Re: Using bitmap glyphs with openVG is a waste of VRAM?

I recently reviewed my font library and the openVG documentation. The OpenVG documentation states that bitmap glyphs should be referenced by vgSetGlyphToImage that accepts a VGImage handle. Actually I create images using vgCreateImage function and vgCreateImage is responsible for the 4096 bytes alig...
by blackshard83
Sat Apr 19, 2014 10:53 pm
Forum: Graphics programming
Topic: Which api for 2d images?
Replies: 2
Views: 2634

Re: Which api for 2d images?

Indeed you're going to use: - EGL - OpenVG - Some bits about native broadcom libraries. EGL is the "glue" between all the Open* libraries (like OpenGL, OpenVG). It has the deal to glue them together with the underlying proprietary stuff and let them interoperate. Since you're going to use just 2d, p...
by blackshard83
Wed Mar 19, 2014 3:43 pm
Forum: Graphics programming
Topic: vgGetError() call very slooow!
Replies: 6
Views: 2105

Re: vgGetError() call very slooow!

Thanks for the hint, this is a smart use of #define ;)
by blackshard83
Mon Mar 17, 2014 1:21 pm
Forum: Graphics programming
Topic: Using bitmap glyphs with openVG is a waste of VRAM?
Replies: 5
Views: 3920

Re: Using bitmap glyphs with openVG is a waste of VRAM?

Yes, I thought about that. Using a sprite image and then render the needed parts to build the text is a well-known technique. But it has two major problems: 1) You're limited to a typeface and font size, since you need your font completely rendered into a sprite. This is a major limitation because I...
by blackshard83
Mon Mar 17, 2014 8:54 am
Forum: Graphics programming
Topic: Using bitmap glyphs with openVG is a waste of VRAM?
Replies: 5
Views: 3920

Using bitmap glyphs with openVG is a waste of VRAM?

Hi all, back again with another question about optimization :) I coded my own font library that uses openVG glyph rendering and FreeType2 to render the characters to bitmaps. I do these passages to render a character: 1) Render it in CPU memory using freetype2 library 2) Load it into GPU memory usin...
by blackshard83
Mon Mar 17, 2014 8:31 am
Forum: Graphics programming
Topic: vgGetError() call very slooow!
Replies: 6
Views: 2105

Re: vgGetError() call very slooow!

Thanks for the explanation! It is really useful to understand how to optimize the rendering process. I understand that also calls like vgGetPixels should invoke vgFlush/vgFinish to flush the pipeline to the GPU before being executed... This let me think I could afford some more optimization doing a ...
by blackshard83
Wed Mar 05, 2014 7:44 pm
Forum: Graphics programming
Topic: vgGetError() call very slooow!
Replies: 6
Views: 2105

Re: vgGetError() call very slooow!

Thanks a lot for the answer, now things are much more clear!
by blackshard83
Wed Mar 05, 2014 4:56 pm
Forum: Graphics programming
Topic: vgGetError() call very slooow!
Replies: 6
Views: 2105

vgGetError() call very slooow!

Still working on my 2D-intenstive project, I found a major increase in speed removing completely vgGetError() calls from my code. I was used to invoke vgGetError() after each operation I did (like acting on a transformation matrix, blitting an image or font glyph, ...) to check for problems. It turn...
by blackshard83
Tue Feb 18, 2014 5:06 pm
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Re: Memory leakage with multithreaded EGL/OpenVG programming

I did some preliminar tests, leaving the application running all the night and didn't notice memory leaks. I'll do some more long-term empirical testings and report here. Anyway to me the leaks seems pretty well fixed.
by blackshard83
Tue Feb 04, 2014 12:40 pm
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Re: Memory leakage with multithreaded EGL/OpenVG programming

I'll check that out as soon as possible. I hope there aren't side-effects, but I have the chance to do a stress test on a real long-running process that will make evident any leak.
by blackshard83
Sun Feb 02, 2014 11:26 pm
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Re: Memory leakage with multithreaded EGL/OpenVG programming

Thanks for the hint. I'll try the workaround and report if it worked.

edit: I tried to add a usleep (10000); as suggested after eglReleaseThread in the leak_test example provided above but no luck... to me it looks like there just isn't the code to free the thread state memory in the implementation.
by blackshard83
Sun Feb 02, 2014 6:18 pm
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Re: Memory leakage with multithreaded EGL/OpenVG programming

Ok, I took a look at the source code...

I found the implementation of eglReleaseThread function in file userland/interface/khronos/egl/egl_client.c.
At the row 1249 of such file I see this suspect comment...:

Code: Select all

      //TODO free thread state?
:o
by blackshard83
Sun Feb 02, 2014 12:48 pm
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Re: Memory leakage with multithreaded EGL/OpenVG programming

I didn't try any memory leak detector yet. I'm pretty sure the leak is in the egl side, but I'm not sure if the leak happens because I forgot to setup correctly the egl state, it is expected* or it is a real implementation fault. Just calling eglBindApi and then immediately calling eglReleaseThread ...
by blackshard83
Fri Jan 31, 2014 10:31 am
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Re: Memory leakage with multithreaded EGL/OpenVG programming

I did some experiments but hadn't found a solution to this memory leak. To either bump up this thread and give a simple proof everyone can run, I made a little program. It just initializes the EGL environment and do an on screen color fading using a newly generated thread on each iteration. Inside t...
by blackshard83
Mon Jan 13, 2014 8:18 am
Forum: Graphics programming
Topic: Memory leakage with multithreaded EGL/OpenVG programming
Replies: 13
Views: 5438

Memory leakage with multithreaded EGL/OpenVG programming

Hello guys, I'm new here on the forum. I'd like to confront myself with some problems with multithreaded graphics programming I've run into. I am working on a python project where there is a lot of 2D graphical interaction. I built myself some libraries in C/C++ to access low level EGL/openVG primit...

Go to advanced search