Mixture of stunts and OpenGL ARE

I use bbndk - 10.0.4 - beta with a Dev Alpha device. I want to have a record of the user of Cascades interface on top of an OpenGL ES 2.0 window. The web page of the Cascades examples indicates that this is possible.

To see if it worked, I adapted the HelloForeignWindow sample so that the child window is linked to an OpenGL ES 2.0 context. I have essentially merged with the HelloForeignWindow sample GLES20Template sample and adapted bbutil_init_egl() so that it calls:

screen_create_window_type (& screen_win, screen_ctx, SCREEN_CHILD_WINDOW)

Instead of screen_create_window().

All code initialization RULES and screen_ * works very well and is called createForeignWIndow() that is triggered by an event from the user interface. Note that this means that the following code is running in a different thread from the code in HelloForeignWindowApp::run() where I want to do my rendering:

bool HelloForeignWindowApp::createForeignWindow(const QString &group, const QString id, int x,
        int y, int width, int height)
{

    QByteArray groupArr = group.toAscii();
    QByteArray idArr = id.toAscii();

    // You must create a context before you create a window.
    if (screen_create_context(&mScreenCtx, SCREEN_APPLICATION_CONTEXT) != 0) {
        returnfalse;
    }

          // Adaptation of normal bbutil_init_egl()
    if(bbutil_init_egl_child(mScreenCtx, idArr.constData(), idArr.length(), groupArr.constData(), groupArr.length()) != 0)
    {
    return false;
    }

    if(initializegl() != 0)
    {
    return false;
    }
    return true;
}

The problem is when I call glClear() from inside the HelloForeignWindowApp::run() , I get a crash because of error of segmentation:

  • Thread [10] (Suspended: Signal: SIGSEGV: Segmentation fault)
  • glClear() to 0x78009ee4
  • Render() to helloforeignwindowapp.cpp:275 0 x 104110
  • HelloForeignWindowApp::doNoise() to helloforeignwindowapp.cpp:306 0x1042fc
  • HelloForeignWindowApp::run() to helloforeignwindowapp.cpp:88 0 x 103908

The segmentation fault made me suspect that OpenGL ES didn't like me it boot to a thread and call it in another thread. So I tried to put the initialization and the entire interior of the HelloForeignWindowApp::run (), which would now be called HelloForeignWindowApp::initForeignWindow (). Generating this error:

  • ApplicationPrivate::screenSupport: ERROR called from the thread interface user HelloForeignWindowApp (0xaf484)
  • ApplicationPrivate::screenSupport: ERROR called from the UI thread

from the inside of the initForeignWindow () during the call to createForeignWindow(), although createForeignWindow() has not actually called before the error was raised.

If you're still with me at this time, thank you! My questions are:

  • What is the right way to integrate an OpenGL window in the sample of HelloForeignWindow?
  • Why glClear() causes segfault during my first attempt?
  • On my second attempt, why the 'ERROR called from the UI thread' get fired?
  • Where is the documentation that I can study to understand the Cascades model more in detail of thread? (eg. How Application: exec() works exactly, how the: run() call is threaded etc..)

Thanks a lot guys.

PS I tried to attach a zipper of my project, but I can't find the option.

Solved.

After looking at your example, I changed my second attempt and I got, it works. The cause of the "Independent from the UI thread called ERROR" was the call to ForeignWindow::mainWindowGroupId() of in the HelloForeignWindowApp::run thread (). I put this in the constructor call, stored the QString resulting as a member and then makes any OpenGL initialization and screen wire HelloForeignWindowApp::run() as before.

I think it is equivalent to the example of your provided in terms of thread.

For people who want this example code, see examples of community of Cascades on the developers blog. Community Macadamian mixes stunts and OpenGL rendering.

So it seems that the constructor is executed on the user interface thread "" in this case, which is a little confusing for me because it is called main(), and I thought that a characteristic of the Cascades was that the user interface has been made on the main thread by default.

    // We complete the transaction started in the app constructor and start the client event loop here...
    return Application::exec();
}

Can you explain this comment further or point me to a document that is in the configuration of threading for Cascades and how it decides what constitutes a "user interface thread?

Tags: BlackBerry Developers

Similar Questions

  • New to Lightroom 6.  Were able to import photos previously. Now when I try to import Photos and videos, I specify a folder that contains a mixture of NEF and JPG images, and thumbnails will appear.  However, they are grayed out. When I hit Import, I have

    New to Lightroom 6.  Were able to import photos previously. Now when I try to import Photos and videos, I specify a folder that contains a mixture of NEF and JPG images, and thumbnails will appear.  However, they are grayed out. When I hit Import, I get a message that says no. Photos import active.

    This means that you have previously imported these pictures/videos into Lightroom, and you must not (and are not allowed to) import them again.

    Go to your library Module (not the import dialog box) and find the photos, then you can make use of them in any way you want in Lightroom.

  • Why only 9.0EX of DirectX and OpenGL 2.1 in Fusion 8.1.0

    My MacBook Pro retina end 2013 with Nvidia GT750M is with MacOS 10.11.4 and installed with VMWare Fusion Pro 8.1.0. Like the other user complains about VMware 8.0.1. There are only of ""Supports DirectX 9.0EX with Aero and OpenGL 2.1"in Display Configuration-> 'Accelerate 3D Graphics' dialog box, not the support of Direct10.» I also installed the DirectX SDK from MSFT site / user guide.

    Attached to the journal. Please help me to fix it.


    Details of the system below:

    OS: Mac OS 10.11.4

    Host hardware: MacBook Pro retina, 16 GB of RAM

    Home graphics card: Nvidia GT750M with 2 GB RAM and Intel Pro Iris 1536 MB RAM processor

    Fusion version: 8.1.0 (Pro version, license)

    Guest OS: Windows 7 Professional SP1 is installed with Microsoft DirectX end-user DURATION of x 64

    Hello

    Stop the virtual machine Windows 7.

    Take a snapshot (so you can restore it in case it does not work as you wish)

    -> To change the virtual hardware of your guests to version 10 to version 12, under the menu 'Virtual Machine'-> compatibility settings

    Restart your Windows.

    --

    Wil

  • My photos and videos are not in chronological order, when I export the Photos app

    Hello. When I export my photos and videos from the Photos app on my iMac all the photos and videos are not in order. I need all the photos in good standing - I need to export about 5 000 pictures of the application in order for a meeting next week! Help, please!

    Ethan.

    This is not photo - it is a function of the viewing program (probably the finder) - once the photos are exprted form pictures you can see then in different ways which you control, Photos does not - by the finder you can view by name of son, byt several dates, by file size, etc.

    Usually, the best way to accomplish what you want is to export using the names of batch file numbeing and then sort by file name in the program viewing

    LN

  • Are automatically shared Contacts with the members of the family of a device for all devices of the family? One device uses IOS9 and others are using IOS10.

    Members of the family can share Contacts?  A member of the family is on IOS9 and others are on IOS10. Our calendars are sharing but not our contacts?

    No, sharing of family does not share Contacts. He shares:

    Purchases

    (If you are registered) Apple's music

    Family Photo album

    Family calendar

    Location sharing

    Find my iPhone

    Apple - iCloud - family sharing

    See you soon,.

    GB

  • All of a sudden I lost all my emails and none are pass, even if they are still going to my computer. I checked in settings and the e-mail address is still there. Help!

    I suddenly lost all my emails on my Ipad and none are pass, even if they are still going to my computer. I checked in settings and the e-mail address is still there. Help!

    Have you tried to delete the account and adding it back?

  • ITunes 12.5.1.21 to PC fonts and graphics are too big.

    Just downloaded Itunes 12.5.1.21 for PC and the graphics and fonts are way too big and blurry. I am running 32-bit Windows 7. It is completely unmanageable. There is no music stored on the PC, it's all in the cloud. I had itunes on the PC for many years and this is the first time that this has happened. Is there a way to fix this? I've deleted and reinstalled and it's the same thing...

    Same here, Win10.all of development and large photos and fonts

  • Icons and images are distorted. Only happens in firefox. The reset does not help.

    Hey there,

    So today when I opened Firefox, this is what she looked like. Icons and images are distorted. Text is fine, the scrolling is fine. And this only happens in Firefox (i.e. other programs on my computer, including other browsers are fine).

    No idea what it is and how to fix it?

    Thank you.

    Try disabling graphics hardware acceleration. As this feature has been added to Firefox, it has gradually improved, but there are still some problems.

    You will need to restart Firefox before this takes effect so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Click the menu button

      then select the Options under Windows or Preferences on Mac or Linux.

    2. Select the Advanced Panel, then on the general tab.
    3. Uncheck the use hardware acceleration when available.
    4. Restart Firefox and see if the problems persist.

    This solve your problems? Please report to us!

    If the problem is resolved, you should check the updates for your graphics driver by following the steps in these articles in the knowledge base:

    Thank you.

  • I HAV HAV problem I can not connect my tag because because page that I move to Puerto Rico in new York and my password and imail are in are in boxes storge away

    And I can not connect and I want to know if my story of my page on tagged 2013 posible I see see it connect... Thank you for your support...

    I understand that the passwords and email are stored away and you try to access a login page. It is possible to reset the password if the email offers that.

  • Thunderbird does not accept the user name and password, an error that the user name and password are not correct

    Thunderbird esteem username and password are not correct,

    Gmail account?

  • I have now installed this last 37.01 on two computers of desktop PC and both are break much and giving message firefox still works?

    I have now installed this last 37.01 on two computers of desktop PC and both are break much and giving message firefox still works?

    Use "Firefox > output" (Windows: Firefox/file > quit;) Mac: Firefox > quit Firefox. Linux: Firefox/file > exit) to close Firefox if you are currently doing by clicking on the X close in the title bar of Firefox.

  • My keyboard loses functionality when I try to leave comments on Facebook. Delete, BACKSPACE, apostrophe and cut, copy and paste are disabled.

    My keyboard loses functionality when I try to leave comments on Facebook.

    Delete, BACKSPACE, apostrophe and cut, copy and paste are disabled. This only happens in the comments, no functionality is lost in the mail or status updates.

    I disabled all my Add-ons and restarted Firefox and the problem persists. I've updated modules, restarted Firefox and the problem persists.

    I updated Firefox and that made no difference.

    I deleted the cookies and cache and still no luck.

    SOLUTION: I disabled the add-on Grammarly Lite and this seems to have solved the problem.

    I informed the Facebook of the show. I can't find any information about this problem in troubleshooting of Facebook.

    I can't reproduce this problem in Internet Explorer. All functions work fine.

    I have the same problem on another device that is running Windows 7 Starter and a laptop running Windows 8.1.

    Separate the issue;
    Shows details of the system;

    Plug-ins installed

    Shockwave Flash 15.0 r0
    Shockwave Flash 11.5 r502

    Having multiple versions of a program can cause problems.

    Take uninstaller from here:
    Uninstall Flash Player | Windows
    Uninstall Flash Player | Mac
    Reinstall the latest version.

    Flash Player v15.0.0. 239 http://get.adobe.com/flashplayer/

  • Re Mail Yosemite: where are the files of signatures and rules are?

    I had to reinstall Yosemite from scratch. I want to import Signatures and rules - without accounts - back-up of the previous installation. What are the names of the files in question and where are they located?

    You need locate the folder ~/Library/Mail/V2/MailData/Signatures for your signatures and ~/Library/Mail/V2/MailData/SyncedRules.plist for your rules.

    Drag and drop in the same location on your new installation.

    I hope this helps.

  • How can I disable the auto-hide known file attachments, and why are still on the 10 internet pages where I have to download something if I use firefo

    How can I disable the auto-hide known file attachments and why are they always about 10 Web pages where I have to download something when I use mozila firefox?

    Windows computer

    Ignore the link of the player Shockwave that probably, you mustn't he compared to Flash player because it is barely used nowadays.

    FredMcD, you really need correct/update your clipboard for that.

    The downloadable Shockwave player version (not flashing) is 12.1.3.153 and not 15.0.0.152 as you can be confusing which version of the flashplayer reached before.

    Flash player is 15.0.0.189 and not 14.0.0.179 as you can see at https://www.adobe.com/software/flash/about/

    Flash player is used for good Flash videos like Youtube and Flash games in Shockwave player is little used compared to Flash, for things such as games and online learning tools.

    And please, don't say "I asked. It's the way it is displayed on the site"as you said last time in https://support.mozilla.org/en-US/questions/1026518 , because who says little about why you're wrong ad versions and calling Shockwave player, Shockwave Flash.

  • BONES of Firefox does not appear correctly. It seems that the CSS and JS are not rendered. Any help would be most appreciated!

    I would have preferred someone show a screenshot of the web pages, but it is not a file attach on this forum. In any case, with only Firefox OS, not my other browsers, web pages didn't properly. For example on Facebook, there is no header or footer. JS is enabled in the browser, and like I said Chrome and Safari are NOT having problems. I'm surmising that the CSS and JS files are somehow not displayed. I can be very wrong, but I would accept with gratitude any help anyone has to offer. Thank you and have a great day!
    Theresa

    Hi Lufte,

    I'm sorry to hear that you are having problems with the rendering of some pages on your Firefox OS device.

    Please create a new question in the thread so that we can follow your question separately:

    Please also provide the model of the device and the version that you are currently using, and if this problem started recently. Please let us know if you notice also messed with the time and date displayed in your device.

    Thank you

    -Ralph

Maybe you are looking for