IntroductionThis blog posting gives an introduction to the Qt Graphical Effects module which is available in Qt 5. As of Qt 5.1 the module offers 25 QML components which support effects in these categories: blend, color, gradient, distortion, drop shadow, blur, motion blur, glow and mask.List of EffectsHere is the list of effects provided as of Qt 5.1:EffectDescriptionBlendMerges two source items by using a blend mode.BrightnessContrastAdjusts brightness and contrast.ColorOverlayAlters the colors of the source item by applying an overlay color.ColorizeSets the color in the HSL color space.…
Welcome back! Last time we talked about texturing, lighting and geometry in regards to porting fixed function OpenGL to Modern OpenGL and while it covered the basic features in OpenGL programs, it left out a lot of advanced techniques that your fixed-function code may have used. In this article I’m going to talk about one of those advanced features, render-to-texture.
Render-to-Texture
Render to texture is used in a variety of graphical techniques including shadow mapping, multi-pass rendering and other advanced visual effects. It involves taking the results…
The code referenced in this blog is available here.
Texturing
Texture setup in modern OpenGL is nearly equivalent to what you are used to in the fixed-function API. You still have to enable your texture units, create and configure your texture objects (including mipmap chains), upload texture data to them, bind them to a texture target and configure texture coordinates on your vertices as attribute data. However, glTexEnv, glTexGen and the texture matrix stack have been removed.
glTexEnv must be replaced by code in the fragment shader. Recall that a fragment shader…
The code referenced in this blog is available here.
In our last blog, we re-implemented the famous OpenGL triangle in world space and compared and contrasted the fixed-function GLUT program with an equivalent Modern OpenGL program. We covered how to use Qt's math functions to replace the matrix mode that was removed from Fixed-Function OpenGL and replaced with code you write in your vertex shader. We talked about the Model, View, Projection idioms and how you can use uniforms to pass these variables (and others) to your shaders programs between draw…
The code referenced in this blog is available here.
This is the second of a four part blog series, in which we compare and contrast Fixed-Function OpenGL with Modern OpenGL and introduce you to the issues involved in porting your code to Modern OpenGL.
Last time we covered the necessary steps you need to create the famous OpenGL triangle with the modern API. We've introduced shaders and described their inputs and outputs along with various Qt convenience objects that make working with the new modern API easier. In Part 2, we move from clip-…
The code referenced in this blog is available here.
In this first of a four part blog series, we outline differences between Fixed-Function OpenGL with Modern OpenGL and show effective solutions for common issues encountered when porting your code to Modern OpenGL.
I was once faced with the task of “modernizing” a large fixed-function rendering engine. At the time, I was very well versed in the fixed-function programming model but only had vague knowledge of the “new” shader-based OpenGL. With the release of OpenGL 3.3, all of the fixed-function…