Can the volume rendering display colorfully? - xtk

In the xtk:lesson 11(http://lessons.goxtk.com/11/), after volume rendering displays none colors. Can I change some code to make it display colorfully after volume rendering?

Related

Is there any difference in quality between SDF and TTF fonts if the font is never zoomed / rotated?

I am trying to understand Signed Distance Field font rendering and from what I understand they are used to preserve quality when zooming, rotating rendered fonts. Is there any difference in the quality of a TTF font (rendered onto a texture) vs a font rendered via SDF if the font is never zoomed or rotated? For example, in a 2D game would there be any improvement in rendering via SDF vs a TTF font rendered onto a texture (other than reduced memory usage)?

How to set transparency of a .png image file in opengl ES?

I want to position an image(.png) in my window using OpenGL ES...I have done that but I want to set the transparency of that image.

How to use a complex OpenGL as background in QGraphicsScene?

I'm trying to create a display with a complex OpenGL image and some spinboxes on the image. Using http://doc.qt.digia.com/qq/qq26-openglcanvas.html I'm able to have a two layers object (inheriting from QGraphicsScene) with a simple OpenGL image as background and the controls on foreground.
So, now I'm trying to display my true OpenGL image as background. This image is created by:
A quad mapped on a structure,
Some small 2D objects represented by 2D textures with alpha channel and specific shaders, drawn on the quad (upper z value)
Some polylines.
With this image I have some strange behavior. The 2D textured objects are drawn with a white background. Some experiments seem to indicate that, in the drawing of this complex OpenGL image the alpha channel is disabled.
I tried different configurations for the QGLWidget used as viewport of the QGraphicsView but without result.
So I need help to be able to create this OpenGL image with the right transparency effects.

Video as voxels in OpenGL

Any good references on displaying sequence of images from a video as voxel data in OpenGL? I want to display all these images at once as a cuboid with 50% alpha and navigate using keyboard or mouse.
Check out this tutorial on setting up a 3D texture.
If you then render slices through the texture array with the appropriate UVW coordinates you will get what you are after.

How to scale a sprite image without losing color key information?

I'm currently developing a simple application that displays map and draws some markers on it. I'm developing for Windows Mobile, so I decided to use DirectDraw and Imaging interfaces to make the application fast and pretty. The map moves when user moves finger on the touchscreen, so the whole map moving/scrolling animation has to be fast, but it is not.
On every map update I have to draw portion of the map, control buttons, and markers - buttons and markers are preloaded on DirectDraw surface as a mipmap. So the only thing I do is BitBlit from the mipmap to a back buffer, and from the back buffer to a primary surface (I can't use page flipping due to the windowed mode of my application).
Previously I used premultiplied-alpha surface with 32 bit ARGB pixel format for images mipmap, everything was looking good, but drawing entire "scene" was horribly slow - i could forget about smooth map scrolling. Now I'm using mipmap with native (RGB565) pixel format and fuchsia (0xFF00FF) color key. Drawing is much better.
My mipmap surface is generated on program loading - images are loaded from files, scaled (with filtering) and drawn on mipmap. The problem is, that image scaling process blends pixel colors, and those pixels which are on the border of a sprite region are blended with surrounding fuchsia pixels resulting semi-fuchsia color that is not treated as color key. When I do blitting with color key option, sprites have small fuchsia-like borders, and it looks really bad.
How to solve this problem? I can use alpha blitting, but it is too slow - even in ARGB 1555 format.