parent
6dc392eedd
commit
4dea36775e
11 changed files with 55 additions and 35 deletions
After Width: | Height: | Size: 685 KiB |
After Width: | Height: | Size: 993 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
@ -0,0 +1,15 @@ |
||||
# Display an image using Viz2D {#viz2d_display_image} |
||||
|
||||
## Using the video pipeline |
||||
Actually there are two ways to display an image using Viz2D. The most convenient way is to use the video pipeline system to feed an image into Viz2D. That has the advantage that the image is automatically resized (keeping aspect ratio) to framebuffer size and color converted (The framebuffer is BGRA). |
||||
|
||||
@include samples/cpp/display_image.cpp |
||||
|
||||
 |
||||
|
||||
## Using direct framebuffer access |
||||
Instead of feeding to the video pipeline we can request the framebuffer in a ```fb``` context and copy the image to it. But first we must manually resize and color convert the image. |
||||
|
||||
@include samples/cpp/display_image_fb.cpp |
||||
|
||||
 |
@ -0,0 +1,15 @@ |
||||
# Render vector graphics using Viz2D {#viz2d_vector_graphics} |
||||
|
||||
## Vector graphics |
||||
Through the nvg context javascript-canvas-like rendering is possible. |
||||
|
||||
@include samples/cpp/vector_graphics.cpp |
||||
|
||||
 |
||||
|
||||
## Vector graphics and framebuffer manipulation |
||||
The framebuffer can be accessed directly to manipulate data created in other contexts. In this case vector graphics is rendered to the framebuffer through NanoVG and then blurred using an ```fb`` context. |
||||
|
||||
@include samples/cpp/vector_graphics_and_fb.cpp |
||||
|
||||
 |
@ -0,0 +1,9 @@ |
||||
# Render OpenGL using Viz2D {#viz2d_render_opengl} |
||||
|
||||
## Render a rotating tetrahedron |
||||
This example renders a rotating tetrahedron using legacy OpenGL for brevity. |
||||
|
||||
@include samples/cpp/render_opengl.cpp |
||||
|
||||
 |
||||
|
@ -0,0 +1,9 @@ |
||||
# Font rendering using Viz2D {#viz2d_font_rendering} |
||||
|
||||
## Render Hello World |
||||
Draws "Hello World" to the screen. |
||||
|
||||
@include samples/cpp/font_rendering.cpp |
||||
|
||||
 |
||||
|
Loading…
Reference in new issue