WOW! Have you seen our #QtWS15 Lightning Talks speaker line-up this year?

We’re excited to announce this year’s lightning talks at Qt World Summit!  After a healthy dose of keynotes and sessions covering business strategy and the code behind it, we will have 13 presenters take the floor on Tuesday, October 6th for lightning talks – short (under 10 minute) talks on a few different topics. Our program of lightning talks will be kicked off at 5:30pm and will last one hour.

Discover bold, powerful talks from diverse, exciting, and influential people. Walk away enlightened and informed.

Should be a great night so we hope to see you there! Don’t miss a front row seat, register now.

PS: There is still time to convince your boss to attend Qt World Summit 2015. Here’s a sample letter with just some of the reasons why anyone using or thinking of using Qt needs to attend this event.

The post WOW! Have you seen our #QtWS15 Lightning Talks speaker line-up this year? appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Rf4Oei

Qt for Native Client (and emscripten)

Qt for Native client has been in development for a while, and I’m pleased to announce that the project again has reached working status: running Qt applications (Qt Widgets and Qt Quick) sandboxed in the Chrome browser. In this post I’ll talk about the background of native code on the web and how to get started with Qt.

Qt for Native Client is available as an unsupported tech preview. Get the source code form code.qt.io:

git clone http://ift.tt/1LCdtao .
git checkout wip/nacl

The above “git clone” will give you qtbase only – If you are interested in using Qt Quick then you probably want a complete Qt checkout with the wip/nacl branch for QtBase.

See the presentation at the the Qt World Summit
Qt for Native Client will be presented at the Qt World Summit. Register today!

A brief history of Native Code on the Web

Native Client (NaCl) is a sandbox for native x86 code, first published back in 2009, and later extended to support x86_64 and ARM. Portable Native Client (PNaCl) is built on top of NaCl and defines an intermediate architecture-independent format for distribution. PNaCl binaries are translated to NaCl binaries on first load by the browser. Chrome runs PNaCl binaries from the Web, NaCl binaries from the Chrome App store or if enabled in browser settings. Other browser vendors have showed little interest in this line of technology.

Emscripten compiles native code to JavaScript which can run on all browsers. Later versions of Emscripten improves performance (on cooperating browsers) by using the ASM JS subset of JavaScript.

WebAssembly is a joint effort between some of the larger browser vendors, which target “is to promote early-stage cross-browser collaboration on a new, portable, size- and load-time-efficient format suitable for compilation to the web.” Compatibility for non-WebAssembly browsers is provided in the form of a WebAssembly loader implemented in JavaScript.

The Native Client SDK

The Native Client SDK is versioned along with Chrome and follows the same 6-week release cycle. The SDK contains an update script which fetches new versions and updates ‘canary’.

$ ls nacl_sdk/
        pepper_40
        pepper_41
        pepper_canary

‘pepper_NN/toolchain’ then contains PNaCl and NaCl toolchains. The “mac” in the names is the host, produced binaries are OS independent. The Qt tech preview currently supports the ‘pnacl’ and ‘newlib’ toolchains, using static builds.

$ ls nacl_sdk/pepper_41/toolchain
        mac_arm_newlib
        mac_pnacl
        mac_x86_glibc
        mac_x86_newlib

Finally we find the compiler binaries and conclude we are dealing with a cross-compiler:

$ ./nacl_sdk/pepper_41/toolchain/mac_pnacl/bin/i686-nacl-clang++ hello.cpp -o hello.nexe
$ file hello.nexe
hello.nexe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
$ ./hello
-bash: ./hello.nexe: cannot execute binary file

Emscripten

Emscripten is typically distributed by your platforms package manager. On OS X:

        brew install emscripten

This gives you the ‘em++’ compiler and friends – there are no versions or toolchain variants. em++ can produce “executable” .js files:

$em++ hello.cpp -o hello.js
node hello.js
“Hello World”

API and Platform

Programs that want to do something more interesting than printing to standard out need an API to interface against. In Qt, this is the domain of the QPA platform plugin. Native Client provides PPAPI (’Pepper’) which provides a C and C++ API for the features covered by the HTML (5) specification. For example, Pepper gives access to mouse and keyboard events, and provides 2D or 3D graphics contexts.

Emscripten also has a similar API. Qt could have used it but instead uses pepper.js, which is a re-implementation of the Pepper API on top of Html, which allows us to re-use the exiting pepper platform plugin. (It could be said that adding this level of indirection is in the spirit of compiling C++ to JavaScript). Emscripten support is still very expermental: QtCore and QtGui runs with raster graphics, the OpenGL, QtWidgets and QtQuick modules are largely untested.

Setting up Qt

The workflow is similar to using Qt for any other platform:
1. Configure and build Qt.
2. Build the application.
3. Deploy. (nacldeployqt)

The following is a simplified overview, complete getting started instructions are available at qtbase/README.md.

1. Use the provided configure script, select a NaCl toolchain or emscripten (We treat emscripten as a nacl variant.)

./nacl-configure mac_pnacl release

Build Qt:

make qtmodule-qtbase (or qtmodule-qtdeclarative)

2. Build the application

/path/to/qmake && make

3. Run nacldeployqt

/path/to/nacldeployqt application.nexe

This creates supporting files for the application: a html file, the qtloader.js script, manifest files.

In addition, nacldeployqt provides some convenience:

   -—run: Start Chrome, run the application
   -—debug: Start Chrome and nacl-gdb, run the applicatjon with attached debugger

Finally it runs:
nacl-controls-gallery

Questions? Interested in contributing to the development of Qt for Native Client? Contact us here or on #qt-labs on irc (freenode).

The post Qt for Native Client (and emscripten) appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LCdsTR

Using modern OpenGL ES features with QOpenGLFramebufferObject in Qt 5.6

QOpenGLFramebufferObject is a handy OpenGL helper class in Qt 5. It conveniently hides the differences between OpenGL and OpenGL ES, enables easy usage of packed depth-stencil attachments, multisample renderbuffers, and some more exotic formats like RGB10. As a follow up to our previous post about OpenGL ES 3 enhancements in Qt 5.6, we are now going to take a look at an old and a new feature of this class.

Qt 5.6 introduces support for multiple color attachments, to enable techniques requiring multiple render targets. Even though support for this is available since OpenGL 2.0, OpenGL ES was missing it up until version 3.0. Now that mobile and embedded devices with GLES 3.0 support are becoming widely available, it is time for QOpenGLFramebufferObject to follow suit and add some basic support for MRT.

Our other topic is multisample rendering to framebuffers. This has been available for some time in Qt 5, but was usually limited to desktop platforms as OpenGL ES does not have this as a core feature before version 3.0. We will now go through the basic usage and look at some common pitfalls.

Multisample framebuffers

By default our framebuffer will have a texture as its sole color attachment. QOpenGLFramebufferObject takes care of creating this texture, applications can then query it via textures() or can even take ownership of and detaching it from the FBO by calling takeTexture().

What if multisampling is desired? Requesting it is simple by using the appropriate constructor, typically like this:

    QOpenGLFramebufferObjectFormat format;
    format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
    format.setSamples(4);
    fbo = new QOpenGLFramebufferObject(width, height, format);

Here 4 samples per pixel are requested, together with depth and stencil attachments, as the default is to have color only. The rest of the defaults in QOpenGLFramebufferObjectFormat matches the needs of most applications so there is rarely a need to change them.

Now, the obvious question:

What if support is not available?

When support for multisample framebuffers is not available, either because the application is running on an OpenGL ES 2.0 system or the necessary extensions are missing, QOpenGLFramebufferObject falls silently back to the non-multisample path. To check the actual number of samples, query the QOpenGLFramebufferObjectFormat via format() and check samples(). Once the framebuffer is created, the returned format contains the actual, not the requested, number of samples. This will typically be 0, 4, 8, etc. and may not match the requested value even when multisampling is supported since the requests are often rounded up to the next supported value.

    ...
    fbo = new QOpenGLFramebufferObject(width, height, format);
    if (fbo->isValid()) {
        if (fbo->format().samples() > 0) {
            // we got a framebuffer backed by a multisample renderbuffer
        } else {
            // we got a non-multisample framebuffer, backed by a texture
        }
    }

What happens under the hood?

QOpenGLFramebufferObject’s multisample support is based on GL_EXT_framebuffer_multisample and GL_EXT_framebuffer_blit. The good thing here is that glRenderbufferStorageMultisample and glBlitFramebuffer are available in both OpenGL 3.0 and OpenGL ES 3.0, meaning that relying on multisample framebuffers is now feasible in cross-platform applications and code bases targeting desktop, mobile, or even embedded systems.

As usual, had Qt not cared for older OpenGL and OpenGL ES versions, there would have been some other options available, like using multisample textures via GL_ARB_texture_multisample or GL_ARB_texture_storage_multisample instead of multisample renderbuffers. This would then require OpenGL 3.2 (OpenGL 4.3 or OpenGL ES 3.1 in case of the latter). It has some benefits, like avoiding the explicit blit call for resolving the samples. It may be added as an option to QOpenGLFramebufferObject in some future Qt release, let’s see.

A note for iOS: older iOS devices, supporting OpenGL ES 2.0 only, have multisample framebuffer support via GL_APPLE_framebuffer_multisample. However, API-wise this extension is not fully compatible with the combination of EXT_framebuffer_multisample+blit, so adding support for it is less appealing. Now that newer devices come with OpenGL ES 3.0 support, it is less relevant since the standard approach will work just fine.

So what can I do with that renderbuffer?

In most cases applications will either want a texture for the FBO’s color attachment or do a blit to some other framebuffer (or the default framebuffer associated with the current surface). In the multisample case there is no texture, so calling texture() or similar is futile. To get a texture we will need a non-multisample framebuffer to which the multisample one’s contents is blitted via glBlitFramebuffer.

Fortunately QOpenGLFramebufferObject provides some helpers for this too:

    static bool hasOpenGLFramebufferBlit();
    static void blitFramebuffer(QOpenGLFramebufferObject *target, const QRect &targetRect,
                                QOpenGLFramebufferObject *source, const QRect &sourceRect,
                                GLbitfield buffers,
                                GLenum filter,
                                int readColorAttachmentIndex,
                                int drawColorAttachmentIndex);

Combined with some helpful overloads, this makes resolving the samples pretty easy:

    ...
    GLuint texture;
    QScopedPointer tmp;
    if (fbo->format().samples() > 0) {
        tmp.reset(new QOpenGLFramebufferObject(fbo->size()));
        QOpenGLFramebufferObject::blitFramebuffer(tmp.data(), fbo);
        texture = tmp->texture();
    } else {
        texture = fbo->texture();
    }
    ...

Checking for the availability of glBlitFramebuffer via hasOpenGLFramebufferBlit() is not really necessary because the multisample extension requires the blit one, and, on top of that, QOpenGLFramebufferObject checks for the presence of both and will never take the multisample path without either of them. Therefore checking format().samples(), as shown above, is sufficient. It is worth noting that creating a new FBO (like tmp above) over and over again should be avoided in production code. Instead, create it once, together with the multisample one, and reuse it. Note also that having depth or stencil attachments for tmp is not necessary.

And now on to the shiny new stuff.

Multiple render targets

In Qt 5.6 QOpenGLFramebufferObject is no longer limited to a single texture or renderbuffer attached to the GL_COLOR_ATTACHMENT0 attachment point. The default behavior does not change, constructing an instance will behave like in earlier versions, with a single texture or renderbuffer. However, we now have a new function called addColorAttachment():

void addColorAttachment(const QSize &size, GLenum internalFormat = 0);

Its usage is pretty intuitive: as the name suggests, it will create a new texture or renderbuffer and attach it to the next color attachment point. For example, to create a framebuffer object with 3 color attachments in addition to depth and stencil:

fbo = new QOpenGLFramebufferObject(size, QOpenGLFramebufferObject::CombinedDepthStencil);
fbo->addColorAttachment(size);
fbo->addColorAttachment(size);

The sizes and internal formats can differ. The default value of 0 for internalFormat leads to choosing a commonly suitable default (like GL_RGBA8). As for the sizes, the main rule is to keep in mind that rendering will get limited to the area that fits all attachments.

After this we will have a color attachment at GL_COLOR_ATTACHMENT0, 1 and 2. To specify which ones are written to from the fragment shader, use glDrawBuffers. As introduced in the previous post, QOpenGLExtraFunctions is of great help for invoking OpenGL ES 3.x functions:

QOpenGLExtraFunctions *f = QOpenGLContext::currentContext()->extraFunctions();
GLenum bufs[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2 };
f->glDrawBuffers(3, bufs);

We are all set. All we need now is a fragment shader writing to the different attachments:

...
layout(location = 0) out vec4 diffuse;
layout(location = 1) out vec4 position;
layout(location = 2) out vec4 normals;
...

The rest is up to the applications. QOpenGLFramebufferObject no longer prevents them from doing deferred shading and lighting, or other MRT-based techniques.

To check at runtime if multiple render targets are supported, call hasOpenGLFeature() with MultipleRenderTargets. If the return value is false, calling addColorAttachment() is futile.

Finally, now that there can be more than one texture, some of the existing QOpenGLFramebufferObject functions get either a new overload or a slightly differently named alternative. They need no further explanation, I believe:

QVector textures() const;
GLuint takeTexture(int colorAttachmentIndex);
QImage toImage(bool flipped, int colorAttachmentIndex) const;

That’s all for now, happy hacking!

The post Using modern OpenGL ES features with QOpenGLFramebufferObject in Qt 5.6 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1FXgDzd

Throwback Thursday: In my day, #QtWS15 tickets were only €427

If you aren’t celebrating Throwback Thursday (#tbt) yet, you should be. All the cool kids are doing it — and by that I mean our Qt World Summit 2015 speakers. Here are some of their Qt t-shirts.

qt tshirts

Do you remember your first lines of code with Qt? Or your first Qt event? Were you bright eyed, bushy tailed, and naive about the ways of cross-platform development? Do you still reminisce about a time when Qt World Summit tickets only cost €427?

Lucky for you, we’re throwing it back to our lowest price available — 30% off the regular price for the next 24 hours. That’s 427 € for a Two Day Conference Pass / €627 for a Three Day Combo Pass! Register for QtWS15 with the code “tbt70” to get €70 off your registration by Friday, September 18th, 3 pm CET / 6 am PDT.

Don’t be left out!

QtWS2015-tbt-flash-sale-badge

The post Throwback Thursday: In my day, #QtWS15 tickets were only €427 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1LiFtPY

QtWS15 | Be like one of the Qt Support team!

Now that I have your attention then I can first kick off with a reminder that at the Qt World Summit in Berlin this year there will be members of the Qt Support team available on hand to help you out if you have any questions. Visit the Qt Prodigy Bar and ask them pretty much anything. To get you in the asking mode here are some of our Frequently Asked Questions:

  • “MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib “msvcrt.lib” conflicts with use of other libs; use /NODEFAULTLIB:library” — What does this mean and how can I fix it
  • How do I convert between a BSTR and a QString?
  • How can I access dynamic properties of QObject in JavaScript when the global object is not available e.g. with QQmlEngine?
  • How can I change the sorting order of a column in QTableView?
  • Why doesn’t the palette set on a QPushButton have any effect except in some cases?
  • Just how awesome are you guys really? – Ok, we don’t actually get asked that, but that is because everyone knows we are just plain awesome!
  • How do I get the Qt Quick Compiler source code so I can build it or how can I use the existing version with my version of Qt?
  • How can I internationalize my application using existing translations in Qt?
  • How can I get rid of all the margins in the QChartView?
  • How do I replace the Qt splash screen that is shown with my own?

But what if you don’t want to wait to find out the answers to any of these questions? Well then this is your lucky day, you can find the answers to these questions (and more!) already at http://ift.tt/1O52qrB. All you need is a valid Qt Account and be logged in to see it.

How does this help me be like one of the Qt support team I hear you ask? Well by utilizing this page you too can help out and amaze your colleagues and friends by being able to answer these support questions and dazzle them with your Qt support knowledge.

And remember, we are at the Qt World Summit Prodigy Bar, feel free to set up a time and ask for our help!

qtws15_prodigy_bar_announcement

The post QtWS15 | Be like one of the Qt Support team! appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1K1lO4W

A Stellar Qt World Summit 2015 Keynote You Can’t Afford To Miss!

Qt World Summit is going to be remarkable this year, with Kenneth Cukier, Data Editor of ‘The Economist’ as one of the key speakers of the event.

Kenn is the coauthor of the award-winning book “Big Data: Big Data: A Revolution That Will Transform How We Live, Work, and Think”, a New York Times Bestseller translated into 20 languages.

Focused on themes such as innovation and Internet Governance, Kenn has spent years immersed in big data, artificial intelligence, machine learning – and their impact of both on data-driven technology and design. His speech will offer a high-level view on the future of application development and device creation and how data connects human interaction.

Find your way to the plenary room on Tuesday, October 6 so you won’t miss a minute of Kenn’s powerful keynote. Can’t wait? Take 16 minutes now (or maybe snag your ticket and then watch) to see his TED talk which gives you a taste of what’s to come.

And with such a line-up at QtWS15, we think you’ll agree inspiration is going to be in plentiful supply… Tickets are available here – get yours today, and join us for a conference to remember!

qtws15_longbanner

The post A Stellar Qt World Summit 2015 Keynote You Can’t Afford To Miss! appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Qsl3Eu

Cross-platform OpenGL ES 3 apps with Qt 5.6

Now that the alpha release for Qt 5.6 is here, it is time to take a look at some of the new features. With the increasing availability of GPUs and drivers capable of OpenGL ES 3.0 and 3.1 in the mobile and embedded world, targeting the new features these APIs provide has become more appealing to applications. While nothing stops the developer from using these APIs directly (that is, #include <GLES3/gl3.h>, call the functions directly, and be done with it), the cross-platform development story used to be less than ideal, leading to compile and run-time checks scattered across the application. Come Qt 5.6, this will finally change.

Support for creating versioned OpenGL (ES) contexts has been available in Qt 5 for some time. Code snippets like the following should therefore present no surprises:

int main(int argc, char **argv) {
    QSurfaceFormat fmt;
    fmt.setVersion(3, 1);
    fmt.setDepthBufferSize(24);
    QSurfaceFormat::setDefaultFormat(fmt);

    QGuiApplication app(argc, argv);
    ...
}

It is worth pointing out that due to the backwards compatible nature of OpenGL ES 3 this may seem unnecessary with many drivers because requesting the default 2.0 will anyway result in a context for the highest supported OpenGL ES version. However, this behavior is not guaranteed by any specification (see for example EGL_KHR_create_context) and therefore it is best to set the desired version explicitly.

The problem

So far so good. Assuming we are running on an OpenGL ES system, we now have a context and everything ready to utilize all the goodness the API offers. Except that we have no way to easily invoke any of the 3.0 or 3.1 specific functions, unless the corresponding gl3.h or gl31.h header is included and Qt is either a -opengl es2 build or the application explicitly pulled in -lGLESv2 in its .pro file. In which case we can wave goodbye to our sources’ cross-platform, cross-OpenGL-OpenGL ES nature.

For OpenGL ES 2.0 the problem has been solved for a long time now by QOpenGLFunctions. It exposes the entire OpenGL ES 2.0 API and guarantees that the functions are resolved correctly everywhere where an OpenGL context compatible with either OpenGL ES 2.0 or OpenGL 2.0 plus the FBO extension is available.

Before moving on to introducing the counterpart for OpenGL ES 3.0 and 3.1, it is important to understand why the versioned OpenGL function wrappers (for example, QOpenGLFunctions_3_2_Core) are not a solution to our problem here. The versioned wrappers are great when targeting a given version and profile of the OpenGL API. However, they lock in the application to systems that support that exact OpenGL version and profile, or a version and profile compatible with it. Building and running the same source code on an OpenGL ES system is out of question, even when the code only uses calls that are available in OpenGL ES as well. So it turns out that strict enforcement of the compatibility rules for the entire OpenGL API is not always practical.

Say hello to QOpenGLExtraFunctions

To overcome all this, Qt 5.6 introduces QOpenGLExtraFunctions. Why “extra” functions? Because adding all this to QOpenGLFunctions would be wrong in the sense that everything in QOpenGLFunctions is guaranteed to be available (assuming the system meets Qt’s minimum OpenGL requirements), while these additional functions (the ES 3.0/3.1 API) may be dysfunctional in some cases, for example when running with a real OpenGL (ES) 2.0 context.

The usage is identical to QOpenGLFunctions: either query a context-specific instance from QOpenGLContext via QOpenGLContext::extraFunctions() or subclass and use protected inheritance. How the functions get resolved internally (direct call, dynamic resolving via dlsym/GetProcAddress, or resolving via the extension mechanism, i.e. eglGetProcAddress and friends) is completely transparent to the applications. As long as the context is OpenGL ES 3 or a version of OpenGL with the function in question available as an extension, it will all just work.

As an example let’s try to write an application that uses instanced drawing via glDrawArraysInstanced. We want it to run on mobile devices with OpenGL ES 3.0 and any desktop system where OpenGL 3.x (compatibility profile) is available. Needless to say, we want as little branching and variation in the code as possible.

For the impatient, the example is part of Qt and can be browsed online here.

Now let’s take a look at the most important pieces of code that allow the cross-OpenGL-OpenGL ES behavior.

Context versioning

int main(int argc, char *argv[])
{
    QSurfaceFormat fmt;
    fmt.setDepthBufferSize(24);
    if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
        fmt.setVersion(3, 3);
        fmt.setProfile(QSurfaceFormat::CompatibilityProfile);
    } else {
        fmt.setVersion(3, 0);
    }
    QSurfaceFormat::setDefaultFormat(fmt);
    QGuiApplication app(argc, argv);
    ...
}

This looks familiar. Except that now, in addition to opting for version 3.0 with OpenGL ES, we request 3.3 compatibility when running with OpenGL. This is important because we know that instanced drawing is available there too. Therefore glDrawArraysInstanced will be available no matter what.

The fact that we are doing runtime checks instead of ifdefs is due to the dynamic OpenGL implementation loading on some platforms, for example Windows, introduced in Qt 5.4. There it is not necessarily known until runtime if the implementation provides OpenGL (opengl32.dll) or OpenGL ES (ANGLE).

Note that it may still be a good idea to check the actual version after the QOpenGLContext (or QOpenGLWidget, QQuickView, etc.) is initialized, just to be safe. QOpenGLContext::format(), once the context is sucessfully create()’ed, always contains the actual, not the requested, version and other information.

Astute readers may now point out that it should also be possible to request an OpenGL ES context unconditionally in case GLX_EXT_create_context_es2_profile or similar is supported. This would mean that instead of branching based on openGLModuleType(), one could simply set the format’s renderableType to QSurfaceFormat::OpenGLES. The disadvantage is obvious: that approach just won’t work on many systems. Hence we stick to compatibility profile contexts when running with OpenGL.

Shader version directive

    if (QOpenGLContext::currentContext()->isOpenGLES())
        versionedSrc.append(QByteArrayLiteral("#version 300 es\n"));
    else
        versionedSrc.append(QByteArrayLiteral("#version 330\n"));

What’s this? Our shader code is written in the modern GLSL syntax and is simple and compatible enough between GLSL and GLSL ES. However, there is a one line difference we have to take care of: the version directive. This is easy enough to fix up.

Note that with OpenGL implementations supporting GL_ARB_ES3_compatbility this is not needed as these should be able to handle 300 es shaders too. However, in order to target the widest possible range of systems, we avoid relying on that extension for now.

Calling ES 3 functions

    QOpenGLExtraFunctions *f = QOpenGLContext::currentContext()->extraFunctions();
    ...
    f->glDrawArraysInstanced(GL_TRIANGLES, 0, m_logo.vertexCount(), 32 * 36);

And here’s why this is great: the actual API call is the same between OpenGL and OpenGL ES, desktop and mobile or embedded platforms. No checks, conditions, or different wrapper objects are needed.

Below a screenshot of the application running on a Linux PC and on an Android tablet with no changes to the source code. (What’s better than a single Qt logo? A Qt logo composed of 1152 Qt logos of course!)

OpenGL ES 3 test app

The hellogles3 example running on Linux. Make sure to check it out live in all its animated glory as the photos do no justice to it.

GLES3 demo app on Android

The exact same app running on Android

Summary

To summarize which API wrapper to use and when, let’s go through the possible options:

  • QOpenGLFunctions – The number one choice, unless OpenGL 3/4.x features are desired and the world outside the traditional desktop platforms is not interesting to the application. Cross-platform applications intending to run on the widest possible range of systems are encouraged to to stick to this one, unless they are prepared to guard the usage of OpenGL features not in this class with appropriate runtime checks. QOpenGLFunctions is also what Qt Quick and various other parts of Qt use internally.
  • QOpenGLExtraFunctions – Use it in addition to QOpenGLFunctions whenever OpenGL ES 3.0 and 3.1 features are needed.
  • Versioned wrappers (QOpenGLFunctions_N_M_profile) – When an OpenGL 3/4.x core or compatibility profile is needed and targeting OpenGL ES based systems is not desired at all.

Bonus problem: the headers

Before going back to coding, an additional issue needs explaining: what about the GL_* constants and typedefs? Where do the OpenGL ES 3.x specific ones come from if the application does not explicitly include GLES3/gl3.h or gl31.h?

As a a general rule Qt applications do not include OpenGL headers themselves. qopengl.h, which is included by the QOpenGL class headers, takes care of this.

  • In -opengl es2 builds of Qt, which is typical on mobile and embedded systems, qopengl.h includes the header for the highest possible ES version that was found when running configure for Qt. So if the SDK (sysroot) came with GLES3/gl31.h, then applications will automatically have everything from gl31.h available.
  • In -opengl desktop and -opengl dynamic builds of Qt the ES 3.0 and 3.1 constants are available because they are either part of the system’s gl.h or come from Qt’s own internal copy of glext.h, where the latter conveniently gives us all constants up to OpenGL 4.5 and is included as well from qopengl.h.

So in many cases it will all just magically work. There is a problematic scenario, in particular on mobile, though: if only gl2.h was available when building Qt, then applications will not get gl3.h or gl31.h included automatically even if the SDK against which applications are built has those. This can be a problem on Android for example, when Qt is built against an older NDK that does not come with ES 3 headers. For the time being this can be worked around in the applications by explicitly including gl3.h or gl31.h guarded by an ifdef for Q_OS_ANDROID.

That is all for now. For those wishing to hear more about the exciting news in Qt’s graphics world, Qt World Summit is the place to be. See you there in October!

The post Cross-platform OpenGL ES 3 apps with Qt 5.6 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1Fxz8dj

Qt 5.6 Alpha released

A couple of weeks ago, we took our first steps towards the Qt 5.6 release.

One of the most important achievements was to put our new CI (continuous integration) system into use. This system has been developed from the ground up over the last 8 months as a replacement for the older, Jenkins-based CI system that we have been using so far. The old system was suffering from a lot of problems, leading to very long turn-around times to get individual patches integrated into Qt. The new system is both more stable and significantly faster. It also simplifies adding new repositories to the CI system, and is a lot more flexible in handling multiple branches. This will help both our development work as well as our release process.

With the new CI system in production, we then created the 5.6 branch from our development code base. After some stabilization work on the code base, and adjustments to our new CI system, we now have a first set of source packages for Qt 5.6 available for you to try out and play around with. Apart from many bug fixes, there are a lot new features available in Qt 5.6. If you are interested in the details, please have a look at our 5.6 wiki page.

Our focus for the coming weeks will now be to create the Qt 5.6 beta that will also be distributed in the form of binary packages. Our goal is to create the binary packages directly from our CI system, and not as a separate step afterwards. This will significantly reduce the turn-around time for creating new packages, thus making is faster and easier to create release packages in the future.

As always, you can get the alpha packages from our download page or from your Qt Account. We would like to encourage everybody to check them out, play around with them and give us feedback in terms of bug reports.

The post Qt 5.6 Alpha released appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1JP6OF5

The 10 Reasons To Join Qt World Summit 2015

To all the tech conference-goers out there, I’d like to ask you to think long & hard about one simple question: What’s your goal? Should you be networking with smart peers in the industry to make your project soar? Will you be pounding the keyboard during hands-on technical sessions?

To help you discover reasons to join the Qt World Summit 2015, we broke each out into specific goals you can attain at the conference below. You can use this as self-diagnosis of sorts to help you navigate through the 3 day conference.

 

10 Reasons to join the Qt World Summit

1) Insightful Keynotes: Goal = Get inspired. Become a better you.

Every year, we have great keynotes, and this year we have 7. Jeff Payne, founder and CEO of OpenCar, will get you thinking. Stay tuned for more exciting keynotes.

2) Competitive Advantage: Goal = Gain competitive intelligence.

50+ speakers from The Qt Company, OpenCar, Holoplot, PulseOn Oy, Intel, Esri, KDE, KDAB, Bluetooth SIG, Pelagicore, ICS, froglogic, PubNub, V-Play, Wind River, QNX, Adeneo Embedded, basysKom, Woboq and more will be share their expertise to help your Qt project soar.

3) Qt Prodigy Bar: Goal = Stay successful.

Ride the adrenaline by sharing thoughts with experts at the prodigy bar (formerly known as the help desk), ask questions, and get immediate feedback.

4) Network: Goal = Meet smart peers.

Make worthwhile connections with other professionals in the industry. Connect with attendees via the conference hashtag #QtWS15 ahead of time & join the Developer Unconference Track.

5) Optimize your next Qt Project: Goal = Get the most out of your code.

Experienced or not, learning new or classic Qt features & mixing them with strategy sessions & use cases maximizes your development project.

6) Quality Assurance: Goal = Insure High Quality of your project.

If performance, quality and security are priority for your projects, we lined up sessions you don’t want to miss for learning QML, Qt Creator, quality insurance, and your security of connected devices.

7) Share What You Do: Goal = Relay knowledge to peers & team mates.

Many attendees are cooking the next generation innovations & live tweeting with the hashtag #QtWS15 to let others know or learn what’s going on real time at the bleeding edge of development.

8) Meet/Become a Qt Champion: Goal = Inspire & be inspired.

They think about Qt on a regular basis & – regardless if you are a Maverick who doesn’t always follow the rules or you’re a rookie building your first project, for example. These entrepreneurs, thinkers, & problem solvers get VIP treatment at Qt events. Watch the Qt Champions video.

 9) Create partners: Goal = Establish professional relationships.

Similar to the “networker,” the partner attends a conference with the goal of growing opportunities, and making lasting relationships first to do business sometime after the conference.

10) Experience the vibrant energy: Goal = Have fun.

Finally, we’ve reached the inevitable. Have a little fun or glass during the evening program. In fact, it could be a great way to break the ice! However, we suggest attending a conference with some of the first 10 goals in mind — you’ll be a lot more productive that way. 😉

Don’t miss out on Qt World Summit–the greatest Qt conference yet!

qtws15_longbanner

The post The 10 Reasons To Join Qt World Summit 2015 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1OrsfPG

Qt World Summit 2015 Prodigy Bar

qtws15_prodigy_bar_announcement

Qt Prodigy Bar – face to face time with The Qt Company Engineers at #QtWS15

Unless you live under a rock, you probably noticed the #QtWS15 hashtag flood on all Qt channels. Still have no idea what Qt World Summit is? Visit the website. Or, if you prefer the tl;dr version:  It’s the global event for all things Qt, hosted in Berlin, on October 5-7, with lots of inspiring keynotes by industry leaders, world-class presentations, talks and insights on the latest developments in Qt. You should join us.

During the conference, we will be in constant communication with our delegates. Whether it’s our conference app, on stage announcements, our social media command center, or any member of our team of onsite volunteers, we will work hard to make this Qt conference the best one yet.

Qt Prodigy Bar (formerly Qt Support Desk) will be open for private technical consultations with The Qt Company experts. Interested in things like simple code review, help with pesky bugs, architecture guidance, and components assistance? Fill out the Appointment Form by September 28 and we’ll send you a confirmation email with the details.

You might even get an answer to the “Ultimate Question of Life, the Universe, and Everything.” But you already know the answer, don’t you? 42. :-)

Reserve a 30-minute slot with our brightest engineers today!

 

The post Qt World Summit 2015 Prodigy Bar appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1i13WhD

Announcing Jeff Payne as an Qt World Summit 2015 Keynote Speaker

qtws15_longbanner

We’re very excited to announce the first of our exciting Keynote line up for the Qt World Summit 2015 .. Jeff Payne, founder and CEO of OpenCar!

Over the past 30 years Jeff has directed the design and development of a number of notable connected software applications and platforms, including the best-selling PC software, Internet-in-a-Box; the global ISP, SpryNet; the first multimedia CDN, Real Broadcast Network; and the first field-programmable, multi-gigabit security appliance for carriers and network service providers, the Bivio 5000.

Jeff will shed light on how automakers can address a new competitive imperative: the in-car user experience. Automakers are refining in-car features and interaction models for drivers, but the real innovation has only just begun, as the industry prepares for a new competition – the fight to create the ideal driver’s experience. This war will be waged with software, dynamic updates and new interaction models.

In addition speaking on the Qt World Summit 2015 keynote stage, Jeff has graciously agreed to deliver a technology strategy session in the Automotive track. He will describe a modular architecture that enables automotive infotainment system integrators to more easily reuse Qt applications across various automaker projects.

Don’t miss a front row seat to our keynote presentations, register now.

The post Announcing Jeff Payne as an Qt World Summit 2015 Keynote Speaker appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1L88SrE

Wind River VxWorks RTOS support with Qt 5.5

We have been working together with Wind River to bring Qt 5 on top of their most recent release of VxWorks Real-Time Operating System (RTOS), VxWorks 7, and I am happy to share that we are close to being able to make the new Qt for VxWorks port generally available to commercial licensees based on Qt 5.5 in the coming months.

The earlier version of VxWorks, VxWorks 6.9, has been supported by Qt 4.8 since 2012. Today it is possible to run the Qt 5 goodies such as Qt Quick 2 on top of VxWorks 7. The goal of the new port is to provide a similar level of Qt functionality as the earlier Qt 4 port does, as well as to take advantage of the great graphics capabilities of Qt 5. In addition, Qt Creator IDE has integrated support for VxWorks, and deployment of a Qt application to a development hardware running VxWorks is accomplished with a single click. VxWorks development with Qt 5 can be done using both Windows and Linux development hosts.

The following video clip shows Qt 5.5 on top of VxWorks 7 running on a Freescale i.MX6 development board:

The new Qt 5.5 port for VxWorks 7 supports most of the essential Qt modules:

  • Qt Core
  • Qt GUI
  • Qt Network
  • Qt QML
  • Qt Quick
  • Qt Quick Controls
  • Qt Quick Dialogs
  • Qt Quick Layouts
  • Qt SQL
  • Qt Test
  • Qt Widgets

In addition to these, the following add-ons are supported:

  • Qt Concurrent
  • Qt Graphical Effects
  • Qt Image Formats
  • Qt OpenGL (only for porting form Qt 4, new applications should use OpenGL support in Qt GUI)
  • Qt Platform Headers
  • Qt SVG
  • Qt XML Patterns

Commercial value-add functionality, such as the Qt Quick Compiler, Qt Charts and Qt Data Visualization are also supported with the new port.

At Qt 5.5 for VxWorks 7 general availability, access will be available to all our existing Qt for VxWorks licensees. After it is released, it is available in the Qt Account for holders of a valid Qt for VxWorks development license. The new port requires VxWorks 7, it is not possible to use earlier VxWorks versions with it. We are of course also very interested in hearing more about your Qt 5.5 for VxWorks needs, please contact our sales to discuss more and to receive an early access evaluation version of the new port.

If you are interested in learning more about Qt 5.5 for VxWorks 7, or wish to receive an early access release, please contact us.

For VxWorks 7, please visit VxWorks website or contact Wind River with any of your inquiries.

The post Wind River VxWorks RTOS support with Qt 5.5 appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1UtA21f