> On 15 Jul 2015, at 09:53, Petr Vytovtov <osa...@protonmail.ch> wrote:
> 
> Hello!
> 
> I've tried to make this example: 
> http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html. But the 
> app shows only a label and a rectangle (the screenshot in attachments). Is it 
> possible to use OpenGL on Sailfish? If yes how can I do 

OpenGL is definitely possible on Sailfish, it is how all the UI is rendered :)

For the GL rendering to be visible, you need to make sure to not clear it or 
draw anything on top of it. Does your squircle implementation still disable 
clearing of the QQuickView? Or perhaps your QML has a fullscreen rectangle 
which obscures the GL rendering done into the background?

cheers,
Gunnar

> 
> My opengl-test.cpp file:
> ```
> #ifdef QT_QML_DEBUG
> #include <QtQuick>
> #endif
> 
> #include <sailfishapp.h>
> #include <QGuiApplication>
> #include <QScopedPointer>
> #include <QQuickView>
> #include <QQmlContext>
> 
> #include "squircle.h"
> 
> int main(int argc, char *argv[])
> {
>     qmlRegisterType<Squircle>("OpenGLUnderQML", 1, 0, "Squircle");
> 
>     QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
>     QScopedPointer<QQuickView> view(SailfishApp::createView());
> 
>     view->setResizeMode(QQuickView::SizeRootObjectToView);
>     view->setSource(SailfishApp::pathTo("qml/opengl-test.qml"));
>     view->show();
> 
>     return app->exec();
> }
> ```
> 
> Regards,
> Petr
> Linux User Group Udmurtia
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to