Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    If i want to place QWebKit on top of OpenGL what is the best way to do it ?

    Game Development
    3
    16
    9102
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      umen242 last edited by

      does this example :
      http://labs.qt.nokia.com/2008/06/27/accelerate-your-widgets-with-opengl/
      from 2008 is valid or there is better ways now in 2011?

      1 Reply Last reply Reply Quote 0
      • Z
        zester last edited by

        Is this what you were referring to?

        !http://i55.tinypic.com/2lc8lz9.png!

        http://zester.googlecode.com/files/qt-labs-modelviewer.zip

        1 Reply Last reply Reply Quote 0
        • U
          umen242 last edited by

          hi
          yes , i download you model viewer modified demo
          do you have any source code to this browser code??

          1 Reply Last reply Reply Quote 0
          • Z
            zester last edited by

            I don't understand.

            Line 70 - 74 of openglscene.cpp

            @
            QWebView *webView = new QWebView();
            webView->load(QUrl("http://developer.qt.nokia.com/forums/viewthread/6151/"));

            QWidget *instructions = createDialog(tr("Web Browser"));
            instructions->layout()->addWidget(webView);
            

            @

            Then just go to http://doc.qt.nokia.com/4.7/qtwebkit.html
            or in particular http://doc.qt.nokia.com/4.7/qwebview.html

            You will find all of the api's to make the web browser of your dreams ;)

            1 Reply Last reply Reply Quote 0
            • U
              umen242 last edited by

              i guess your code that i was download is not updated with browser example

              1 Reply Last reply Reply Quote 0
              • U
                umen242 last edited by

                my mistake i did't download your link..
                wow performance is really crap ... hope that Qt will fix that in the next versions

                1 Reply Last reply Reply Quote 0
                • Z
                  zester last edited by

                  No problem... lol Probably why you don't see alot of 3D Qt Web Browsers out there.

                  1 Reply Last reply Reply Quote 0
                  • Z
                    zester last edited by

                    If your feeling adventures there is also Berkelium it's made to render to an OpenGL or DirectX texture.

                    Berkelium is a BSD licensed library that provides off-screen browser rendering via Google's open source Chromium web browser.

                    It takes advantage of Chromium's multiprocess rendering to isolate browsers from each other and can render to any buffer in memory. The user of the library can inject input and javascript code into web pages to control them, as well as listen for events generated by the page such as navigation events, load sequence events and paint events. Berkelium provides a small API for embedding a fully functional browser into any application.

                    http://berkelium.org/

                    Source is here.
                    https://github.com/sirikata/berkelium

                    Binary is here.
                    https://github.com/sirikata/berkelium/downloads

                    1 Reply Last reply Reply Quote 0
                    • U
                      umen242 last edited by

                      wow this is great stuff!

                      1 Reply Last reply Reply Quote 0
                      • Z
                        zester last edited by

                        Being that you posted this in the Game Development forum, might I make a suggestion for a game development framework.

                        Ogre3D
                        http://www.ogre3d.org/

                        Ogre3D/Qt4Widget
                        http://zester.googlecode.com/files/QtCreatorOgre2.zip
                        !http://i52.tinypic.com/vxj0qf.png!

                        Ogre3D Example
                        http://zester.googlecode.com/files/Ogre3D.zip
                        @
                        // g++ main.cpp -o main pkg-config --libs --cflags OGRE OIS

                        #include <Ogre.h>
                        #include <OgreFrameListener.h>
                        #include <iostream>

                        using namespace Ogre;

                        //
                        class MyFrameListener : public FrameListener {
                        public:
                        bool frameStarted (const FrameEvent &evt);
                        bool frameEnded (const FrameEvent &evt);
                        bool frameRenderingQueued (const FrameEvent &evt);
                        };

                        //
                        bool MyFrameListener::frameStarted(const FrameEvent &evt) {
                        std::cout << "Frame Started" << std::endl;
                        return true;
                        }

                        //
                        bool MyFrameListener::frameEnded(const FrameEvent &evt) {
                        std::cout << "Frame Ended" << std::endl;
                        return true;
                        }

                        //
                        bool MyFrameListener::frameRenderingQueued(const FrameEvent &evt) {
                        std::cout << "Frame Queued" << std::endl;
                        return true;
                        }

                        int main(void)
                        {
                        // Create an instance of the OGRE Root Class
                        Root* root = new Root;

                        // Configures the application
                        if (!root->restoreConfig())
                        root->showConfigDialog();
                        root->saveConfig();

                        // Create a render window
                        RenderWindow* window = root->initialise(true, "Tutorial 1");

                        // Create a new scene manager.
                        SceneManager* sceneManager = root->createSceneManager(ST_GENERIC);
                        sceneManager->setAmbientLight(Ogre::ColourValue(0.0, 0.0, 0.0));

                        // Create a new camera
                        Camera* camera = sceneManager->createCamera("Camera");
                        camera->setPosition(Ogre::Vector3(0,0,15));
                        camera->lookAt(Ogre::Vector3(0,0,0));
                        camera->setNearClipDistance(5);

                        // Add our model to our resources and index it
                        

                        ResourceGroupManager::getSingleton().addResourceLocation("Media/packs/Sinbad.zip", "Zip");
                        ResourceGroupManager::getSingleton().addResourceLocation("Media/models/", "FileSystem");
                        ResourceGroupManager::getSingleton().initialiseAllResourceGroups();

                        //
                        Light* light1 = sceneManager->createLight("Light1");
                        light1->setType(Ogre::Light::LT_POINT);
                        // Set Light Color
                        light1->setDiffuseColour(1.0f, 1.0f, 1.0f);
                        // Set Light Reflective Color
                        light1->setSpecularColour(1.0f, 0.0f, 0.0f);
                        // Set Light (Range, Brightness, Fade Speed, Rapid Fade Speed)
                        light1->setAttenuation(10, 0.5, 0.045, 0.0);

                        //
                        Entity* lightEnt = sceneManager->createEntity("LightEntity", "sphere.mesh");
                        SceneNode* lightNode = sceneManager->createSceneNode("LightNode");
                        lightNode->attachObject(lightEnt);
                        lightNode->attachObject(light1);
                        lightNode->setScale(0.01f, 0.01f, 0.01f);
                        lightNode->setPosition(0, 4, 10);

                        sceneManager->getRootSceneNode()->addChild(lightNode);

                        // Using the camera create a viewport and set the background color to black
                        Viewport* viewport = window->addViewport(camera);
                        viewport->setBackgroundColour(Ogre::ColourValue(0.0,0.0,0.0));

                        // Use the viewport to set the aspect ratio of the camera
                        camera->setAspectRatio(Real(viewport->getActualWidth()) /
                        Real(viewport->getActualHeight()));

                        // Create an instance of our model and add it to the scene
                        Entity* ent = sceneManager->createEntity("Sinbad.mesh");
                        SceneNode* entNode = sceneManager->createSceneNode("Character");
                        entNode->attachObject(ent);
                        sceneManager->getRootSceneNode()->addChild(entNode);
                        entNode->setPosition(0,0,0);

                        // Create an instance of the MyFrameListener Class and add it to the root object
                        MyFrameListener* myListener = new MyFrameListener();
                        root->addFrameListener(myListener);

                        // Tell root to start rendering
                        root->startRendering();

                        // Cleanup
                        delete myListener;
                        delete root;

                        return 0;
                        }
                        @

                        For water there is Hydrax
                        http://www.ogre3d.org/tikiwiki/Hydrax
                        !http://www.ogre3d.org/tikiwiki/img/wiki_up/Hydrax.jpg!

                        For Sky and Weather Effects there is SkyX
                        http://www.ogre3d.org/tikiwiki/SkyX
                        Note: It,s used in the Hydrax screenshot above.

                        There actually really easy to use.

                        There is also.....

                        Cutexture: A Framework for Qt User Interfaces in Ogre3D
                        http://advancingusability.wordpress.com/2010/11/09/cutexture-a-framework-for-qt-user-interfaces-in-ogre3d/
                        !http://i56.tinypic.com/b6xb83.png!

                        Note: Berkelium can be used directly with Ogre3D and Qt

                        1 Reply Last reply Reply Quote 0
                        • Z
                          zester last edited by

                          If your interested in doing 3D (Model, Texturing, Animation, Compositing, .....) with Blender http://www.blender.org/ I am a Blender Master http://developer.qt.nokia.com/forums/viewthread/6717

                          Just click on my profile and send me an e-mail I am sure I can get you going in the right direction.

                          :)

                          1 Reply Last reply Reply Quote 0
                          • E
                            Eddy last edited by

                            Impressive work zester!

                            Qt Certified Specialist
                            www.edalsolutions.be

                            1 Reply Last reply Reply Quote 0
                            • U
                              umen242 last edited by

                              Great stuff , thanks!
                              Hi
                              are you doing planing to do the game in Qt3d?

                              1 Reply Last reply Reply Quote 0
                              • Z
                                zester last edited by

                                bq. Hi are you doing planing to do the game in Qt3d?

                                Qt3d was a consideration. After trying it out for sometime I came to the conclusion that for my
                                "No Rest For The Wicked" project it wasn't a very good fit. Qt3d AFAIK has issues with lights and doesn't
                                have bone animation support. Both of those issues are deal breakers.

                                As of right now for a Highpoly game OGRE3D is the best fit and for a Lowpoly Browser Based
                                game Three.js is the best fit.

                                Why? What did you have in mind?

                                1 Reply Last reply Reply Quote 0
                                • U
                                  umen242 last edited by

                                  I have in my mind to make interactive applications for kids , not 3d games in my opinion its very full market of indie game makers and wannabe game makers very hard to put something good .
                                  its fun its great programming challenge but with no ROI for your work.
                                  now im looking for platform , Qt is winner for me.

                                  1 Reply Last reply Reply Quote 0
                                  • Z
                                    zester last edited by

                                    Qt3d would be a good fit for interactive applications for kids.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post