Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
10-27-2011 04:55 PM
Could someone explain the 'window' concept and how that interacts with the graphics stack a bit more to me?
I have a game, and my main window has been initialized with OpenGL. Now, I want to play a video, and I was hoping that using the 'mmrenderer' in combination with the 'window' system that I could simply create a child window, have it join the main group, make it visible, and attach the mmreneder to that. Early experiments with this have lead me to believe I am doing it wrong. I will often hit an error when I try to call eglSwapBuffers on the parent window.
So how do the windows interact with each other, in particular the child parent relationship. For instance, can a child window have a different format then the parent (SCREEN_FORMAT_RGBA8888 for video vs SCREEN_FORMAT_RGBX8888 for OpenGL). Is it even possible to use the mmreneder to play video over top of an opengl based window or am I completly wrong?
I experimented a little further, created a parent window, then created a child window that I initialized with EGL, but that lead to its own issues, such as:
screen_create_window_buffers: Not supported
If I cannot overlay a child window with video, is it possible to create to SCREEN_APPLICATION_WINDOWS, one for OpenGL and one for mmrenderer, and then swap the two windows when I wish to play video. I am also under the impression that can only be one SCREEN_APPLICATION_WINDOW per process.
Hoping to get a bit more detail on how the windows all work together.
Solved! Go to Solution.
10-27-2011 05:35 PM
10-29-2011 06:01 PM
Reading your post, it looks like we have exactly the same problem. I experimented various methods, and the best I can have is a black screen on top of my OpenGL layer, with the movies's audio track playing. I also receive the events. But the video is desperately not visible
10-31-2011 09:43 AM
Your doing better then I. How did you end up getting black on the screen?
I essentially do the following:
a) Create window type Application
b) Create window 'group'
c) Set my format to 'SCREEN_FORMAT_RGBX8888' Create my buffers, and setup the window with EGL
This gives me an application window with OpenGL enabled
a) Create a window type child
b) Set transparency to be SOURCE_OVER
c) Set insivible
d) Set format/usage to SCREEN_FORMAT_RGBA8888/SCREEN_USAGE_NATIVE
e) Create a buffer as in the 'video' example
f) Post the screen
g) Set a window ID (which will be used with mmrenderer, though I am not certain if SET_PROPERTY_ID_STRING is the same as winid that mmrenderer uses yet).
h) Join the group
i) Mark the zorder as 1 and make it visible
I expect to see at least black, but I can still only see my OpenGL window. I do not crash however
How do you guys get the black screen? You seem to be slightly further along then I.
10-31-2011 09:59 AM
The difference is that I'm using SCREEN_FORMAT_RGBX8888 for the movie surface format. Indeed using SCREEN_FORMAT_RGBA8888 I also see my OpenGL window
I also don't use the SOURCE_OVER thing.
Concerning the "g" point, I also had the same doubts... but I made like you.
10-31-2011 10:02 AM
11-02-2011 09:33 AM
11-02-2011 10:07 AM
Sorry I also had an anwser from RIM engineers (great support BTW), and all is working correctly. I planned to make a post on the forum as you did, but did not found the time yesterday. Thanks to you for having done it
Concerning the RGBA format, I discovered a possible alpha blending GL bug in the drivers when using this format. But using RGBX also works for me, and no GL bug. For info I reported the problem to TI yesterday, but in the meantime suggest to use RGBX.
11-02-2011 10:14 AM