opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
render_texture.h
Go to the documentation of this file.
1#pragma once
2
12
13#include <iosfwd>
14
15namespace osc
16{
17 // A texture that can receive the result of a render pass.
19 public:
22
23 // Returns the dimensions of the texture in physical pixels.
25
26 // Sets the dimensions of the texture in physical pixels.
28
29 // Returns the dimensions of the texture in device-independent pixels.
30 //
31 // The return value is equivalent to `texture.pixel_dimensions() / texture.device_pixel_ratio()`.
33
34 // Returns the ratio of the resolution of the texture in physical pixels
35 // to the resolution of it in device-independent pixels.
36 float device_pixel_ratio() const;
37
38 // Sets the device-to-pixel ratio for the texture, which has the effect
39 // of scaling the `device_independent_dimensions()` of the texture.
41
44
47
50
53
55
58
59 friend bool operator==(const RenderTexture&, const RenderTexture&) = default;
60
61 friend std::ostream& operator<<(std::ostream&, const RenderTexture&);
62
63 class Impl;
64 const Impl& impl() const { return *impl_; }
65 private:
66 friend class GraphicsBackend;
67
69 };
70
71 std::ostream& operator<<(std::ostream&, const RenderTexture&);
72}
Definition anti_aliasing_level.h:11
Definition copy_on_upd_shared_value.h:16
Definition render_texture.h:18
ColorRenderBufferFormat color_format() const
DepthStencilRenderBufferFormat depth_stencil_format() const
friend class GraphicsBackend
Definition render_texture.h:66
SharedColorRenderBuffer upd_color_buffer()
AntiAliasingLevel anti_aliasing_level() const
friend bool operator==(const RenderTexture &, const RenderTexture &)=default
void set_dimensionality(TextureDimensionality)
Vector2 dimensions() const
void reformat(const RenderTextureParams &)
void set_anti_aliasing_level(AntiAliasingLevel)
const Impl & impl() const
Definition render_texture.h:64
SharedDepthStencilRenderBuffer upd_depth_buffer()
void set_depth_stencil_format(DepthStencilRenderBufferFormat)
void set_color_format(ColorRenderBufferFormat)
float device_pixel_ratio() const
void set_device_pixel_ratio(float)
RenderTexture(const RenderTextureParams &)
void set_pixel_dimensions(Vector2i)
friend std::ostream & operator<<(std::ostream &, const RenderTexture &)
Vector2i pixel_dimensions() const
TextureDimensionality dimensionality() const
Definition shared_color_render_buffer.h:48
Definition shared_depth_stencil_render_buffer.h:49
Definition custom_decoration_generator.h:5
std::ostream & operator<<(std::ostream &, const Object &)
DepthStencilRenderBufferFormat
Definition depth_stencil_render_buffer_format.h:13
constexpr U to(T &&value)
Definition conversion.h:56
TextureDimensionality
Definition texture_dimensionality.h:5
ColorRenderBufferFormat
Definition color_render_buffer_format.h:13
Definition render_texture_params.h:13