Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
RenderTarget.h
Go to the documentation of this file.
1/******************************************************************************
2 * This file is a part of Ultralight, an ultra-portable web-browser engine. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2023 Ultralight, Inc. *
7 *****************************************************************************/
8#pragma once
10#include <Ultralight/Bitmap.h>
11#include <Ultralight/Geometry.h>
12
13namespace ultralight {
14
15#pragma pack(push, 1)
16
17///
18/// @brief Rendering details for a View, to be used with your own GPUDriver
19///
20/// When using your own GPUDriver, each View is rendered to an offscreen texture that you can
21/// display on a 3D quad in your application. This struct provides all the details you need to
22/// display the corresponding texture in your application.
23///
25 ///
26 /// Whether this target is empty (null texture)
27 ///
29
30 ///
31 /// The viewport width (in device coordinates).
32 ///
33 uint32_t width;
34
35 ///
36 /// The viewport height (in device coordinates).
37 ///
38 uint32_t height;
39
40 ///
41 /// The GPUDriver-specific texture ID (you should bind the texture using your implementation of
42 /// GPUDriver::BindTexture before drawing a quad).
43 ///
44 uint32_t texture_id;
45
46 ///
47 /// The texture width (in pixels). This may be padded.
48 ///
49 uint32_t texture_width;
50
51 ///
52 /// The texture height (in pixels). This may be padded.
53 ///
55
56 ///
57 /// The pixel format of the texture.
58 ///
60
61 ///
62 /// UV coordinates of the texture (this is needed because the texture may be padded).
63 ///
65
66 ///
67 /// The GPUDriver-specific render buffer ID.
68 ///
70
72};
73
74#pragma pack(pop)
75
76} // namespace ultralight
#define UExport
Definition Defines.h:65
Definition App.h:14
BitmapFormat
The various Bitmap formats.
Definition Bitmap.h:18
Float Rectangle Helper.
Definition Geometry.h:419
Rendering details for a View, to be used with your own GPUDriver.
Definition RenderTarget.h:24
BitmapFormat texture_format
The pixel format of the texture.
Definition RenderTarget.h:59
Rect uv_coords
UV coordinates of the texture (this is needed because the texture may be padded).
Definition RenderTarget.h:64
uint32_t height
The viewport height (in device coordinates).
Definition RenderTarget.h:38
uint32_t texture_width
The texture width (in pixels).
Definition RenderTarget.h:49
bool is_empty
Whether this target is empty (null texture)
Definition RenderTarget.h:28
uint32_t texture_id
The GPUDriver-specific texture ID (you should bind the texture using your implementation of GPUDriver...
Definition RenderTarget.h:44
uint32_t render_buffer_id
The GPUDriver-specific render buffer ID.
Definition RenderTarget.h:69
uint32_t texture_height
The texture height (in pixels).
Definition RenderTarget.h:54
uint32_t width
The viewport width (in device coordinates).
Definition RenderTarget.h:33