diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/adapter_8hpp_source.html b/adapter_8hpp_source.html new file mode 100644 index 0000000000..7a736004d6 --- /dev/null +++ b/adapter_8hpp_source.html @@ -0,0 +1,154 @@ + + +
+ + + + ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
#include <polymorphic_list.hpp>
+Public Member Functions | |
+ | PolymorphicList ()=default |
Create an empty list. | |
template<typename Derived , typename... Args> | |
Reference | emplace (Args &&... args) |
Add a new element to the back of the list. | |
+Iterator | begin () |
Retrieve the begin interator. | |
+Iterator | end () |
Retrieve the end interator. | |
+Iterator | begin () const |
Retrieve the begin interator. | |
+Iterator | end () const |
Retrieve the begin interator. | |
std::size_t | size () const |
Retrieve the number of elements. | |
+void | clear () |
Remove all elements from the list. | |
const T & | operator[] (std::size_t idx) const |
Retrieve a base-class reference to the element at the given index. | |
T & | operator[] (std::size_t idx) |
Retrieve a base-class reference to the element at the given index. | |
T | Common base type. List of elements, where all elements inherit from a common type but may be different types within themselves. |
PolymorphicList< T, Allocator >::Reference tz::PolymorphicList< T, Allocator >::emplace | +( | +Args &&... | +args | ) | ++ |
Add a new element to the back of the list.
+Derived | Type of the element to construct. It must be a subtype of T . |
Args | Types used to construct the new Derived element. |
args | Argument values for construction. |
T & tz::PolymorphicList< T, Allocator >::operator[] | +( | +std::size_t | +idx | ) | ++ |
Retrieve a base-class reference to the element at the given index.
+const T & tz::PolymorphicList< T, Allocator >::operator[] | +( | +std::size_t | +idx | ) | +const | +
Retrieve a base-class reference to the element at the given index.
+Read-only.
std::size_t tz::PolymorphicList< T, Allocator >::size | +( | +) | +const | +
Retrieve the number of elements.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
A meta-allocator which allows a tz allocator to be used as if it were a std::allocator
.
+ More...
#include <adapter.hpp>
A meta-allocator which allows a tz allocator to be used as if it were a std::allocator
.
This means it can be used for standard-library containers.
+For instance: std::vector<int, std::allocator<int>>
is functionally equivalent to std::vector<int, tz::allocator_adapter<int, tz::Mallocator>>
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Custom list, feature subset of std::vector
.
+ More...
#include <basic_list.hpp>
+Public Member Functions | |
+ | basic_list (std::initializer_list< T > elements) |
Construct a basic_list using existing elements via copy. | |
+ | basic_list ()=default |
Construct an empty basic_list. | |
operator std::span< const T > () const | |
Retrieve a span over the entire list. | |
T & | front () |
Retrieve the first elements of the list. | |
const T & | front () const |
Retrieve the first elements of the list. | |
T & | back () |
Retrieve the last element of the list. | |
const T & | back () const |
Retrieve the last element of the list. | |
+void | add (const T &element) |
Add a copy of the provided value to the back of the list. | |
+void | add (T &&element) |
Add the provided value to the back of the list. | |
template<typename... Args> | |
T & | emplace (Args &&... args) |
Create a new value in-place at the end of the list. | |
void | append (const basic_list< T > &other) |
Copy the elements of another list to the end of this list. | |
template<typename InputIt > | |
Iterator | append_range (InputIt first, InputIt last) |
Copy the range of elements to the end of this list. | |
bool | contains (T element) const |
Query as to whether the list contains a given element. | |
+Iterator | begin () |
Retrieve an iterator to the beginning of the list. | |
+Iterator | end () |
Retrieve an iterator to the end of the list. | |
+ConstIterator | begin () const |
Retrieve an iterator to the beginning of the list. | |
+ConstIterator | end () const |
Retrieve an iterator to the end of the list. | |
+auto | length () const |
Retrive the number of elements in the list. | |
bool | empty () const |
Query as to whether the list is empty or not. | |
const T * | data () const |
Retrieve a pointer to the first element of the list. | |
+T * | data () |
Retrieve a pointer to the first element of the list. | |
const T & | operator[] (std::size_t index) const |
Retrieve the element at a given index. | |
T & | operator[] (std::size_t index) |
Retrieve the element at a given index. | |
Iterator | erase (Iterator position) |
Erase the element at the given position. | |
Iterator | erase (Iterator first, Iterator last) |
Erase the range of elements bounded within the provided iterator range. | |
+void | clear () |
Erase the entire list, making it empty again and destroying everything inside. | |
+void | resize (std::size_t num_elements) |
Resize the list, matches the behaviour of std::vector<T>::erase(num_elements) . | |
Custom list, feature subset of std::vector
.
Should be used when a list of contiguous elements is required to be exposed via an API. We never want to expose standard library containers (aside from span).
T | Element type. |
Allocator | Allocator type. |
+
|
+ +inline | +
Copy the elements of another list to the end of this list.
+other | Second list whose elements should be appended to the end of this list. |
+
|
+ +inline | +
Copy the range of elements to the end of this list.
+
+
|
+ +inline | +
Retrieve the last element of the list.
+
+
|
+ +inline | +
Retrieve the last element of the list.
+Read-only.
+
|
+ +inline | +
Query as to whether the list contains a given element.
+
+
|
+ +inline | +
Retrieve a pointer to the first element of the list.
+Read-only.
+ +
+
|
+ +inline | +
Create a new value in-place at the end of the list.
+Args | Represents the types used to invoke the element class constructor. |
+
|
+ +inline | +
Query as to whether the list is empty or not.
+length() == 0
, otherwise false.
+
|
+ +inline | +
Erase the range of elements bounded within the provided iterator range.
+first | Iterator indicating the beginning of the range to delete. |
last | Iterator indicating the end of the range fo delete. |
+
|
+ +inline | +
Erase the element at the given position.
+position | Iterator locating the element which should be erased. Invalidates iterators and references. |
+
|
+ +inline | +
Retrieve the first elements of the list.
+
+
|
+ +inline | +
Retrieve the first elements of the list.
+Read-only.
+
|
+ +inline | +
Retrieve a span over the entire list.
+
+
|
+ +inline | +
Retrieve the element at a given index.
+index < this->length()
, otherwise the behaviour is undefined. index | Index whose element should be retrieved. Must be in-range (see preconditions). |
+
|
+ +inline | +
Retrieve the element at a given index.
+Read-only.
index < this->length()
, otherwise the behaviour is undefined. index | Index whose element should be retrieved. Must be in-range (see preconditions). |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a centralised storage/management of callback functions of a common signature void(Args...)
.
+ More...
#include <callback.hpp>
+Public Member Functions | |
+ | callback ()=default |
Create an empty callback object with no registered callables. | |
callback_handle | add_callback (tz::action< Args... > auto &&callback_function) |
Register a new callable with this callback object. | |
void | remove_callback (callback_handle handle) |
Deregister a callable that was registered by this callback object at some point in the past. | |
void | operator() (Args... args) const |
Invoke the callback object, calling all registered callbacks with the provided aerguments. | |
Represents a centralised storage/management of callback functions of a common signature void(Args...)
.
Callables matching the above signature can be registered by this object. When registered the caller is provided a reference handle. The token can be used to unregister the callback later.
+If a callback object is invoked with some arguments, each registered callable is also invoked with the same arguments. It is only recommended to use callbacks very sparingly – Most often usage of callbacks are wrong. The engine itself uses callbacks extremely rarely. If you would like a cross-module messaging system for example, do not use these callbacks; create your own functionality for this.
+
+
|
+ +inline | +
Register a new callable with this callback object.
+The callable is assumed to remain valid until either the destruction of this callback object, or until it is manually deregistered.
callback_function | Callable matching the given signature. |
+
|
+ +inline | +
Invoke the callback object, calling all registered callbacks with the provided aerguments.
+args | Argument values to pass to each registered callable. |
+
|
+ +inline | +
Deregister a callable that was registered by this callback object at some point in the past.
+The corresponding callable will no longer be invoked when the callback object is invoked.
+handle | callback_handle corresponding to the result of a previous add_callback invocation. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
An object which is falsy until a certain amount of time has passed since construction. + More...
+ +#include <time.hpp>
+Public Member Functions | |
delay (duration delay_length) | |
Create a new delay object. | |
+bool | done () const |
Query as to whether the delay length has passed since construction of the delay object. | |
duration | elapsed () const |
Retrieve how much time has passed since the delay began. | |
void | reset () |
Reset the delay object. | |
An object which is falsy until a certain amount of time has passed since construction.
+tz::delay::delay | +( | +duration | +delay_length | ) | ++ |
Create a new delay object.
+The current system time is used.
delay_length | duration of the delay which should pass after construction before becoming truthy. |
duration tz::delay::elapsed | +( | +) | +const | +
Retrieve how much time has passed since the delay began.
+If the elapsed time is longer than or equal to the delay length, the delay is done()
.
void tz::delay::reset | +( | +) | ++ |
Reset the delay object.
+The instant a delay object is reset, 0 seconds have elapsed since the "construction" of the object. You can use this to check for the same delay again in the future.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents some duration, expressable as a quantity of most time metrics. + More...
+ +#include <time.hpp>
+Public Member Functions | |
template<tz::number N> | |
constexpr N | nanos () const |
Express the duration as some number of nanoseconds. | |
template<tz::number N> | |
constexpr N | micros () const |
Express the duration as some number of microseconds. | |
template<tz::number N> | |
constexpr N | millis () const |
Express the duration as some number of milliseconds. | |
template<tz::number N> | |
constexpr N | seconds () const |
Express the duration as some number of seconds. | |
template<tz::number N> | |
constexpr N | minutes () const |
Express the duration as some number of minutes. | |
template<tz::number N> | |
constexpr N | hours () const |
Express the duration as some number of hours. | |
template<tz::number N> | |
constexpr N | days () const |
Express the duration as some number of days. | |
Represents some duration, expressable as a quantity of most time metrics.
+
+
|
+ +inlineconstexpr | +
Express the duration as some number of days.
+Please be aware of possible precision issues if you're using floating point types.
+
|
+ +inlineconstexpr | +
Express the duration as some number of hours.
+Please be aware of possible precision issues if you're using floating point types.
+
|
+ +inlineconstexpr | +
Express the duration as some number of microseconds.
+Please be aware of possible precision issues if you're using floating point types.
+
|
+ +inlineconstexpr | +
Express the duration as some number of milliseconds.
+Please be aware of possible precision issues if you're using floating point types.
+
|
+ +inlineconstexpr | +
Express the duration as some number of minutes.
+Please be aware of possible precision issues if you're using floating point types.
+
|
+ +inlineconstexpr | +
Express the duration as some number of nanoseconds.
+Please be aware of possible precision issues if you're using floating point types.
+
|
+ +inlineconstexpr | +
Express the duration as some number of seconds.
+Please be aware of possible precision issues if you're using floating point types.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Container for enum values, useful for vintage bitfield types. + More...
+ +#include <enum_field.hpp>
+Public Member Functions | |
+constexpr | enum_field ()=default |
Create an empty field. | |
+constexpr | enum_field (std::initializer_list< E > types) |
Create a field from the provided values. | |
+constexpr | enum_field (E type) |
Create a field from a single value. | |
bool | contains (E type) const |
Query as to whether the field contains the given value. | |
bool | contains (const enum_field< E > &field) const |
Query as to whether the field contains each element within another field. | |
std::size_t | count () const |
Retrieve the number of elements within the field. | |
bool | empty () const |
Query as to whether the field is empty or not. | |
enum_field< E > & | operator|= (E type) |
Add the element to the field. | |
enum_field< E > & | operator|= (const enum_field< E > &field) |
Add a field to another field. | |
enum_field< E > | operator| (E type) const |
Create a copy of this field, but with the parameter element added. | |
+void | remove (E type) |
Remove the enum value from the field, if it exists. | |
+auto | begin () const |
Retrieve an iterator to the beginning of the elements. | |
+auto | begin () |
Retrieve an iterator to the beginning of the elements. | |
+auto | end () const |
Retrieve an iterator to the end of the elements. | |
+auto | end () |
Retrieve an iterator to the end of the elements. | |
const E & | front () const |
Retrieve the first value within the field. | |
const E & | back () const |
Retrieve the last value within the field. | |
bool | operator== (const enum_field< E > &rhs) const =default |
Query as to whether the elements of the field exactly match that of another field. | |
+ | operator E () const |
Retrieve the cumulative value of the field. | |
Container for enum values, useful for vintage bitfield types.
+E | Enum class type. |
const E & tz::enum_field< E >::back | +( | +) | +const | +
Retrieve the last value within the field.
+bool tz::enum_field< E >::contains | +( | +const enum_field< E > & | +field | ) | +const | +
Query as to whether the field contains each element within another field.
+x
in the parameter field, this->contains(x)
, otherwise false. bool tz::enum_field< E >::contains | +( | +E | +type | ) | +const | +
Query as to whether the field contains the given value.
+Example: A = {0x01, 0x10}, B = {0x00, 0x11} A.contains(0x11) == false
, B.contains(0x11) == true
.
std::size_t tz::enum_field< E >::count | +( | +) | +const | +
Retrieve the number of elements within the field.
+bool tz::enum_field< E >::empty | +( | +) | +const | +
Query as to whether the field is empty or not.
+count() == 0
, otherwise false. const E & tz::enum_field< E >::front | +( | +) | +const | +
Retrieve the first value within the field.
+
+
|
+ +default | +
Query as to whether the elements of the field exactly match that of another field.
+This may return false even if the cumulative values are equivalent.
enum_field< E > tz::enum_field< E >::operator| | +( | +E | +type | ) | +const | +
Create a copy of this field, but with the parameter element added.
+The cumulative value C
of the field becomes C | E
.
type | Element to add to the new field. |
enum_field< E > & tz::enum_field< E >::operator|= | +( | +const enum_field< E > & | +field | ) | ++ |
Add a field to another field.
+If this field contains 'C' and other field is comprised of 'A | B', this field will become 'C | A | B'.
+ +enum_field< E > & tz::enum_field< E >::operator|= | +( | +E | +type | ) | ++ |
Add the element to the field.
+The cumulative value C
of the field becomes C | E
.
type | Element to add to the field. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Implements tz::allocator. + More...
+ +#include <fallback.hpp>
Implements tz::allocator.
+A meta-allocator which will use a primary allocator, but fall-back to a secondary allocator upon failure. fallback_allocators can be chained together.
+Often, tz::Mallocator and tz::Nullallocator are useful secondary allocators.
P | Primary allocator type. This will always be used first. |
S | Secondary allocator type. This will only be used if the primary allocator fails (such as returning a nullblk on allocate(...)) |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Stores information about the output target, and a framebuffer which either points to an offscreen image for render-to-texture (not yet implemented), or the main window framebuffer via ogl2::framebuffer::null(). + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
+ | OutputManager (const ioutput *output, tz::gl::renderer_options options) |
Create the output target based upon the renderer information. | |
+void | set_render_target () const |
Set this as the render target, causing subsequent draw calls to render into whatever the output is. | |
Stores information about the output target, and a framebuffer which either points to an offscreen image for render-to-texture (not yet implemented), or the main window framebuffer via ogl2::framebuffer::null().
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Helper class which can be used to generate a renderer_edit_request. + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
RendererEditBuilder & | compute (renderer_edit::compute_config req) |
Make amendments to the compute configuration of the renderer. | |
RendererEditBuilder & | render_state (renderer_edit::render_config req) |
Make amendments to the current render state. | |
RendererEditBuilder & | image_resize (renderer_edit::image_resize req) |
Make amendments to an existing image resource. | |
RendererEditBuilder & | buffer_resize (renderer_edit::buffer_resize req) |
Make amendments to an existing buffer resource. | |
+renderer_edit_request | build () const |
Retrieve a renderer_edit_request corresponding to all edits specified within the builder so far. | |
Helper class which can be used to generate a renderer_edit_request.
+RendererEditBuilder & tz::gl::RendererEditBuilder::buffer_resize | +( | +renderer_edit::buffer_resize | +req | ) | ++ |
Make amendments to an existing buffer resource.
+See RendererBufferComponentResizeRequest for details.
+ +RendererEditBuilder & tz::gl::RendererEditBuilder::compute | +( | +renderer_edit::compute_config | +req | ) | ++ |
Make amendments to the compute configuration of the renderer.
+See RendererComputeEditRequest for details.
+ +RendererEditBuilder & tz::gl::RendererEditBuilder::image_resize | +( | +renderer_edit::image_resize | +req | ) | ++ |
Make amendments to an existing image resource.
+See RendererImageComponentResizeRequest for details.
+ +RendererEditBuilder & tz::gl::RendererEditBuilder::render_state | +( | +renderer_edit::render_config | +req | ) | ++ |
Make amendments to the current render state.
+See RenderStateEditRequest for details.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Copies all resource data from upon creation and handles resource and component lifetimes. + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
ResourceStorage (std::span< const iresource *const > resources, std::span< const icomponent *const > components) | |
Create storage for a set of existing resources. | |
const icomponent * | get_component (resource_handle handle) const |
Retrieve the component (read-only) which stores the corresponding opengl backend objects for the resource corresponding to the handle. | |
icomponent * | get_component (resource_handle handle) |
Retrieve the component which stores the corresponding opengl backend objects for the resource corresponding to the handle. | |
unsigned int | resource_count_of (resource_type type) const |
Retrieve the number of resources stored of the given type. | |
+void | bind_buffers (const render_state &state) |
Bind all buffer resources to their expected resource ids. | |
void | bind_image_buffer (bool has_index_buffer, bool has_draw_buffer) |
images are converted into bindless texture handles which are then all stored within a secret bespoke SSBO (this does not count as a buffer resource however). | |
Copies all resource data from upon creation and handles resource and component lifetimes.
+Also exposes said copied resources and components to the renderer.
+tz::gl::ResourceStorage::ResourceStorage | +( | +std::span< const iresource *const > | +resources, | +
+ | + | std::span< const icomponent *const > | +components | +
+ | ) | ++ |
Create storage for a set of existing resources.
+All existing ResourceHandles referencing any of the provided resources will continue to be valid when passed to the renderer_ogl. However, it will reference the copy of said resource which is created during construction of this object. This means users are able to and encouraged to cache their ResourceHandles when populating renderer_info.
+resources | A view into an array of existing resources. All of these will be copies into a separate storage, meaning the elements of the span are allowed to reach the end of their lifetime after the storage has been constructed, because they will have been cloned. |
void tz::gl::ResourceStorage::bind_image_buffer | +( | +bool | +has_index_buffer, | +
+ | + | bool | +has_draw_buffer | +
+ | ) | ++ |
images are converted into bindless texture handles which are then all stored within a secret bespoke SSBO (this does not count as a buffer resource however).
+This binds that SSBO to the resource id equal to the list of images (this will be equal to the total number of buffer resources).
+ +icomponent * tz::gl::ResourceStorage::get_component | +( | +resource_handle | +handle | ) | ++ |
Retrieve the component which stores the corresponding opengl backend objects for the resource corresponding to the handle.
+handle | Handle whose resource's component needs to be retrieved. The handle must have referred to one of the initial resources passed to the constructor, otherwise the behaviour is undefined. |
const icomponent * tz::gl::ResourceStorage::get_component | +( | +resource_handle | +handle | ) | +const | +
Retrieve the component (read-only) which stores the corresponding opengl backend objects for the resource corresponding to the handle.
+handle | Handle whose resource's component needs to be retrieved. The handle must have referred to one of the initial resources passed to the constructor, otherwise the behaviour is undefined. |
unsigned int tz::gl::ResourceStorage::resource_count_of | +( | +resource_type | +type | ) | +const | +
Retrieve the number of resources stored of the given type.
+type | Type whose quantity should be retrieved. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Stores the shader program and allows the renderer to use it before emitting a draw call. + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
+ | ShaderManager (const shader_info &sinfo) |
Construct the shader program from the information provided. | |
ShaderManager () | |
Construct a null shader manager. | |
+void | use () |
Use the shader program, meaning it will be used in the next draw call. | |
Stores the shader program and allows the renderer to use it before emitting a draw call.
+tz::gl::ShaderManager::ShaderManager | +( | +) | ++ |
Construct a null shader manager.
+It is an error to do any render/compute work with a null shader manager.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a fixed-size, static Buffer to be used by a renderer or Processor. + More...
+ +#include <resource.hpp>
+Public Member Functions | |
+virtual void | dbgui () final |
Display debug information about the resource. | |
Public Member Functions inherited from tz::gl::resource | |
+virtual resource_type | get_type () const final |
Retrieve the type of the resource. | |
virtual resource_access | get_access () const final |
Retrieve access information about this resource when used in a renderer or Processor. | |
virtual const resource_flags & | get_flags () const final |
Retrieve a field containing all flags applied to this resource. | |
+virtual std::span< const std::byte > | data () const final |
Retrieve a read-only view into the resource data. | |
virtual std::span< std::byte > | data () final |
Retrieve a read+write view into the resource data. | |
Public Member Functions inherited from tz::gl::iresource | |
template<typename T > | |
std::span< const T > | data_as () const |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
template<typename T > | |
std::span< T > | data_as () |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
+Static Public Member Functions | |
template<tz::trivially_copyable T> | |
static buffer_resource | from_one (const T &data, buffer_info info={}) |
Create a buffer_resource where the underlying data is a single object. | |
template<std::ranges::contiguous_range R> | |
static buffer_resource | from_many (R &&data, buffer_info info={}) |
Create a buffer_resource where the underlying data is an array of objects. | |
static buffer_resource | null () |
Create a null buffer_resource. | |
Represents a fixed-size, static Buffer to be used by a renderer or Processor.
+
+
|
+ +static | +
Create a buffer_resource where the underlying data is an array of objects.
+R | Type satisfying std::contiguous_range. |
data | A range of elements of some type. |
info | Buffer info. See buffer_info for details. |
+
|
+ +static | +
Create a buffer_resource where the underlying data is a single object.
+T | Object type. It must be trivially_copyable. |
data | Object value to store within the underlying data. |
info | Buffer info, see buffer_info for details. |
+
|
+ +inlinestatic | +
Create a null buffer_resource.
+It is not practically useful, aside from as a placeholder.
+Null BufferResources are guaranteed to have size() == 1, not zero, but its contents and size are implementation-defined. It is also guaranteed to be static_fixed and have no flags.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Implements tz::gl::device_type. + More...
+ +#include <device.hpp>
+Public Member Functions | |
tz::gl::renderer_handle | create_renderer (tz::gl::renderer_info &rinfo) |
Create a new tz::gl::renderer. | |
void | destroy_renderer (tz::gl::renderer_handle rh) |
Destroy an existing renderer. | |
std::size_t | renderer_count () |
Retrieve the number of existing renderers. | |
const tz::gl::renderer & | get_renderer (tz::gl::renderer_handle rh) const |
Retrieve a reference to the renderer associated with the given handle. | |
tz::gl::renderer & | get_renderer (tz::gl::renderer_handle rh) |
Retrieve a reference to the renderer associated with the given handle. | |
tz::gl::image_format | get_window_format () const |
Retrieve the image format that is being used by the window surface. | |
Implements tz::gl::device_type.
+tz::gl::renderer_handle tz::gl::device::create_renderer | +( | +tz::gl::renderer_info & | +rinfo | ) | ++ |
Create a new tz::gl::renderer.
+rinfo | Describes the intended behaviour of the renderer. |
void tz::gl::device::destroy_renderer | +( | +tz::gl::renderer_handle | +rh | ) | ++ |
Destroy an existing renderer.
+The renderer will no longer exist.
rh
must have been the return value of a prior invocation of create_renderer(). rh
must no longer be accessed. Any existing references to that renderer are invalidated, and the behaviour is undefined if it is attempted to be used. rh | Opaque handle associated with an existing renderer. |
tz::gl::renderer & tz::gl::device::get_renderer | +( | +tz::gl::renderer_handle | +rh | ) | ++ |
Retrieve a reference to the renderer associated with the given handle.
+rh
must still be existing. This means that it has been created by create_renderer() but has not yet been destroyed via destroy_renderer(). rh | Opaque handle associated with an existing renderer. |
const tz::gl::renderer & tz::gl::device::get_renderer | +( | +tz::gl::renderer_handle | +rh | ) | +const | +
Retrieve a reference to the renderer associated with the given handle.
+rh
must still be existing. This means that it has been created by create_renderer() but has not yet been destroyed via destroy_renderer(). rh | Opaque handle associated with an existing renderer. |
tz::gl::image_format tz::gl::device::get_window_format | +( | +) | +const | +
Retrieve the image format that is being used by the window surface.
+std::size_t tz::gl::device::renderer_count | +( | +) | ++ |
Retrieve the number of existing renderers.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Data Structures | |
struct | fingerprint_info_t |
+Public Member Functions | |
vk2::hardware::Queue::PresentResult | present_image (unsigned int fingerprint, const tz::basic_list< const vk2::BinarySemaphore * > &wait_semaphores) |
present the acquired image. | |
Public Member Functions inherited from tz::gl::device_window | |
const vk2::BinarySemaphore & | acquire_image (const vk2::Fence *signal_fence) |
acquire an image from the underlying presentation engine. | |
vk2::hardware::Queue::PresentResult tz::gl::device_command_pool::present_image | +( | +unsigned int | +fingerprint, | +
+ | + | const tz::basic_list< const vk2::BinarySemaphore * > & | +wait_semaphores | +
+ | ) | ++ |
present the acquired image.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Additional Inherited Members | |
Public Member Functions inherited from tz::gl::device_window | |
const vk2::BinarySemaphore & | acquire_image (const vk2::Fence *signal_fence) |
acquire an image from the underlying presentation engine. | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Additional Inherited Members | |
Public Member Functions inherited from tz::gl::device_window | |
const vk2::BinarySemaphore & | acquire_image (const vk2::Fence *signal_fence) |
acquire an image from the underlying presentation engine. | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Additional Inherited Members | |
Public Member Functions inherited from tz::gl::device_command_pool | |
vk2::hardware::Queue::PresentResult | present_image (unsigned int fingerprint, const tz::basic_list< const vk2::BinarySemaphore * > &wait_semaphores) |
present the acquired image. | |
Public Member Functions inherited from tz::gl::device_window | |
const vk2::BinarySemaphore & | acquire_image (const vk2::Fence *signal_fence) |
acquire an image from the underlying presentation engine. | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Public Member Functions | |
const vk2::BinarySemaphore & | acquire_image (const vk2::Fence *signal_fence) |
acquire an image from the underlying presentation engine. | |
const vk2::BinarySemaphore & tz::gl::device_window::acquire_image | +( | +const vk2::Fence * | +signal_fence | ) | ++ |
acquire an image from the underlying presentation engine.
+if you want to render something to the window, you will need to acquire an image here and render into it. if you acquired an image earlier but didn't present to it, this will give you the same image.
+this method returns instantly. to schedule work to occur after the acquisition completes, fill in the acquire
parameter which has a fence and/or semaphore you can wait on after.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a fixed-size, static Image to be used by a renderer or Processor. + More...
+ +#include <resource.hpp>
+Public Member Functions | |
+virtual void | dbgui () final |
Display debug information about the resource. | |
Public Member Functions inherited from tz::gl::resource | |
+virtual resource_type | get_type () const final |
Retrieve the type of the resource. | |
virtual resource_access | get_access () const final |
Retrieve access information about this resource when used in a renderer or Processor. | |
virtual const resource_flags & | get_flags () const final |
Retrieve a field containing all flags applied to this resource. | |
+virtual std::span< const std::byte > | data () const final |
Retrieve a read-only view into the resource data. | |
virtual std::span< std::byte > | data () final |
Retrieve a read+write view into the resource data. | |
Public Member Functions inherited from tz::gl::iresource | |
template<typename T > | |
std::span< const T > | data_as () const |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
template<typename T > | |
std::span< T > | data_as () |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
+Static Public Member Functions | |
static image_resource | from_uninitialised (image_info info={}) |
Create an image_resource where the image-data is uninitialised. | |
static image_resource | from_memory (std::ranges::contiguous_range auto data, image_info info={}) |
Create an image_resource using values existing in memory. | |
static image_resource | null () |
Create a null image_resource. | |
Represents a fixed-size, static Image to be used by a renderer or Processor.
+
+
|
+ +static | +
Create an image_resource using values existing in memory.
+data | Range containing a block of memory representing the image data. The length of the block should exactly match that of the image's size in bytes, or the behaviour is undefined. |
+
|
+ +static | +
Create an image_resource where the image-data is uninitialised.
+See image_info for details.
+
|
+ +inlinestatic | +
Create a null image_resource.
+The format, dimensions and image values are all implementation-defined, but the access is guaranteed to be static_fixed.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Interface for a renderer or Processor resource. + More...
+ +#include <resource.hpp>
+Public Member Functions | |
+virtual resource_type | get_type () const =0 |
Retrieve the type of the resource. | |
virtual resource_access | get_access () const =0 |
Retrieve access information about this resource when used in a renderer or Processor. | |
+virtual std::span< const std::byte > | data () const =0 |
Retrieve a read-only view into the resource data. | |
virtual std::span< std::byte > | data ()=0 |
Retrieve a read+write view into the resource data. | |
template<typename T > | |
std::span< const T > | data_as () const |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
template<typename T > | |
std::span< T > | data_as () |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
virtual const resource_flags & | get_flags () const =0 |
Retrieve a field containing all flags applied to this resource. | |
+virtual void | dbgui ()=0 |
Display debug information about the resource. | |
Interface for a renderer or Processor resource.
+Resources are subsidiary blocks of either buffer or image data which are used as assets within a shader. Shaders are used by either Renderers or Preprocessors.
+Two concrete implementations of resources exist at present by default. These are:
+
+
|
+ +pure virtual | +
Retrieve a read+write view into the resource data.
+get_access()
must return any of the dynamic values. Otherwise, the behaviour of a write is undefined. Implemented in tz::gl::resource.
+ +
+
|
+ +inline | +
Retrieve a read+write view into the resource data, interpreted as an array of some type.
+T | Type to interpret. The resource data is expressed as an array of this type. |
+
|
+ +inline | +
Retrieve a read+write view into the resource data, interpreted as an array of some type.
+T | Type to interpret. The resource data is expressed as an array of this type. |
+
|
+ +pure virtual | +
Retrieve access information about this resource when used in a renderer or Processor.
+Implemented in tz::gl::resource.
+ +
+
|
+ +pure virtual | +
Retrieve a field containing all flags applied to this resource.
+If you didn't specify any flags for this resource, it will be empty.
+ +Implemented in tz::gl::resource.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for OpenGL buffers. + More...
+ +#include <buffer.hpp>
+Public Member Functions | |
buffer (buffer_info info) | |
Create a new buffer. | |
buffer_target | get_target () const |
Retrieves the target to which the buffer is bound. | |
buffer_residency | get_residency () const |
Retrieves the residency of the buffer. | |
+std::size_t | size () const |
Retrieve the size of the buffer's data-store, in bytes. | |
void * | map () |
Map the buffer, receiving a CPU-visible pointer. | |
const void * | map () const |
Map the buffer, receiving a CPU-visible pointer. | |
void | unmap () |
Unmap the buffer. | |
template<typename T > | |
std::span< T > | map_as () |
Map the buffer as an array of some type. | |
template<tz::const_type T> | |
std::span< T > | map_as () const |
Map the buffer as an array of some type. | |
+void | basic_bind () const |
Bind without a resource id (i.e you are an Index buffer). | |
+void | bind_to_resource_id (unsigned int shader_resource_id) const |
Bind the buffer to a shader resource id. | |
bool | is_null () const |
Query as to whether the buffer is a null buffer. | |
+Static Public Member Functions | |
static buffer | null () |
Create a buffer which acts as a null buffer, that is, no operations are valid on it. | |
Documentation for OpenGL buffers.
+tz::gl::ogl2::buffer::buffer | +( | +buffer_info | +info | ) | ++ |
Create a new buffer.
+info | Specifies creation flags for the buffer. |
buffer_residency tz::gl::ogl2::buffer::get_residency | +( | +) | +const | +
Retrieves the residency of the buffer.
+buffer_target tz::gl::ogl2::buffer::get_target | +( | +) | +const | +
Retrieves the target to which the buffer is bound.
+bool tz::gl::ogl2::buffer::is_null | +( | +) | +const | +
Query as to whether the buffer is a null buffer.
+A null buffer is equivalent to buffer::null().
+ +void * tz::gl::ogl2::buffer::map | +( | +) | ++ |
Map the buffer, receiving a CPU-visible pointer.
+this->size()
bytes. const void * tz::gl::ogl2::buffer::map | +( | +) | +const | +
Map the buffer, receiving a CPU-visible pointer.
+Read-only.
this->size()
bytes.
+
|
+ +inline | +
Map the buffer as an array of some type.
+T | Type of which to retrieve an array of. |
+
|
+ +inline | +
Map the buffer as an array of some type.
+Read-only.
T | Type of which to retrieve an array of. |
+
|
+ +static | +
Create a buffer which acts as a null buffer, that is, no operations are valid on it.
+void tz::gl::ogl2::buffer::unmap | +( | +) | ++ |
Unmap the buffer.
+map()
or equivalent. Otherwise, the behaviour is undefined. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents an OpenGL framebuffer object. + More...
+ +#include <framebuffer.hpp>
+Public Member Functions | |
framebuffer (framebuffer_info info) | |
Create a new framebuffer. | |
bool | has_depth_attachment () const |
Query as to whether the framebuffer has a depth attachment. | |
unsigned int | colour_attachment_count () const |
Retrieve the number of colour attachments associated with the framebuffer. | |
tz::vec2ui | get_dimensions () const |
Retrieve the dimensions {width, height}, in pixels, of every framebuffer attachment. | |
+void | bind () const |
Bind the framebuffer, causing subsequent draw calls to render into the framebuffer instead of its previous target. | |
+void | clear () const |
Clear the framebuffer attachments, setting them to known values. | |
bool | is_null () const |
Query as to whether this is the null framebuffer. | |
+Static Public Member Functions | |
static framebuffer | null () |
Retrieve the null framebuffer. | |
Represents an OpenGL framebuffer object.
+tz::gl::ogl2::framebuffer::framebuffer | +( | +framebuffer_info | +info | ) | ++ |
Create a new framebuffer.
+info | Creation flags for the framebuffer. |
unsigned int tz::gl::ogl2::framebuffer::colour_attachment_count | +( | +) | +const | +
Retrieve the number of colour attachments associated with the framebuffer.
+tz::vec2ui tz::gl::ogl2::framebuffer::get_dimensions | +( | +) | +const | +
Retrieve the dimensions {width, height}, in pixels, of every framebuffer attachment.
+bool tz::gl::ogl2::framebuffer::has_depth_attachment | +( | +) | +const | +
Query as to whether the framebuffer has a depth attachment.
+If the framebuffer is a null framebuffer, then this will return whether we have enabled depth testing or not.
bool tz::gl::ogl2::framebuffer::is_null | +( | +) | +const | +
Query as to whether this is the null framebuffer.
+
+
|
+ +static | +
Retrieve the null framebuffer.
+The null framebuffer represents the window (note that Topaz applications can only have a single window).
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for OpenGL images. + More...
+ +#include <image.hpp>
+Public Types | |
+using | bindless_handle = GLuint64 |
Opaque handle for a bindless texture. | |
+Public Member Functions | |
image (image_info info) | |
Create a new image. | |
image_format | get_format () const |
tz::vec2ui | get_dimensions () const |
+const sampler & | get_sampler () const |
Retrieves the state specifying how the image is sampled in a shader. | |
void | set_data (std::span< const std::byte > texture_data) |
Set the image data. | |
void | make_bindless () |
Make the image bindless, allowing for an alternate way to reference the image as a shader resource, via a bindless handle. | |
bool | is_bindless () const |
Query as to whether this image is bindless. | |
bindless_handle | get_bindless_handle () const |
Retrieves the bindless texture handle for this bindless image. | |
bool | is_null () const |
Query as to whether the image is a null image. | |
+Static Public Member Functions | |
static image | null () |
Create an image which acts as a null image, that is, no operations are valid on it. | |
Documentation for OpenGL images.
+tz::gl::ogl2::image::image | +( | +image_info | +info | ) | ++ |
Create a new image.
+info | Specifies creation flags for the image. |
image::bindless_handle tz::gl::ogl2::image::get_bindless_handle | +( | +) | +const | +
Retrieves the bindless texture handle for this bindless image.
+tz::vec2ui tz::gl::ogl2::image::get_dimensions | +( | +) | +const | +
image_format tz::gl::ogl2::image::get_format | +( | +) | +const | +
bool tz::gl::ogl2::image::is_bindless | +( | +) | +const | +
Query as to whether this image is bindless.
+bool tz::gl::ogl2::image::is_null | +( | +) | +const | +
Query as to whether the image is a null image.
+A null image is equivalent to image::null().
+ +void tz::gl::ogl2::image::make_bindless | +( | +) | ++ |
Make the image bindless, allowing for an alternate way to reference the image as a shader resource, via a bindless handle.
+See image::get_bindless_handle() for usage. Once the image is made bindless, the action cannot be undone.
+
|
+ +static | +
Create an image which acts as a null image, that is, no operations are valid on it.
+void tz::gl::ogl2::image::set_data | +( | +std::span< const std::byte > | +texture_data | ) | ++ |
Set the image data.
+texture_data | View into bytes representing the data. Should match the format and dimensions of this texture, as an array of rows of pixel data. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents an OpenGL shader program. + More...
+ +#include <shader.hpp>
+Data Structures | |
struct | link_result |
State of a shader module compilation attempt. More... | |
+Public Member Functions | |
shader (shader_info info) | |
Create a new shader program. | |
link_result | link () |
Attempt to link and validate the shader program. | |
+void | use () const |
Set the program as in-use, causing subsequent gl commands to use it as the shader program. | |
bool | is_null () const |
Query as to whether this is a null shader. | |
+Static Public Member Functions | |
static shader | null () |
Create the null shader. | |
Represents an OpenGL shader program.
+tz::gl::ogl2::shader::shader | +( | +shader_info | +info | ) | ++ |
Create a new shader program.
+info | Information about modules contained within the shader program. |
bool tz::gl::ogl2::shader::is_null | +( | +) | +const | +
Query as to whether this is a null shader.
+See Shader::null().
+ +shader::link_result tz::gl::ogl2::shader::link | +( | +) | ++ |
Attempt to link and validate the shader program.
+This could fail.
+
|
+ +static | +
Create the null shader.
+Operations are invalid on the null shader.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents an OpenGL shader. + More...
+ +#include <shader.hpp>
+Data Structures | |
struct | compile_result |
State of a shader module compilation attempt. More... | |
+Public Member Functions | |
shader_module (shader_module_info info) | |
Create a new shader module. | |
compile_result | compile () |
Attempt to compile the shader source. | |
Represents an OpenGL shader.
+tz::gl::ogl2::shader_module::shader_module | +( | +shader_module_info | +info | ) | ++ |
Create a new shader module.
+You should not need to invoke this directly - The shader program is responsible for constructing all of its modules.
+ +shader_module::compile_result tz::gl::ogl2::shader_module::compile | +( | +) | ++ |
Attempt to compile the shader source.
+This could fail.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Wrapper for an OpenGL VAO. + More...
+ +#include <vertex_array.hpp>
+Public Member Functions | |
+ | vertex_array () |
Create a new VAO. | |
+void | bind () |
Bind the VAO, causing subsequent GL commands using VAO state to use this. | |
void | draw (unsigned int triangle_count, bool tessellation=false) |
Emit a single draw call, drawing a set number of triangles. | |
void | draw_indexed (unsigned int triangle_count, const buffer &index_buffer, bool tessellation=false) |
Emit a single draw call, drawing a set number of triangles, assuming an index buffer has already been bound. | |
+bool | is_null () const |
Query as to whether this is a null vertex array, which is equivalent to vertex_array::null(). | |
+Static Public Member Functions | |
static vertex_array | null () |
Retrieve the Null vertex_array. | |
Wrapper for an OpenGL VAO.
+void tz::gl::ogl2::vertex_array::draw | +( | +unsigned int | +triangle_count, | +
+ | + | bool | +tessellation = false |
+
+ | ) | ++ |
Emit a single draw call, drawing a set number of triangles.
+Remember that vertex attributes are not supported in this backend, so you will source input data from either hard-coded shader values or from UBO/SSBO shader resources.
triangle_count | number of triangles to draw. |
void tz::gl::ogl2::vertex_array::draw_indexed | +( | +unsigned int | +triangle_count, | +
+ | + | const buffer & | +index_buffer, | +
+ | + | bool | +tessellation = false |
+
+ | ) | ++ |
Emit a single draw call, drawing a set number of triangles, assuming an index buffer has already been bound.
+Remember that vertex attributes are not supported in this backend, so you will source input data from either hard-coded shader values or from UBO/SSBO shader resources.
triangle_count | number of triangles to draw. |
+
|
+ +static | +
Retrieve the Null vertex_array.
+Binding the null vertex array is equivalent to unbinding a vertex array. It is invalid to attempt to perform draws or computes using the null vertex array.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Implements tz::gl::renderer_type. + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
+unsigned int | resource_count () const |
Retrieves the number of resources used by the renderer. | |
const iresource * | get_resource (tz::gl::resource_handle rh) const |
Retrieves a pointer to the resource via its associated handle. | |
iresource * | get_resource (tz::gl::resource_handle rh) |
Retrieves a pointer to the resource via its associated handle. | |
const ioutput * | get_output () const |
Retrieve the output that this renderer draws to. | |
ioutput * | get_output () |
Retrieve the output that this renderer draws to. | |
tz::gl::renderer_options | get_options () const |
Retrieve the set of enabled tz::gl::renderer_option flags used by this renderer. | |
const tz::gl::render_state & | get_state () const |
Retrieve the current render state. | |
void | render () |
Submit the renderer's work to the GPU. | |
void | render (std::size_t tri_count) |
Submit the renderer's work to the GPU. | |
Implements tz::gl::renderer_type.
+tz::gl::renderer_options tz::gl::renderer::get_options | +( | +) | +const | +
Retrieve the set of enabled tz::gl::renderer_option flags used by this renderer.
+ioutput * tz::gl::renderer::get_output | +( | +) | ++ |
Retrieve the output that this renderer draws to.
+nullptr
if there is no output (Meaning the renderer draws directly to the window). const ioutput * tz::gl::renderer::get_output | +( | +) | +const | +
Retrieve the output that this renderer draws to.
+nullptr
if there is no output (Meaning the renderer draws directly to the window). iresource * tz::gl::renderer::get_resource | +( | +tz::gl::resource_handle | +rh | ) | ++ |
Retrieves a pointer to the resource via its associated handle.
+rh
must have been retrieved from a prior call to tz::gl::renderer_info::add_resource() or tz::gl::renderer_info::ref_resource(), where the tz::gl::renderer_info was later used by tz::gl::device::create_renderer() to create the current renderer object. Otherwise, the behaviour is undefined. rh | Handle corresponding to the resource. |
const iresource * tz::gl::renderer::get_resource | +( | +tz::gl::resource_handle | +rh | ) | +const | +
Retrieves a pointer to the resource via its associated handle.
+rh
must have been retrieved from a prior call to tz::gl::renderer_info::add_resource() or tz::gl::renderer_info::ref_resource(), where the tz::gl::renderer_info was later used by tz::gl::device::create_renderer() to create the current renderer object. Otherwise, the behaviour is undefined. rh | Handle corresponding to the resource. |
const tz::gl::render_state & tz::gl::renderer::get_state | +( | +) | +const | +
Retrieve the current render state.
+void tz::gl::renderer::render | +( | +) | ++ |
Submit the renderer's work to the GPU.
+This function returns instantly.
If this is a graphics renderer, the number of triangles submitted in the draw call will be equal to the most recently provided triangle count in a previous invocation to tz::gl::renderer::render(std::size_t). If this method was never invoked on this renderer object, a triangle count of 0
will be used.
void tz::gl::renderer::render | +( | +std::size_t | +tri_count | ) | ++ |
Submit the renderer's work to the GPU.
+This function returns instantly.
tri_count | The number of triangles that will be drawn by the renderer. |
tri_count
refers instead to the number of indices that will be drawn by the renderer.tri_count
is ignored.tri_count
is ignored. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Helper struct which the user can use to specify which inputs, resources they want and where they want a renderer to render to. + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
+unsigned int | resource_count () const |
Retrieve the number of resources. | |
const iresource * | get_resource (resource_handle handle) |
Retrieve the resource corresponding to the given handle. | |
std::vector< const iresource * > | get_resources () const |
Retrieve a span containing all of the specified resources. | |
resource_handle | add_resource (const iresource &resource) |
Add a new resource, which will be used by a renderer which is created from this helper struct. | |
resource_handle | ref_resource (icomponent *component) |
Deprecated. | |
resource_handle | ref_resource (renderer_handle ren, resource_handle res) |
Adds a resource to this renderer which already exists and is owned by another renderer. | |
void | set_output (const ioutput &output) |
Renderers always render into something. | |
const ioutput * | get_output () const |
Retrieve the current render output (read-only). | |
+const renderer_options & | get_options () const |
Retrieve the currently specified options which will be used by the renderer. | |
+void | set_options (renderer_options options) |
Set the currently specified options which will be used by the renderer. | |
void | add_dependency (renderer_handle dependency) |
Set the pending renderer to be dependent on the specified renderer. | |
+render_state & | state () |
Read/write information about the state of the renderer when it is created. | |
+const render_state & | state () const |
Read-only information about the state of the renderer when it is created. | |
+shader_info & | shader () |
Read/write information about the shader that will be built for the renderer. | |
+const shader_info & | shader () const |
Read-only information about the shader that will be built for the renderer. | |
void | debug_name (std::string debug_name) |
Set the debug name of the spawned renderer. | |
+std::string | debug_get_name () const |
Retrieve the debug name which will be used for the spawned renderer. | |
Helper struct which the user can use to specify which inputs, resources they want and where they want a renderer to render to.
+This is likely going to be refactored at some point because it doesn't do any Vulkan-specific magic.
+void tz::gl::renderer_info::add_dependency | +( | +renderer_handle | +dependency | ) | ++ |
Set the pending renderer to be dependent on the specified renderer.
+This means that when render() is invoked, the GPU will wait on completion of render-work of the specified renderer before the render work of this renderer begins. This also means that the specified renderer must run each time this is ran, ahead-of-time.
+ +resource_handle tz::gl::renderer_info::add_resource | +( | +const iresource & | +resource | ) | ++ |
Add a new resource, which will be used by a renderer which is created from this helper struct.
+resource | resource which will be owned by a renderer. |
void tz::gl::renderer_info::debug_name | +( | +std::string | +debug_name | ) | ++ |
Set the debug name of the spawned renderer.
+By default, the debug name is a compact description of the renderer.
const ioutput * tz::gl::renderer_info::get_output | +( | +) | +const | +
Retrieve the current render output (read-only).
+This may return nullptr, meaning that the main window will be rendered into.
+ +const iresource * tz::gl::renderer_info::get_resource | +( | +resource_handle | +handle | ) | ++ |
Retrieve the resource corresponding to the given handle.
+Handle | handle returned from a previous call to add_resource . If this handle came from a different renderer_info, the behaviour is undefined. |
std::vector< const iresource * > tz::gl::renderer_info::get_resources | +( | +) | +const | +
Retrieve a span containing all of the specified resources.
+Size of the span is guaranteed to be equal to resource_count()
+ +resource_handle tz::gl::renderer_info::ref_resource | +( | +icomponent * | +component | ) | ++ |
Deprecated.
+See ref_resource(renderer_handle, resource_handle)
+ +resource_handle tz::gl::renderer_info::ref_resource | +( | +renderer_handle | +ren, | +
+ | + | resource_handle | +res | +
+ | ) | ++ |
Adds a resource to this renderer which already exists and is owned by another renderer.
+ren | Handle associated with the existing renderer that owns the resource. |
res | Handle associated with the resource that should be referenced. |
void tz::gl::renderer_info::set_output | +( | +const ioutput & | +output | ) | ++ |
Renderers always render into something.
+By default, it renders to the window (only one window is supported so no confusion there). You can however set it to render into something else, such as a TextureOutput if you want to render into the resource of another renderer.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
renderer implementation which heavily calls into the backend at OpenGL Backend. + More...
+ +#include <renderer.hpp>
+Public Member Functions | |
renderer_ogl (const renderer_info &info) | |
Create a new renderer. | |
+unsigned int | resource_count () const |
Retrieve the number of resources. | |
const iresource * | get_resource (resource_handle handle) const |
Retrieve the resource (read-only) corresponding to the given handle. | |
iresource * | get_resource (resource_handle handle) |
Retrieve the resource corresponding to the given handle. | |
const icomponent * | get_component (resource_handle handle) const |
Retrieve the component sourcing the resource (read-only) corresponding to the given handle. | |
icomponent * | get_component (resource_handle handle) |
Retrieve the component sourcing the resource corresponding to the given handle. | |
+const renderer_options & | get_options () const |
Retrieve options denoting extra features used by the renderer. | |
+const render_state & | get_state () const |
Retrieve current state of the renderer. | |
void | render () |
Invoke the renderer, emitting a single draw call of a set number of triangles. | |
void | edit (const renderer_edit_request &edit_request) |
Confirm changes to a renderer. | |
renderer implementation which heavily calls into the backend at OpenGL Backend.
+tz::gl::renderer_ogl::renderer_ogl | +( | +const renderer_info & | +info | ) | ++ |
Create a new renderer.
+info | User-exposed class which describes how many resources etc. we have and a high-level description of where we expect to render into. |
void tz::gl::renderer_ogl::edit | +( | +const renderer_edit_request & | +edit_request | ) | ++ |
Confirm changes to a renderer.
+Editing renderers is expensive, so it should only be done if absolutely necessary. If you are editing renderers on a per-frame basis, consider creating multiple different renderers upfront for each hot-path and switching between them as necessary instead.
edit_request | Structure specifying which edits to make. |
icomponent * tz::gl::renderer_ogl::get_component | +( | +resource_handle | +handle | ) | ++ |
Retrieve the component sourcing the resource corresponding to the given handle.
+Handle | handle returned from a call to a renderer_info's add_resource . If this handle came from a renderer_info different to the one we were provided, the behaviour is undefined. |
const icomponent * tz::gl::renderer_ogl::get_component | +( | +resource_handle | +handle | ) | +const | +
Retrieve the component sourcing the resource (read-only) corresponding to the given handle.
+Handle | handle returned from a call to a renderer_info's add_resource . If this handle came from a renderer_info different to the one we were provided, the behaviour is undefined. |
iresource * tz::gl::renderer_ogl::get_resource | +( | +resource_handle | +handle | ) | ++ |
Retrieve the resource corresponding to the given handle.
+Handle | handle returned from a call to a renderer_info's add_resource . If this handle came from a renderer_info different to the one we were provided, the behaviour is undefined. |
const iresource * tz::gl::renderer_ogl::get_resource | +( | +resource_handle | +handle | ) | +const | +
Retrieve the resource (read-only) corresponding to the given handle.
+Handle | handle returned from a call to a renderer_info's add_resource . If this handle came from a renderer_info different to the one we were provided, the behaviour is undefined. |
void tz::gl::renderer_ogl::render | +( | +) | ++ |
Invoke the renderer, emitting a single draw call of a set number of triangles.
+The number of triangles rendered is equal to the number of triangles rendered in the previous draw-call. If this is the first draw, zero triangles are rendered.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Data Structures | |
struct | render_target_t |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Public Member Functions | |
+virtual resource_type | get_type () const final |
Retrieve the type of the resource. | |
virtual resource_access | get_access () const final |
Retrieve access information about this resource when used in a renderer or Processor. | |
virtual const resource_flags & | get_flags () const final |
Retrieve a field containing all flags applied to this resource. | |
+virtual std::span< const std::byte > | data () const final |
Retrieve a read-only view into the resource data. | |
virtual std::span< std::byte > | data () final |
Retrieve a read+write view into the resource data. | |
+virtual void | dbgui () override |
Display debug information about the resource. | |
Public Member Functions inherited from tz::gl::iresource | |
template<typename T > | |
std::span< const T > | data_as () const |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
template<typename T > | |
std::span< T > | data_as () |
Retrieve a read+write view into the resource data, interpreted as an array of some type. | |
+
|
+ +finalvirtual | +
Retrieve a read+write view into the resource data.
+get_access()
must return any of the dynamic values. Otherwise, the behaviour of a write is undefined. Implements tz::gl::iresource.
+ +
+
|
+ +finalvirtual | +
Retrieve access information about this resource when used in a renderer or Processor.
+Implements tz::gl::iresource.
+ +
+
|
+ +finalvirtual | +
Retrieve a field containing all flags applied to this resource.
+If you didn't specify any flags for this resource, it will be empty.
+ +Implements tz::gl::iresource.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Synchronisation primitive which is not interactable on the host and which has two states: + More...
+ +#include <semaphore.hpp>
Synchronisation primitive which is not interactable on the host and which has two states:
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a linear array of data which can be used for various purposes. + More...
+ +#include <buffer.hpp>
+Public Member Functions | |
+const LogicalDevice & | get_device () const |
Retrieve the LogicalDevice used to create the buffer. | |
+BufferUsageField | get_usage () const |
Retrieve all usages of this buffer. | |
+MemoryResidency | get_residency () const |
Retrieve the residency of the buffer's memory. | |
void * | map () |
If possible, map the memory to a CPU-size pointer. | |
template<typename T > | |
std::span< T > | map_as () |
Map the memory to a span of a given type. | |
+void | unmap () |
Unmap the buffer, causing any pointers created from Buffer::map to be invalidated. | |
std::size_t | size () const |
Retrieve the size, in bytes, of the buffer. | |
Represents a linear array of data which can be used for various purposes.
+See BufferUsage for some examples of usages.
+void * tz::gl::vk2::Buffer::map | +( | +) | ++ |
If possible, map the memory to a CPU-size pointer.
+
+
|
+ +inline | +
Map the memory to a span of a given type.
+T | Type to map to. Must be trivially_copyable. |
std::size_t tz::gl::vk2::Buffer::size | +( | +) | +const | +
Retrieve the size, in bytes, of the buffer.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents storage for vulkan commands, such as draw calls, binds, transfers etc... + More...
+ +#include <command.hpp>
+Public Member Functions | |
const LogicalDevice & | get_device () const |
CommandBuffers are allocated from a CommandPool. | |
CommandBufferRecording | record () |
Begin recording the CommandBuffer. | |
+bool | is_recording () const |
Query as to whether this CommandBuffer is currently recording. | |
+bool | has_ever_recorded () const |
Query as to whether this CommandBuffer is either recording, or ever has been recorded in the past, even if it doesn't contain any commands. | |
std::size_t | command_count () const |
Retrieve the number of commands recorded into the buffer. | |
Represents storage for vulkan commands, such as draw calls, binds, transfers etc...
+std::size_t tz::gl::vk2::CommandBuffer::command_count | +( | +) | +const | +
Retrieve the number of commands recorded into the buffer.
+const LogicalDevice & tz::gl::vk2::CommandBuffer::get_device | +( | +) | +const | +
CommandBuffers are allocated from a CommandPool.
+Each pool was spawned from a LogicalDevice. Retrieve a reference to the LogicalDevice which spawned the pool which owns this buffer.
+ +CommandBufferRecording tz::gl::vk2::CommandBuffer::record | +( | +) | ++ |
Begin recording the CommandBuffer.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents the full duration of the recording process of an existing CommandBuffer. + More...
+ +#include <command.hpp>
+Data Structures | |
class | DynamicRenderingRun |
class | RenderPassRun |
Represents the full duration of an invocation of a RenderPass during a CommandBufferRecording. More... | |
+Public Member Functions | |
void | bind_pipeline (VulkanCommand::BindPipeline command) |
Bind an existing GraphicsPipeline to some context. | |
void | dispatch (VulkanCommand::Dispatch dispatch) |
Dispatch some compute work. | |
void | draw (VulkanCommand::Draw draw) |
Perform a non-instanced draw. | |
void | draw_indexed (VulkanCommand::DrawIndexed draw) |
Perform an indexed draw. | |
void | draw_indirect (VulkanCommand::DrawIndirect draw) |
Perform some indirect, non-indexed draws. | |
void | draw_indexed_indirect (VulkanCommand::DrawIndexedIndirect draw) |
Perform some indirect, indexed draws. | |
void | bind_descriptor_sets (VulkanCommand::BindDescriptorSets command) |
Bind a list of DescriptorSet. | |
void | buffer_copy_buffer (VulkanCommand::BufferCopyBuffer command) |
Copy data from one Buffer to another. | |
void | buffer_copy_image (VulkanCommand::BufferCopyImage command) |
Copy data from one Buffer to an Image. | |
void | image_copy_image (VulkanCommand::ImageCopyImage command) |
Copy data from one Image to another. | |
void | bind_buffer (VulkanCommand::BindBuffer command) |
Bind a Buffer. | |
const CommandBuffer & | get_command_buffer () const |
Retrieve the CommandBuffer that is currently being recorded. | |
Represents the full duration of the recording process of an existing CommandBuffer.
+void tz::gl::vk2::CommandBufferRecording::bind_buffer | +( | +VulkanCommand::BindBuffer | +command | ) | ++ |
Bind a Buffer.
+See VulkanCommand::BindBuffer for details.
+ +void tz::gl::vk2::CommandBufferRecording::bind_descriptor_sets | +( | +VulkanCommand::BindDescriptorSets | +command | ) | ++ |
Bind a list of DescriptorSet.
+See VulkanCommand::BindDescriptorSets for details.
+ +void tz::gl::vk2::CommandBufferRecording::bind_pipeline | +( | +VulkanCommand::BindPipeline | +command | ) | ++ |
Bind an existing GraphicsPipeline to some context.
+See VulkanCommand::BindPipeline for details.
+ +void tz::gl::vk2::CommandBufferRecording::buffer_copy_buffer | +( | +VulkanCommand::BufferCopyBuffer | +command | ) | ++ |
Copy data from one Buffer to another.
+See VulkanCommand::BufferCopyBuffer for details.
+ +void tz::gl::vk2::CommandBufferRecording::buffer_copy_image | +( | +VulkanCommand::BufferCopyImage | +command | ) | ++ |
Copy data from one Buffer to an Image.
+See VulkanCommand::BufferCopyImage for details.
+ +void tz::gl::vk2::CommandBufferRecording::dispatch | +( | +VulkanCommand::Dispatch | +dispatch | ) | ++ |
Dispatch some compute work.
+See VulkanCommand::Dispatch for details.
+ +void tz::gl::vk2::CommandBufferRecording::draw | +( | +VulkanCommand::Draw | +draw | ) | ++ |
Perform a non-instanced draw.
+See VulkanCommand::Draw for details.
+ +void tz::gl::vk2::CommandBufferRecording::draw_indexed | +( | +VulkanCommand::DrawIndexed | +draw | ) | ++ |
Perform an indexed draw.
+See VulkanCommand::Draw for details.
+ +void tz::gl::vk2::CommandBufferRecording::draw_indexed_indirect | +( | +VulkanCommand::DrawIndexedIndirect | +draw | ) | ++ |
Perform some indirect, indexed draws.
+See VulkanCommand::DrawIndexedIndirect for details.
+ +void tz::gl::vk2::CommandBufferRecording::draw_indirect | +( | +VulkanCommand::DrawIndirect | +draw | ) | ++ |
Perform some indirect, non-indexed draws.
+See VulkanCommand::DrawIndirect for details.
+ +const CommandBuffer & tz::gl::vk2::CommandBufferRecording::get_command_buffer | +( | +) | +const | +
Retrieve the CommandBuffer that is currently being recorded.
+void tz::gl::vk2::CommandBufferRecording::image_copy_image | +( | +VulkanCommand::ImageCopyImage | +command | ) | ++ |
Copy data from one Image to another.
+See VulkanCommand::ImageCopyImage for details.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents the full duration of an invocation of a RenderPass during a CommandBufferRecording. + More...
+ +#include <command.hpp>
+Public Member Functions | |
RenderPassRun (Framebuffer &framebuffer, CommandBufferRecording &recording, tz::vec4 clear_colour={0.0f, 0.0f, 0.0f, 1.0f}) | |
Record the beginning of the RenderPass sourcing the provided Framebuffer. | |
Represents the full duration of an invocation of a RenderPass during a CommandBufferRecording.
+tz::gl::vk2::CommandBufferRecording::RenderPassRun::RenderPassRun | +( | +Framebuffer & | +framebuffer, | +
+ | + | CommandBufferRecording & | +recording, | +
+ | + | tz::vec4 | +clear_colour = {0.0f, 0.0f, 0.0f, 1.0f} |
+
+ | ) | ++ |
Record the beginning of the RenderPass sourcing the provided Framebuffer.
+framebuffer | Framebuffer whose RenderPass should begin within the CommandBuffer. |
recording | Existing recording of a CommandBuffer which shall record the beginning/ending of the render pass. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents storage for CommandBuffers. + More...
+ +#include <command.hpp>
+Data Structures | |
struct | Allocation |
Specifies information about an allocation of a CommandBuffer or many. More... | |
struct | AllocationResult |
Contains information about the result of a pool allocation. More... | |
+Public Member Functions | |
AllocationResult | allocate_buffers (const Allocation &alloc) |
Allocate some CommandBuffers. | |
Represents storage for CommandBuffers.
+CommandPool::AllocationResult tz::gl::vk2::CommandPool::allocate_buffers | +( | +const Allocation & | +alloc | ) | ++ |
Allocate some CommandBuffers.
+See Allocation for more info.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Specifies the types of resources that will be accessed by a graphics or compute pipeline via a Shader. + More...
+ +#include <descriptors.hpp>
+Public Member Functions | |
+ | DescriptorLayout (DescriptorLayoutInfo info) |
Construct a DescriptorLayout. | |
std::size_t | binding_count () const |
Retrieve the number of bindings within the layout. | |
std::size_t | descriptor_count () const |
Retrieve the total number of descriptors in all of the bindings. | |
std::size_t | descriptor_count_of (DescriptorType type) const |
Retrieve the total number of descriptors of the given type in all of the bindings. | |
std::span< const DescriptorLayoutInfo::BindingInfo > | get_bindings () const |
Retrieve a read-only view into the bindings data for the layout. | |
Specifies the types of resources that will be accessed by a graphics or compute pipeline via a Shader.
+std::size_t tz::gl::vk2::DescriptorLayout::binding_count | +( | +) | +const | +
Retrieve the number of bindings within the layout.
+std::size_t tz::gl::vk2::DescriptorLayout::descriptor_count | +( | +) | +const | +
Retrieve the total number of descriptors in all of the bindings.
+std::size_t tz::gl::vk2::DescriptorLayout::descriptor_count_of | +( | +DescriptorType | +type | ) | +const | +
Retrieve the total number of descriptors of the given type in all of the bindings.
+type | Descriptor type to retrieve the count of. |
type
. std::span< const DescriptorLayoutInfo::BindingInfo > tz::gl::vk2::DescriptorLayout::get_bindings | +( | +) | +const | +
Retrieve a read-only view into the bindings data for the layout.
+i
. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Helper class to populate a DescriptorLayoutInfo. + More...
+ +#include <descriptors.hpp>
+Public Member Functions | |
+ | DescriptorLayoutBuilder ()=default |
Create a builder starting with no bindings. | |
+ | DescriptorLayoutBuilder (DescriptorLayoutInfo existing_info) |
Create a builder based upon an existing layout. | |
DescriptorLayoutBuilder & | with_binding (DescriptorLayoutInfo::BindingInfo binding) |
Add a new binding. | |
const LogicalDevice * | get_device () const |
Retrieve the LogicalDevice which will be used to construct the resultant layout. | |
void | set_device (const LogicalDevice &device) |
Set which LogicalDevice will be used to construct the resultant layout. | |
const DescriptorLayoutInfo & | get_info () const |
Retrieve the info structure corresponding to this builder. | |
DescriptorLayout | build () const |
Create a new DescriptorLayout based upon this builder. | |
+void | clear () |
Undo all information, including bindings and device info back to default settings. | |
Helper class to populate a DescriptorLayoutInfo.
+DescriptorLayout tz::gl::vk2::DescriptorLayoutBuilder::build | +( | +) | +const | +
Create a new DescriptorLayout based upon this builder.
+const LogicalDevice * tz::gl::vk2::DescriptorLayoutBuilder::get_device | +( | +) | +const | +
Retrieve the LogicalDevice which will be used to construct the resultant layout.
+const DescriptorLayoutInfo & tz::gl::vk2::DescriptorLayoutBuilder::get_info | +( | +) | +const | +
Retrieve the info structure corresponding to this builder.
+This can be used to construct the DescriptorLayout.
void tz::gl::vk2::DescriptorLayoutBuilder::set_device | +( | +const LogicalDevice & | +device | ) | ++ |
Set which LogicalDevice will be used to construct the resultant layout.
+Note that it is an error not to provide a valid LogicalDevice when creating the DescriptorLayout.
device | LogicalDevice which will own the layout. |
DescriptorLayoutBuilder & tz::gl::vk2::DescriptorLayoutBuilder::with_binding | +( | +DescriptorLayoutInfo::BindingInfo | +binding | ) | ++ |
Add a new binding.
+See DescriptorLayoutInfo::BindingInfo for more information.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents storage for DescriptorSets. + More...
+ +#include <descriptors.hpp>
+Data Structures | |
struct | Allocation |
Specifies information about a DescriptorPool allocation. More... | |
struct | AllocationResult |
Specifies information about the resultant of an invocation to DescriptorPool::allocate_sets. More... | |
class | UpdateRequest |
Specifies a requests to update zero or more DescriptorSets owned by an existing DescriptorPool. More... | |
+Public Member Functions | |
bool | contains (const DescriptorSet &set) const |
Query as to whether an existing DescriptorSet was allocated from this pool. | |
+const LogicalDevice & | get_device () const |
Retrieve the LogicalDevice which was used to create the pool. | |
AllocationResult | allocate_sets (const Allocation &alloc) |
Allocate some DescriptorSets. | |
UpdateRequest | make_update_request () |
Retrieve an empty update request for this pool. | |
void | update_sets (UpdateRequest update_request) |
Issue an update request to any DescriptorSets owned by this pool. | |
void | update_sets (const DescriptorSet::WriteList &writes) |
Update some existing DescriptorSets. | |
void | clear () |
Purge all DescriptorSets. | |
Represents storage for DescriptorSets.
+DescriptorPool::AllocationResult tz::gl::vk2::DescriptorPool::allocate_sets | +( | +const Allocation & | +alloc | ) | ++ |
Allocate some DescriptorSets.
+See Allocation for more info.
void tz::gl::vk2::DescriptorPool::clear | +( | +) | ++ |
Purge all DescriptorSets.
+The pool reclaims all memory from previously allocated DescriptorSets. This also means that all DescriptorSets allocated from this pool are now invalid.
+ +bool tz::gl::vk2::DescriptorPool::contains | +( | +const DescriptorSet & | +set | ) | +const | +
Query as to whether an existing DescriptorSet was allocated from this pool.
+DescriptorPool::UpdateRequest tz::gl::vk2::DescriptorPool::make_update_request | +( | +) | ++ |
Retrieve an empty update request for this pool.
+You can fill this in and then pass to DescriptorPool::update_sets(UpdateRequest) to edit descriptors within any owned sets.
+ +void tz::gl::vk2::DescriptorPool::update_sets | +( | +const DescriptorSet::WriteList & | +writes | ) | ++ |
Update some existing DescriptorSets.
+See DescriptorSet::Write for more.
writes | List of DescriptorSet::Write to make changes to existing descriptors or descriptor arrays. |
void tz::gl::vk2::DescriptorPool::update_sets | +( | +DescriptorPool::UpdateRequest | +update_request | ) | ++ |
Issue an update request to any DescriptorSets owned by this pool.
+See UpdateRequest for details. See DescriptorPool::make_update_request to retrieve an empty UpdateRequest to make descriptor changes within owned sets.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Specifies a requests to update zero or more DescriptorSets owned by an existing DescriptorPool. + More...
+ +#include <descriptors.hpp>
+Public Member Functions | |
+void | add_set_edit (DescriptorSet::EditRequest set_edit) |
Add an edit for a DescriptorSet. | |
+std::span< const DescriptorSet::EditRequest > | get_set_edits () const |
Retrieve all DescriptorSet edit requests added so far. | |
Specifies a requests to update zero or more DescriptorSets owned by an existing DescriptorPool.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a set of one or more descriptors. + More...
+ +#include <descriptors.hpp>
+Data Structures | |
class | EditRequest |
Request structure representing zero or more descriptor changes for this set. More... | |
struct | Write |
Specifies information about writing to a specific element of the descriptor set via binding id. More... | |
+Public Member Functions | |
const DescriptorLayout & | get_layout () const |
Retrieve the DescriptorLayout which this set matches. | |
EditRequest | make_edit_request () |
Retrieve an empty request for this set. | |
Represents a set of one or more descriptors.
+const DescriptorLayout & tz::gl::vk2::DescriptorSet::get_layout | +( | +) | +const | +
Retrieve the DescriptorLayout which this set matches.
+DescriptorSet::EditRequest tz::gl::vk2::DescriptorSet::make_edit_request | +( | +) | ++ |
Retrieve an empty request for this set.
+You can use this to request changes to existing descriptors within this set.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Request structure representing zero or more descriptor changes for this set. + More...
+ +#include <descriptors.hpp>
+Public Member Functions | |
void | set_buffer (std::uint32_t binding_id, Write::BufferWriteInfo buffer_write, std::uint32_t array_index=0) |
Request that the buffer at the given binding at the provided array index refers to an existing Buffer. | |
void | set_image (std::uint32_t binding_id, Write::ImageWriteInfo image_write, std::uint32_t array_index=0) |
Request that the image at the given binding at the provided array index refers to an existing Image. | |
+DescriptorSet::WriteList | to_write_list () const |
Retrieve a basic list of writes corresponding to all requested edits so far. | |
+const DescriptorSet & | get_set () const |
Retrieve the DescriptorSet which this request is intending to edit. | |
Request structure representing zero or more descriptor changes for this set.
+To create an edit request, see DescriptorSet::make_edit_request.
+void tz::gl::vk2::DescriptorSet::EditRequest::set_buffer | +( | +std::uint32_t | +binding_id, | +
+ | + | Write::BufferWriteInfo | +buffer_write, | +
+ | + | std::uint32_t | +array_index = 0 |
+
+ | ) | ++ |
Request that the buffer at the given binding at the provided array index refers to an existing Buffer.
+binding_id | Binding id to write a buffer to. |
buffer_write | Struct containing information about which Buffer is to be referred to by this descriptor, and optionally at a given subregion of the buffer. |
array_index | Index of the descriptor array which this edit applies to. If this binding does not refer to a descriptor array, this must be zero. Default zero. |
binding_id
must be a 'buffery' DescriptorType. This is either UniformBuffer
or StorageBuffer
. array_index != 0
, then there must be a descriptor array at the given binding_id
of size greater than or equal to array_index
. void tz::gl::vk2::DescriptorSet::EditRequest::set_image | +( | +std::uint32_t | +binding_id, | +
+ | + | Write::ImageWriteInfo | +image_write, | +
+ | + | std::uint32_t | +array_index = 0 |
+
+ | ) | ++ |
Request that the image at the given binding at the provided array index refers to an existing Image.
+binding_id | Binding id to write an image to. |
image_write | Struct containing information about which Image is to be referred to by this descriptor, and optionally a new Sampler. |
array_index | Index of the descriptor array which this edit applies to. If this binding does not refer to a descriptor array, this must be zero. Default zero. |
binding_id
must be a 'imagey' DescriptorType. This is either Image
, ImageWithSampler
, or StorageImage
. array_index != 0
, then there must be a descriptor array at the given binding_id
of size greater than or equal to array_index
. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Synchronisation primitive which is useful to detect completion of a GPU operation, CPU-side. + More...
+ +#include <fence.hpp>
+Public Member Functions | |
bool | is_signalled () const |
Query as to whether the Fence is currently signalled. | |
void | wait_until_signalled () const |
Block the current thread until the Fence is signalled. | |
+void | unsignal () |
Set the state of the Fence to the unsignaleld state. | |
Synchronisation primitive which is useful to detect completion of a GPU operation, CPU-side.
+bool tz::gl::vk2::Fence::is_signalled | +( | +) | +const | +
Query as to whether the Fence is currently signalled.
+void tz::gl::vk2::Fence::wait_until_signalled | +( | +) | +const | +
Block the current thread until the Fence is signalled.
+this->is_signalled()
returns true. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a render target for a RenderPass. + More...
+ +#include <framebuffer.hpp>
+Public Member Functions | |
tz::vec2ui | get_dimensions () const |
Retrieve the width and height of the framebuffer. | |
const RenderPass & | get_pass () const |
Retrieve the RenderPass that this Framebuffer expects to act as a target for. | |
const LogicalDevice & | get_device () const |
Retrieve the LogicalDevice that spawned this Framebuffer. | |
tz::basic_list< const ImageView * > | get_attachment_views () const |
Retrieve a list of imageviews corresponding to each attachment. | |
tz::basic_list< ImageView * > | get_attachment_views () |
Retrieve a list of imageviews corresponding to each attachment. | |
Represents a render target for a RenderPass.
+tz::basic_list< ImageView * > tz::gl::vk2::Framebuffer::get_attachment_views | +( | +) | ++ |
Retrieve a list of imageviews corresponding to each attachment.
+this->get_pass()
. tz::basic_list< const ImageView * > tz::gl::vk2::Framebuffer::get_attachment_views | +( | +) | +const | +
Retrieve a list of imageviews corresponding to each attachment.
+this->get_pass()
. const LogicalDevice & tz::gl::vk2::Framebuffer::get_device | +( | +) | +const | +
Retrieve the LogicalDevice that spawned this Framebuffer.
+this->get_pass()
. tz::vec2ui tz::gl::vk2::Framebuffer::get_dimensions | +( | +) | +const | +
Retrieve the width and height of the framebuffer.
+All attachments must have the same dimensions.
const RenderPass & tz::gl::vk2::Framebuffer::get_pass | +( | +) | +const | +
Retrieve the RenderPass that this Framebuffer expects to act as a target for.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents the Graphics Pipeline. + More...
+ +#include <graphics_pipeline.hpp>
Represents the Graphics Pipeline.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents an Image owned by the Vulkan API. + More...
+ +#include <image.hpp>
+Public Member Functions | |
Image (SwapchainImageInfo sinfo) | |
Create an Image that refers to a Swapchain image. | |
+image_format | get_format () const |
Retrieve the underlying format of the image. | |
+ImageLayout | get_layout () const |
Retrieve the current layout of the image. | |
tz::vec2ui | get_dimensions () const |
Retrieve the dimensions of the image. | |
const LogicalDevice & | get_device () const |
Retrieve the LogicalDevice that 'owns' the image. | |
tz::gl::vk2::Image::Image | +( | +SwapchainImageInfo | +sinfo | ) | ++ |
const LogicalDevice & tz::gl::vk2::Image::get_device | +( | +) | +const | +
Retrieve the LogicalDevice that 'owns' the image.
+Swapchain images are owned by the presentation device. For that reason, these do not belong to this device per-se. In this case this will return the LogicalDevice responsible for retrieving the image (Most certainly the LogicalDevice that initially spawned its owner Swapchain.)
+ +tz::vec2ui tz::gl::vk2::Image::get_dimensions | +( | +) | +const | +
Retrieve the dimensions of the image.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Logical interface to an existing PhysicalDevice. + More...
+ +#include <logical_device.hpp>
+Public Member Functions | |
LogicalDevice (LogicalDeviceInfo device_info) | |
Construct a LogicalDevice based on a PhysicalDevice, and some optional extensions/features to enable. | |
const PhysicalDevice & | get_hardware () const |
Retrieve the PhysicalDevice that this LogicalDevice derives from. | |
+const DeviceExtensionList & | get_extensions () const |
Retrieve a list of all enabled extensions. | |
+const DeviceFeatureField & | get_features () const |
Retrieve a list of all enabled features. | |
+void | wait_until_idle () const |
Block the current thread until all queues associated with this device have become idle. | |
bool | is_null () const |
Query as to whether the LogicalDevice is null. | |
+Static Public Member Functions | |
static LogicalDevice | null () |
Create a LogicalDevice which doesn't do anything. | |
Logical interface to an existing PhysicalDevice.
+tz::gl::vk2::LogicalDevice::LogicalDevice | +( | +LogicalDeviceInfo | +device_info | ) | ++ |
Construct a LogicalDevice based on a PhysicalDevice, and some optional extensions/features to enable.
+enabled_extensions
are supported. That is, are contained within PhysicalDevice::get_supported_extensions and PhysicalDevice::get_supported_features. If an extension/feature is enabled which is not supported by physical_device
, the behaviour is undefined. const PhysicalDevice & tz::gl::vk2::LogicalDevice::get_hardware | +( | +) | +const | +
Retrieve the PhysicalDevice that this LogicalDevice derives from.
+bool tz::gl::vk2::LogicalDevice::is_null | +( | +) | +const | +
Query as to whether the LogicalDevice is null.
+Null LogicalDevices cannot perform operations or be used for GPU work. See LogicalDevice::null for more information.
+ +
+
|
+ +static | +
Create a LogicalDevice which doesn't do anything.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents something resembling a graphics card that can perform general graphical operations. + More...
+ +#include <physical_device.hpp>
+Public Member Functions | |
PhysicalDevice (VkPhysicalDevice native, const VulkanInstance &instance) | |
You're not meant to construct these directly. | |
DeviceFeatureField | get_supported_features () const |
PhysicalDevices do not necessarily support all available DeviceFeatures. | |
DeviceExtensionList | get_supported_extensions () const |
PhysicalDevices support various extensions, but not necessarily all of them. | |
PhysicalDeviceInfo | get_info () const |
Retrieve the vendor. | |
tz::basic_list< image_format > | get_supported_surface_formats () const |
Retrieve a list of all image_formats that could represent the given window surface. | |
tz::basic_list< SurfacePresentMode > | get_supported_surface_present_modes () const |
Retrieve a list of all SurfacePresentModes that could be used to present images to the WindowSurface attached to the VulkanInstance owning this device. | |
bool | supports_image_colour_format (image_format colour_format) const |
Query as to whether the given image_format can be used as a framebuffer colour attachment and as an input attachment format. | |
bool | supports_image_sampled_format (image_format sampled_format) const |
Query as to whether an ImageView using this format can be sampled from within a shader. | |
bool | supports_image_depth_format (image_format depth_format) const |
Query as to whether the given image_format can be used as a framebuffer depth/stencil attachment and as an input attachment format. | |
+const VulkanInstance & | get_instance () const |
Retrieve the VulkanInstance to which this physical device belongs. | |
Represents something resembling a graphics card that can perform general graphical operations.
+A PhysicalDevice may or may not support graphics, compute or transfer work.
+tz::gl::vk2::PhysicalDevice::PhysicalDevice | +( | +VkPhysicalDevice | +native, | +
+ | + | const VulkanInstance & | +instance | +
+ | ) | ++ |
You're not meant to construct these directly.
+See get_all_devices()
+ +PhysicalDeviceInfo tz::gl::vk2::PhysicalDevice::get_info | +( | +) | +const | +
Retrieve the vendor.
+Only a few vendors are supported, so check PhysicalDeviceVendor for information. If you're using very new hardware, or various custom drivers such as MoltenVK, this may very well not return the expected value. This should mainly be used for vendor-specific optimisations and shouldn't be exposed to the end-user.
+ +DeviceExtensionList tz::gl::vk2::PhysicalDevice::get_supported_extensions | +( | +) | +const | +
PhysicalDevices support various extensions, but not necessarily all of them.
+DeviceFeatureField tz::gl::vk2::PhysicalDevice::get_supported_features | +( | +) | +const | +
PhysicalDevices do not necessarily support all available DeviceFeatures.
+tz::basic_list< image_format > tz::gl::vk2::PhysicalDevice::get_supported_surface_formats | +( | +) | +const | +
Retrieve a list of all image_formats that could represent the given window surface.
+tz::basic_list< SurfacePresentMode > tz::gl::vk2::PhysicalDevice::get_supported_surface_present_modes | +( | +) | +const | +
Retrieve a list of all SurfacePresentModes that could be used to present images to the WindowSurface attached to the VulkanInstance owning this device.
+This is guaranteed to contain every element within present_traits::get_mandatory_present_modes().
bool tz::gl::vk2::PhysicalDevice::supports_image_colour_format | +( | +image_format | +colour_format | ) | +const | +
Query as to whether the given image_format can be used as a framebuffer colour attachment and as an input attachment format.
+This is guaranteed to return true for any image_format within format_traits::get_mandatory_colour_attachment_formats().
colour_format
can be a colour attachment, otherwise false. bool tz::gl::vk2::PhysicalDevice::supports_image_depth_format | +( | +image_format | +depth_format | ) | +const | +
Query as to whether the given image_format can be used as a framebuffer depth/stencil attachment and as an input attachment format.
+depth_format
can be a depth/stencil attachment, otherwise false. bool tz::gl::vk2::PhysicalDevice::supports_image_sampled_format | +( | +image_format | +sampled_format | ) | +const | +
Query as to whether an ImageView using this format can be sampled from within a shader.
+sampled_format
can be sampled in a shader, otherwise false. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents an interface between shader stages and shader resources in terms of the layout of a group of DescriptorSet. + More...
+ +#include <pipeline_layout.hpp>
Represents an interface between shader stages and shader resources in terms of the layout of a group of DescriptorSet.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a collection of attachments and subpasses and describes how the attachments are used throughout the subpases. + More...
+ +#include <render_pass.hpp>
+Public Member Functions | |
+ | RenderPass (RenderPassInfo info) |
Create the RenderPass. | |
Represents a collection of attachments and subpasses and describes how the attachments are used throughout the subpases.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Helper class to create a RenderPass. + More...
+ +#include <render_pass.hpp>
+Public Member Functions | |
RenderPassBuilder & | with_attachment (Attachment attachment) |
Add a new attachment to the pass. | |
RenderPassBuilder & | with_subpass (RenderPassInfo::Subpass subpass) |
Add a new subpass to the render pass. | |
const LogicalDevice * | get_device () const |
Retrieve the LogicalDevice which will be used to construct the RenderPass. | |
void | set_device (const LogicalDevice &device) |
Set which LogicalDevice will be used to construct the RenderPass. | |
RenderPass | build () const |
Create a new RenderPass based upon this builder. | |
Helper class to create a RenderPass.
+RenderPass tz::gl::vk2::RenderPassBuilder::build | +( | +) | +const | +
Create a new RenderPass based upon this builder.
+const LogicalDevice * tz::gl::vk2::RenderPassBuilder::get_device | +( | +) | +const | +
Retrieve the LogicalDevice which will be used to construct the RenderPass.
+By default this is nullptr.
void tz::gl::vk2::RenderPassBuilder::set_device | +( | +const LogicalDevice & | +device | ) | ++ |
Set which LogicalDevice will be used to construct the RenderPass.
+device | LogicalDevice which will be used. It must not be a null device. |
RenderPassBuilder & tz::gl::vk2::RenderPassBuilder::with_attachment | +( | +Attachment | +attachment | ) | ++ |
Add a new attachment to the pass.
+This can be referenced by the subpasses.
attachment | Information about the attachment and how it is interpreted during subpasses. |
RenderPassBuilder & tz::gl::vk2::RenderPassBuilder::with_subpass | +( | +RenderPassInfo::Subpass | +subpass | ) | ++ |
Add a new subpass to the render pass.
+This can reference any existing attachments.
subpass | Information about the subpass and how it references existing attachments. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents the state of an Image sampler which is used to read image data and apply filtering and other transformations to a Shader. + More...
+ +#include <sampler.hpp>
+Public Member Functions | |
+const LogicalDevice & | get_device () const |
Retrieve the LogicalDevice used to create the sampler. | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a Shader program. + More...
+ +#include <shader.hpp>
Represents a Shader program.
+Can be used within a GraphicsPipeline or ComputePipeline.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a single module of a Shader. + More...
+ +#include <shader.hpp>
+Public Member Functions | |
+ | ShaderModule (const ShaderModuleInfo &info) |
Create a ShaderModule based upon some existing SPIRV code. | |
+ShaderType | get_type () const |
Retrieve the type of this shader module. | |
Represents a single module of a Shader.
+Shaders are comprised of one or more ShaderModules of a given type. ShaderModules are not executable on their own.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Helper class to create a RenderPassInfo::Subpass. + More...
+ +#include <render_pass.hpp>
+Public Member Functions | |
SubpassBuilder & | with_input_attachment (RenderPassInfo::InputAttachmentReference input_attachment) |
Have the subpass reference an existing attachment as an input attachment. | |
SubpassBuilder & | with_colour_attachment (RenderPassInfo::AttachmentReference colour_attachment) |
Have the subpass reference an existing attachment as a colour attachment. | |
SubpassBuilder & | with_depth_stencil_attachment (RenderPassInfo::AttachmentReference depth_stencil_attachment) |
Have the subpass reference an existing attachment as the depth-stencil attachment. | |
void | set_pipeline_context (PipelineContext context) |
Specify how the subpass binds to the graphics pipeline. | |
const PipelineContext & | get_pipeline_context () const |
Query what the current bind point to the graphics pipeline is. | |
const RenderPassInfo::Subpass & | build () const |
Return a subpass info structure based upon this builder. | |
Helper class to create a RenderPassInfo::Subpass.
+const RenderPassInfo::Subpass & tz::gl::vk2::SubpassBuilder::build | +( | +) | +const | +
Return a subpass info structure based upon this builder.
+const PipelineContext & tz::gl::vk2::SubpassBuilder::get_pipeline_context | +( | +) | +const | +
Query what the current bind point to the graphics pipeline is.
+By default, this will be PipelineContext::graphics.
+ +void tz::gl::vk2::SubpassBuilder::set_pipeline_context | +( | +PipelineContext | +context | ) | ++ |
Specify how the subpass binds to the graphics pipeline.
+context | Bind point to the graphics pipeline. |
SubpassBuilder & tz::gl::vk2::SubpassBuilder::with_colour_attachment | +( | +RenderPassInfo::AttachmentReference | +colour_attachment | ) | ++ |
Have the subpass reference an existing attachment as a colour attachment.
+colour_attachment | Information about which attachment will be referenced as a colour attachment. |
SubpassBuilder & tz::gl::vk2::SubpassBuilder::with_depth_stencil_attachment | +( | +RenderPassInfo::AttachmentReference | +depth_stencil_attachment | ) | ++ |
Have the subpass reference an existing attachment as the depth-stencil attachment.
+Note that only one attachment can be referenced as a depth-stencil attachment at a time - If this is called multiple times for the same subpass, only the newest invocation will apply.
depth_stencil_attachment | Information about which attachment will be referenced as a depth-stencil attachment. |
SubpassBuilder & tz::gl::vk2::SubpassBuilder::with_input_attachment | +( | +RenderPassInfo::InputAttachmentReference | +input_attachment | ) | ++ |
Have the subpass reference an existing attachment as an input attachment.
+input_attachment | Information about which attachment will be referenced as an input attachment. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Swapchains are infrastructures which represent GPU images we will render to before they can be presented to the screen. + More...
+ +#include <swapchain.hpp>
+Data Structures | |
struct | ImageAcquisition |
Specify information about a request to acquire the next available presentable image. More... | |
struct | ImageAcquisitionResult |
+Public Member Functions | |
+ | Swapchain (SwapchainInfo info) |
Construct a new Swapchain. | |
ImageAcquisitionResult | acquire_image (const ImageAcquisition &acquire) |
Retrieve a presentable image index. | |
bool | is_null () const |
Query as to whether the Swapchain is null. | |
std::span< const Image > | get_images () const |
Retrieve a span of all presentable images associated with this Swapchain. | |
std::span< Image > | get_images () |
Retrieve a span of all presentable images associated with this Swapchain. | |
std::span< const ImageView > | get_image_views () const |
Retrieve a span of all ImageViews corresponding to an image associated with this Swapchain. | |
std::span< ImageView > | get_image_views () |
Retrieve a span of all ImageViews corresponding to an image associated with this Swapchain. | |
image_format | get_image_format () const |
Retrieve the image_format of the swapchain images. | |
SurfacePresentMode | get_present_mode () const |
Retrieve the present mode used by the swapchain. | |
tz::vec2ui | get_dimensions () const |
Retrieve the dimensions of the swapchain images. | |
+Static Public Member Functions | |
static Swapchain | null () |
Create a Swapchain which doesn't do anything. | |
Swapchains are infrastructures which represent GPU images we will render to before they can be presented to the screen.
+Swapchain::ImageAcquisitionResult tz::gl::vk2::Swapchain::acquire_image | +( | +const ImageAcquisition & | +acquire | ) | ++ |
Retrieve a presentable image index.
+See ImageAcquisition for details.
+ +tz::vec2ui tz::gl::vk2::Swapchain::get_dimensions | +( | +) | +const | +
Retrieve the dimensions of the swapchain images.
+image_format tz::gl::vk2::Swapchain::get_image_format | +( | +) | +const | +
Retrieve the image_format of the swapchain images.
+std::span< ImageView > tz::gl::vk2::Swapchain::get_image_views | +( | +) | ++ |
Retrieve a span of all ImageViews corresponding to an image associated with this Swapchain.
+this->get_image_views()[i].get_image() == this->get_images()[i]
is guaranteed to be the case.
std::span< const ImageView > tz::gl::vk2::Swapchain::get_image_views | +( | +) | +const | +
Retrieve a span of all ImageViews corresponding to an image associated with this Swapchain.
+this->get_image_views()[i].get_image() == this->get_images()[i]
is guaranteed to be the case.
std::span< Image > tz::gl::vk2::Swapchain::get_images | +( | +) | ++ |
Retrieve a span of all presentable images associated with this Swapchain.
+std::span< const Image > tz::gl::vk2::Swapchain::get_images | +( | +) | +const | +
Retrieve a span of all presentable images associated with this Swapchain.
+SurfacePresentMode tz::gl::vk2::Swapchain::get_present_mode | +( | +) | +const | +
Retrieve the present mode used by the swapchain.
+bool tz::gl::vk2::Swapchain::is_null | +( | +) | +const | +
Query as to whether the Swapchain is null.
+Null Swapchains cannot perform operations or be used for WindowSurface presentation. See Swapchain::null for more information.
+ +
+
|
+ +static | +
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Synchronisation primitive similar to BinarySemaphore. + More...
+ +#include <semaphore.hpp>
+Public Member Functions | |
TimelineSemaphore (const LogicalDevice &device, std::uint64_t value=0) | |
Create a TimelineSemaphore with the initial value. | |
+void | signal (std::uint64_t value) |
Instantaneously set the semaphore to the given value. | |
+void | wait_for (std::uint64_t value) const |
Blocks the current thread and waits until the semaphore has reached the provided value. | |
+std::uint64_t | get_value () const |
Retrieve the current semaphore value. | |
+Static Public Member Functions | |
static bool | supported (const LogicalDevice &device) |
Timeline Semaphores are optional features and must be enabled. | |
Synchronisation primitive similar to BinarySemaphore.
+Semaphore with a strictly increasing 64-bit unsigned integer payload. They are signalled with respect to a particular reference value. Note that this is an optional feature.
+In addition, TimelineSemaphores can be signalled/waited-on directly by the host. This makes them the most host-interactable synchronisation primitive, more than the BinarySemaphore and even more than the Fence.
+tz::gl::vk2::TimelineSemaphore::TimelineSemaphore | +( | +const LogicalDevice & | +device, | +
+ | + | std::uint64_t | +value = 0 |
+
+ | ) | ++ |
Create a TimelineSemaphore with the initial value.
+device.get_features()
contains DeviceFeature::TimelineSemaphores
+
|
+ +static | +
Timeline Semaphores are optional features and must be enabled.
+This is a helper function which can determine if a LogicalDevice has enabled Timeline Semaphores.
+See DeviceFeature::TimelineSemaphores for context.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a vulkan instance, which acts as a reference to all per-application state. + More...
+ +#include <tz_vulkan.hpp>
Represents a vulkan instance, which acts as a reference to all per-application state.
+There is a default instance, retrievable via vk2::get() but you can create additional instances.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a Vulkan-friendly interface to an existing OS window. + More...
+ +#include <tz_vulkan.hpp>
+Public Member Functions | |
+ | WindowSurface (const VulkanInstance &instance, const tz::wsi::window &window) |
Create a WindowSurface for a given window via an existing VulkanInstance. | |
Represents a Vulkan-friendly interface to an existing OS window.
+In order to present results to the screen, it is done via this WindowSurface class.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a single hardware Queue. + More...
+ +#include <queue.hpp>
+Data Structures | |
struct | PresentInfo |
Specifies information about a present request issued to a Queue. More... | |
struct | SubmitInfo |
Specifies information about a submission of GPU work to a Queue. More... | |
+Public Types | |
enum class | PresentResult { + Success_NoIssue +, + Success_Suboptimal +, + Fail_OutOfDate +, + Fail_AccessDenied +, + Fail_SurfaceLost +, + Fail_FatalError + + } |
Describes the result of a presentation request. See Queue::present. More... | |
+Public Member Functions | |
void | submit (SubmitInfo submit_info) |
Submit the queue, including any associated command buffers and perform necessary synchronisation. | |
PresentResult | present (PresentInfo present_info) |
Queue an image for presentation. | |
Represents a single hardware Queue.
+
+
|
+ +strong | +
Describes the result of a presentation request. See Queue::present.
+Queue::PresentResult tz::gl::vk2::hardware::Queue::present | +( | +Queue::PresentInfo | +present_info | ) | ++ |
Queue an image for presentation.
+See PresentInfo for details.
void tz::gl::vk2::hardware::Queue::submit | +( | +SubmitInfo | +submit_info | ) | ++ |
Submit the queue, including any associated command buffers and perform necessary synchronisation.
+See SubmitInfo for more information.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
A view into an array representing a flattened grid of data. + More...
+ +#include <grid_view.hpp>
+Public Member Functions | |
grid_view (std::span< T > data, tz::vec2ui dimensions) | |
Create a view over an existing array of grid data. | |
grid_view (std::span< T > data, unsigned int length) | |
Create a view over an existing array of square grid data. | |
tz::vec2ui | get_dimensions () const |
Retrieve the dimensions of the grid, in elements. | |
+std::span< T > | span () |
Retrieve the underlying span. | |
std::span< const T > | span () const |
Retrieve the underlying span. | |
std::conditional_t< N==1, T &, std::span< T > > | operator() (unsigned int x, unsigned int y) |
Retrieve the element at the provided co-ordinate. | |
A view into an array representing a flattened grid of data.
+Elements are interpreted as a tightly-packed array of rows. Each element is expected to be equivalent to a T[N]. For example, grid_view on an RGBA32 image might be a grid_view<std::byte, 4>
.
T | Underlying type of the element. |
N | number of T's per element. Default 1. |
tz::grid_view< T, N >::grid_view | +( | +std::span< T > | +data, | +
+ | + | tz::vec2ui | +dimensions | +
+ | ) | ++ |
Create a view over an existing array of grid data.
+data | View over grid data. |
dimensions | {x, y} where x is number of columns, and y is number of rows. |
tz::grid_view< T, N >::grid_view | +( | +std::span< T > | +data, | +
+ | + | unsigned int | +length | +
+ | ) | ++ |
Create a view over an existing array of square grid data.
+data | View over grid data. |
length | Represents the number of columns and rows. |
tz::vec2ui tz::grid_view< T, N >::get_dimensions | +( | +) | +const | +
Retrieve the dimensions of the grid, in elements.
+std::conditional_t< N==1, T &, std::span< T > > tz::grid_view< T, N >::operator() | +( | +unsigned int | +x, | +
+ | + | unsigned int | +y | +
+ | ) | ++ |
Retrieve the element at the provided co-ordinate.
+Note that normally this returns a span representing the T[] of an element. However if N == 1, then a reference to a single T is retrieved instead.
x | Column index locating the element. |
y | Row index locating the element. |
std::span< const T > tz::grid_view< T, N >::span | +( | +) | +const | +
Retrieve the underlying span.
+Read-only.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Public Member Functions | |
+virtual job_handle | execute (job_t job, execution_info einfo={}) override |
important note: if the job has an affinity, block(j) and complete(j) will not function correctly. | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Static Public Member Functions | |
static gltf | from_memory (std::string_view sv) |
here's an example of what a glb's json chunk might look like: { "asset": { "generator":"Khronos glTF Blender I/O v3.6.27", "version":"2.0" }, "scene":0, "scenes": [{ "name":"Scene", "nodes":[0] }], "nodes": [{ "mesh":0, "name":"Cube" }], "materials": [{ "doubleSided":true, "name":"Material", "pbrMetallicRoughness": { "baseColorFactor":[0.800000011920929,0.800000011920929,0.800000011920929,1], "metallicFactor":0, "roughnessFactor":0.5 } }], "meshes": [{ "name":"Cube", "primitives": [{ "attributes":{"POSITION":0,"NORMAL":1,"TEXCOORD_0":2}, "indices":3, "material":0 }] }], "accessors": [ {"bufferView":0,"componentType":5126,"count":24,"max":[1,1,1],"min":[-1,-1,-1],"type":"VEC3"}, {"bufferView":1,"componentType":5126,"count":24,"type":"VEC3"}, {"bufferView":2,"componentType":5126,"count":24,"type":"VEC2"}, {"bufferView":3,"componentType":5123,"count":36,"type":"SCALAR"} ], "bufferViews": [ {"buffer":0,"byteLength":288,"byteOffset":0,"target":34962}, {"buffer":0,"byteLength":288,"byteOffset":288,"target":34962}, {"buffer":0,"byteLength":192,"byteOffset":576,"target":34962}, {"buffer":0,"byteLength":72,"byteOffset":768,"target":34963} ], "buffers": [{ "byteLength":840 }] | |
+
|
+ +static | +
here's an example of what a glb's json chunk might look like: { "asset": { "generator":"Khronos glTF Blender I/O v3.6.27", "version":"2.0" }, "scene":0, "scenes": [{ "name":"Scene", "nodes":[0] }], "nodes": [{ "mesh":0, "name":"Cube" }], "materials": [{ "doubleSided":true, "name":"Material", "pbrMetallicRoughness": { "baseColorFactor":[0.800000011920929,0.800000011920929,0.800000011920929,1], "metallicFactor":0, "roughnessFactor":0.5 } }], "meshes": [{ "name":"Cube", "primitives": [{ "attributes":{"POSITION":0,"NORMAL":1,"TEXCOORD_0":2}, "indices":3, "material":0 }] }], "accessors": [ {"bufferView":0,"componentType":5126,"count":24,"max":[1,1,1],"min":[-1,-1,-1],"type":"VEC3"}, {"bufferView":1,"componentType":5126,"count":24,"type":"VEC3"}, {"bufferView":2,"componentType":5126,"count":24,"type":"VEC2"}, {"bufferView":3,"componentType":5123,"count":36,"type":"SCALAR"} ], "bufferViews": [ {"buffer":0,"byteLength":288,"byteOffset":0,"target":34962}, {"buffer":0,"byteLength":288,"byteOffset":288,"target":34962}, {"buffer":0,"byteLength":192,"byteOffset":576,"target":34962}, {"buffer":0,"byteLength":72,"byteOffset":768,"target":34963} ], "buffers": [{ "byteLength":840 }]
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
An allocator which operates on a pre-allocated buffer of variable size. + More...
+ +#include <linear.hpp>
An allocator which operates on a pre-allocated buffer of variable size.
+On construction, the arena buffer is considered to be wholly uninitialised. Each allocationslowly fills the arena until there is not enough space for an allocation request, in which case the null block is returned.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a lua state. + More...
+ +#include <state.hpp>
+Public Member Functions | |
bool | valid () const |
Query as to whether the state is valid. | |
bool | execute_file (const char *path, bool assert_on_failure=true) const |
Attempt to execute a lua source file. | |
bool | execute (const char *lua_src, bool assert_on_failure=true) const |
Attempt to execute a lua source string. | |
Represents a lua state.
+To retrieve the main lua state, see tz::lua::get_state()
+bool tz::lua::state::execute | +( | +const char * | +lua_src, | +
+ | + | bool | +assert_on_failure = true |
+
+ | ) | +const | +
Attempt to execute a lua source string.
+The code is instantly executed, and returns on completion.
lua_src | String containing lua source code, appropriate for the state. |
assert_on_failure | Whether Topaz should assert on the code running without any errors. |
bool tz::lua::state::execute_file | +( | +const char * | +path, | +
+ | + | bool | +assert_on_failure = true |
+
+ | ) | +const | +
Attempt to execute a lua source file.
+The code is instantly executed, and returns on completion.
path | The relative path locating the lua source file (with extension). |
assert_on_failure | Whether Topaz should assert on the code running without any errors. |
bool tz::lua::state::valid | +( | +) | +const | +
Query as to whether the state is valid.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Implements tz:allocator. + More...
+ +#include <malloc.hpp>
Implements tz:allocator.
+An allocator which simply calls malloc. It thinks it owns all memory, so if you're using this in a tz::fallback_allocator make sure it is always used as a secondary allocator, never the primary (or you will free()
no matter what).
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a row-major matrix with R rows and C columns. + More...
+ +#include <matrix.hpp>
+Public Member Functions | |
matrix ()=default | |
Default-intialised matrices have indeterminate values. | |
matrix (std::array< std::array< T, R >, C > data) | |
Initialise a matrix from a multi-dimensional array. | |
const Row & | operator[] (std::size_t row_idx) const |
Retrieve the i'th row of the matrix. | |
Row & | operator[] (std::size_t row_idx) |
Retrieve the i'th row of the matrix. | |
const T & | operator() (std::size_t row, std::size_t column) const |
Retrieve the element at the given row and column of the matrix. | |
T & | operator() (std::size_t row, std::size_t column) |
Retrieve the element at the given row and column of the matrix. | |
matrix< T, R, C > & | operator+= (T scalar) |
Add the scalar value to each element of the current matrix. | |
matrix< T, R, C > & | operator+= (const matrix< T, R, C > &matrix) |
Add the given matrix to the current matrix. | |
matrix< T, R, C > | operator+ (T scalar) const |
Add the scalar value to each element of the current matrix. | |
matrix< T, R, C > | operator+ (const matrix< T, R, C > &matrix) const |
Add the given matrix to the current matrix. | |
matrix< T, R, C > & | operator-= (T scalar) |
Subtract the scalar value from each element of the current matrix. | |
matrix< T, R, C > & | operator-= (const matrix< T, R, C > &matrix) |
Subtract the given matrix from the current matrix. | |
matrix< T, R, C > | operator- (T scalar) const |
Subtract the scalar value from each element of the current matrix. | |
matrix< T, R, C > | operator- (const matrix< T, R, C > &matrix) const |
Subtract the given matrix from the current matrix. | |
matrix< T, R, C > & | operator*= (T scalar) |
Multiply the scalar value with each element of the current matrix. | |
matrix< T, R, C > & | operator*= (const matrix< T, R, C > &matrix) |
Multiply the given matrix with the current matrix. | |
matrix< T, R, C > | operator* (T scalar) const |
Multiply the scalar value with each element of the current matrix. | |
matrix< T, R, C > | operator* (const matrix< T, R, C > &matrix) const |
Multiply the given matrix with the current matrix. | |
tz::vector< T, R > | operator* (const tz::vector< T, C > &vec) const |
Multiply the given vector (column-matrix) with the current matrix and return the resultant vector (row-matrix). | |
bool | operator== (T scalar) const |
Equate the given scalar with each value of the matrix. | |
bool | operator== (const matrix< T, R, C > &matrix) const |
Equate the given matrix with the current. | |
matrix< T, R, C > | inverse () const |
Retrieves a new matrix such that the resultant matrix could be multiplied by the original matrix to result in the identity matrix (See matrix<T, R, C>::identity()). | |
matrix< T, R, C > | transpose () const |
Create a copy of the current matrix, and transpose the copy. | |
+Static Public Member Functions | |
static constexpr matrix< T, R, C > | identity () |
Retrieve the identity matrix. | |
Represents a row-major matrix with R rows and C columns.
+The value type of a matrix is typically a float or double, but for this implementation it is templated on T.
+
+
|
+ +default | +
Default-intialised matrices have indeterminate values.
+To initialise the values, assign them or simply assign to matrix<T, R, C>::identity().
+ +tz::matrix< T, R, C >::matrix | +( | +std::array< std::array< T, R >, C > | +data | ) | ++ |
Initialise a matrix from a multi-dimensional array.
+data | An array of array of values to construct the row-major matrix. |
+
|
+ +inlinestaticconstexpr | +
Retrieve the identity matrix.
+High values (1) are constructed via T{1} and low values (0) are constructed via T{0}.
matrix< T, R, C > tz::matrix< T, R, C >::inverse | +( | +) | +const | +
Retrieves a new matrix such that the resultant matrix could be multiplied by the original matrix to result in the identity matrix (See matrix<T, R, C>::identity()).
+If the current matrix is orthogonal, it is an optimisation to prefer the use of matrix<T, R, C>::transpose() instead.
T & tz::matrix< T, R, C >::operator() | +( | +std::size_t | +row, | +
+ | + | std::size_t | +column | +
+ | ) | ++ |
Retrieve the element at the given row and column of the matrix.
+Precondition: row < R && column < C. Otherwise, this will assert and invoke UB.
row | The index of the row to retrieve. For example, row 0 will retrieve an element in the top-most row. |
column | The index of the column. For example, column 0 will retrieve an element in the left-most row. |
const T & tz::matrix< T, R, C >::operator() | +( | +std::size_t | +row, | +
+ | + | std::size_t | +column | +
+ | ) | +const | +
Retrieve the element at the given row and column of the matrix.
+Precondition: row < R && column < C. Otherwise, this will assert and invoke UB.
row | The index of the row to retrieve. For example, row 0 will retrieve an element in the top-most row. |
column | The index of the column. For example, column 0 will retrieve an element in the left-most row. |
matrix< T, R, C > tz::matrix< T, R, C >::operator* | +( | +const matrix< T, R, C > & | +matrix | ) | +const | +
Multiply the given matrix with the current matrix.
+This is done naively and is unsuitable for very large values of R or C.
matrix | matrix to multiply with the current matrix. |
tz::vector< T, R > tz::matrix< T, R, C >::operator* | +( | +const tz::vector< T, C > & | +vec | ) | +const | +
Multiply the given vector (column-matrix) with the current matrix and return the resultant vector (row-matrix).
+vec | Column matrix to multiply with the current matrix. |
matrix< T, R, C > tz::matrix< T, R, C >::operator* | +( | +T | +scalar | ) | +const | +
Multiply the scalar value with each element of the current matrix.
+scalar | Value to multiply with each element. |
matrix< T, R, C > & tz::matrix< T, R, C >::operator*= | +( | +const matrix< T, R, C > & | +matrix | ) | ++ |
Multiply the given matrix with the current matrix.
+This is done naively and is unsuitable for very large values of R or C.
matrix | matrix to multiply with the current matrix. |
matrix< T, R, C > & tz::matrix< T, R, C >::operator*= | +( | +T | +scalar | ) | ++ |
Multiply the scalar value with each element of the current matrix.
+scalar | Value to multiply with each element. |
matrix< T, R, C > tz::matrix< T, R, C >::operator+ | +( | +const matrix< T, R, C > & | +matrix | ) | +const | +
Add the given matrix to the current matrix.
+This is done by adding the current value in the same row and column.
matrix | matrix to add to the current matrix. |
matrix< T, R, C > tz::matrix< T, R, C >::operator+ | +( | +T | +scalar | ) | +const | +
Add the scalar value to each element of the current matrix.
+scalar | Value to add to each element. |
matrix< T, R, C > & tz::matrix< T, R, C >::operator+= | +( | +const matrix< T, R, C > & | +matrix | ) | ++ |
Add the given matrix to the current matrix.
+This is done by adding the current value in the same row and column.
matrix | matrix to add to the current matrix. |
matrix< T, R, C > & tz::matrix< T, R, C >::operator+= | +( | +T | +scalar | ) | ++ |
Add the scalar value to each element of the current matrix.
+scalar | Value to add to each element. |
matrix< T, R, C > tz::matrix< T, R, C >::operator- | +( | +const matrix< T, R, C > & | +matrix | ) | +const | +
Subtract the given matrix from the current matrix.
+This is done by subtracting the current value in the same row and column.
matrix | matrix to subtract from the current matrix. |
matrix< T, R, C > tz::matrix< T, R, C >::operator- | +( | +T | +scalar | ) | +const | +
Subtract the scalar value from each element of the current matrix.
+scalar | Value to subtract from each element. |
matrix< T, R, C > & tz::matrix< T, R, C >::operator-= | +( | +const matrix< T, R, C > & | +matrix | ) | ++ |
Subtract the given matrix from the current matrix.
+This is done by subtracting the current value in the same row and column.
matrix | matrix to subtract from the current matrix. |
matrix< T, R, C > & tz::matrix< T, R, C >::operator-= | +( | +T | +scalar | ) | ++ |
Subtract the scalar value from each element of the current matrix.
+scalar | Value to subtract from each element. |
bool tz::matrix< T, R, C >::operator== | +( | +const matrix< T, R, C > & | +matrix | ) | +const | +
Equate the given matrix with the current.
+Matrices are equal if-and-only-if each element at a given row and column of the current matrix is equal to the corresponding value of the given matrix.
matrix | matrix to equate with the current matrix. |
bool tz::matrix< T, R, C >::operator== | +( | +T | +scalar | ) | +const | +
Equate the given scalar with each value of the matrix.
+mymatrix == T{5}
shall return if-and-only-if each element of mymatrix is equal to 'T{5}'. If no such comparison exists, then the program is ill-formed.
scalar | Value to equate with each value of the current matrix. |
matrix< T, R, C >::Row & tz::matrix< T, R, C >::operator[] | +( | +std::size_t | +row_idx | ) | ++ |
Retrieve the i'th row of the matrix.
+Precondition: row_idx < R. Otherwise, this will assert and invoke UB.
row_idx | The index of the row to retrieve. For example, row_idx 0 will retrieve the top row. |
const matrix< T, R, C >::Row & tz::matrix< T, R, C >::operator[] | +( | +std::size_t | +row_idx | ) | +const | +
Retrieve the i'th row of the matrix.
+Precondition: row_idx < R. Otherwise, this will assert and invoke UB.
row_idx | The index of the row to retrieve. For example, row_idx 0 will retrieve the top row. |
matrix< T, R, C > tz::matrix< T, R, C >::transpose | +( | +) | +const | +
Create a copy of the current matrix, and transpose the copy.
+Transposing the matrix is to flip the matrix values over its diagonal. Note: If mymatrix
is orthogonal, then mymatrix.transpose() == mymatrix.inverse()
.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
An allocator which always returns nullptr. + More...
+ +#include <null.hpp>
An allocator which always returns nullptr.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
todo: document a two-pass (compute gpu command generation => render) mesh renderer. + More...
+ +#include <anim.hpp>
+Data Structures | |
struct | stored_assets |
todo: document a two-pass (compute gpu command generation => render) mesh renderer.
+pbr?
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Data Structures | |
struct | asset_package |
struct | override_package |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
todo: document a two-pass (compute gpu command generation => render) mesh renderer. + More...
+ +#include <mesh.hpp>
+Data Structures | |
struct | object_init_data |
struct | object_out_data |
todo: document a two-pass (compute gpu command generation => render) mesh renderer.
+pbr?
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
An allocator which has its own fixed-size buffer on the stack from which memory is sub-allocated. + More...
+ +#include <stack.hpp>
An allocator which has its own fixed-size buffer on the stack from which memory is sub-allocated.
+Aside from operating on its own stack arena, a stack allocator behaves identically to a linear_allocator.
+stack_allocators are excellent candidates for fallback allocators. fallback_allocator<stack_allocator<X>, mallocator>
allows you to have small-size optimisation for free, for example.
S | Size of local automatic storage. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents a hierarchy of 3D transformations, with a payload applied. + More...
+ +#include <transform_hierarchy.hpp>
+Public Types | |
enum class | remove_strategy { + patch_children_to_parent +, + remove_children +, + detach_children + + } |
+using | node = transform_node< T > |
Node type. | |
+Public Member Functions | |
+ | transform_hierarchy ()=default |
Create a new, empty hierarchy. | |
std::size_t | size () const |
Retrieves the number of nodes within the hierarchy. | |
bool | empty () const |
Query as to whether the hierarchy has nodes. | |
void | clear () |
Remove all nodes from the hierarchy, emptying it. | |
std::vector< unsigned int > | get_root_node_ids () const |
Retrieve a vector containing indices corresponding to all the root nodes. | |
std::optional< unsigned int > | find_node (const T &value) const |
Attempt to retrieve the index of the node whose value matches the parameter. | |
std::optional< unsigned int > | find_node_if (tz::function< bool, const T & > auto predicate) const |
Attempt to retrieve the index of the node whose value satisfies the provided predicate. | |
unsigned int | add_node (tz::trs local_transform={}, T data={}, std::optional< unsigned int > parent=std::nullopt) |
Add a new node to the hierarchy. | |
void | remove_node (unsigned int node_id, remove_strategy strategy) |
Remove a node. | |
unsigned int | add_hierarchy (const transform_hierarchy< T > &tree) |
Add all of the nodes of another hierarchy to this hierarchy, preserving structure. | |
unsigned int | add_hierarchy_onto (const transform_hierarchy< T > &tree, unsigned int node_id) |
Add all of the nodes of another hierarchy onto a particular node of this hierarchy, preserving structure. | |
transform_hierarchy< T > | export_node (unsigned int id) const |
Take a copy of a particular node, and create a new hierarchy with that as the only root node. | |
const transform_node< T > & | get_node (unsigned int id) const |
Retrieve the node corresponding to the given index. | |
tz::trs | get_global_transform (unsigned int id) const |
Retrieve the global transform of the node corresponding to the provided id. | |
void | iterate_children (unsigned int id, tz::action< unsigned int > auto callback) const |
Invoke a callback for each child of the node corresponding to id . | |
void | iterate_descendants (unsigned int id, tz::action< unsigned int > auto callback) const |
Invoke a callback for each descendent of the node corresponding to id . | |
void | iterate_ancestors (unsigned int id, tz::action< unsigned int > auto callback) const |
Invoke a callback for each ancestor of the node corresponding to id . | |
void | iterate_nodes (tz::action< unsigned int > auto callback) const |
Invoke a callback for each node within the hierarchy, in-order. | |
Represents a hierarchy of 3D transformations, with a payload applied.
+Useful to represent a scene graph, or nodes for 3D skeletal animation.
+
+
|
+ +strong | +
unsigned int tz::transform_hierarchy< T >::add_hierarchy | +( | +const transform_hierarchy< T > & | +tree | ) | ++ |
Add all of the nodes of another hierarchy to this hierarchy, preserving structure.
+tree | Hierarchy whose nodes should be copied into this hierarchy. |
tree.get_node(i)
corresponds to this->get_node(i+n)
, where n
is the return value of this method. unsigned int tz::transform_hierarchy< T >::add_hierarchy_onto | +( | +const transform_hierarchy< T > & | +tree, | +
+ | + | unsigned int | +node_id | +
+ | ) | ++ |
Add all of the nodes of another hierarchy onto a particular node of this hierarchy, preserving structure.
+tree | Hierarchy whose nodes should be copied into this hierarchy. |
node_id | A valid node index for this hierarchy, where all the nodes of the provided hierarchy will be attached to. |
tree.get_node(i)
corresponds to this->get_node(i+n)
, where n
is the return value of this method. unsigned int tz::transform_hierarchy< T >::add_node | +( | +tz::trs | +local_transform = {} , |
+
+ | + | T | +data = {} , |
+
+ | + | std::optional< unsigned int > | +parent = std::nullopt |
+
+ | ) | ++ |
Add a new node to the hierarchy.
+local_transform | Local transform of the node, local to its parent (if it has one). You can change this at any time. |
data | Data payload of the node. You can change this at any time. |
parent | Optional index of the parent. If the node has no parent, omit this parameter, or set it to nullopt . |
void tz::transform_hierarchy< T >::clear | +( | +) | ++ |
Remove all nodes from the hierarchy, emptying it.
+
+
|
+ +inline | +
Query as to whether the hierarchy has nodes.
+this->size() == 0
, otherwise false. transform_hierarchy< T > tz::transform_hierarchy< T >::export_node | +( | +unsigned int | +id | ) | +const | +
Take a copy of a particular node, and create a new hierarchy with that as the only root node.
+id | Index corresponding to the node which should become the root node of the resultant hierarchy. |
id
is the root node, aswell as copies all of its children and descendants. std::optional< unsigned int > tz::transform_hierarchy< T >::find_node | +( | +const T & | +value | ) | +const | +
Attempt to retrieve the index of the node whose value matches the parameter.
+value | Data value whose node should be retrieved. |
std::optional< unsigned int > tz::transform_hierarchy< T >::find_node_if | +( | +tz::function< bool, const T & > auto | +predicate | ) | +const | +
Attempt to retrieve the index of the node whose value satisfies the provided predicate.
+predicate | Predicate of the signature booL(const T&) that returns true if the value of the node is what you're looking for. |
tz::trs tz::transform_hierarchy< T >::get_global_transform | +( | +unsigned int | +id | ) | +const | +
Retrieve the global transform of the node corresponding to the provided id.
+id | Index corresponding to the node to calculate the global transform. |
id
'th node. const transform_node< T > & tz::transform_hierarchy< T >::get_node | +( | +unsigned int | +id | ) | +const | +
Retrieve the node corresponding to the given index.
+id | Index corresponding to the node to retrieve. |
id
< this->size()
, otherwise the behaviour is undefined. std::vector< unsigned int > tz::transform_hierarchy< T >::get_root_node_ids | +( | +) | +const | +
Retrieve a vector containing indices corresponding to all the root nodes.
+void tz::transform_hierarchy< T >::iterate_ancestors | +( | +unsigned int | +id, | +
+ | + | tz::action< unsigned int > auto | +callback | +
+ | ) | +const | +
Invoke a callback for each ancestor of the node corresponding to id
.
An ancestor is a node that is either a parent, grandparent etc... of the provided node.
id | Index corresponding to the node whose ancestors to iterate over. |
callback | Callback to be invoked with the current ancestor's node index. Guaranteed to be invoked on the initial caller thread. |
void tz::transform_hierarchy< T >::iterate_children | +( | +unsigned int | +id, | +
+ | + | tz::action< unsigned int > auto | +callback | +
+ | ) | +const | +
Invoke a callback for each child of the node corresponding to id
.
id | Index corresponding to the node whose children to iterate over. |
callback | Callback to be invoked with the current child's node index. Guaranteed to be invoked on the initial caller thread. |
void tz::transform_hierarchy< T >::iterate_descendants | +( | +unsigned int | +id, | +
+ | + | tz::action< unsigned int > auto | +callback | +
+ | ) | +const | +
Invoke a callback for each descendent of the node corresponding to id
.
A descendent is a node that is either a child, grandchild etc... of the provided node.
id | Index corresponding to the node whose descendants to iterate over. |
callback | Callback to be invoked with the current descendant's node index. Guaranteed to be invoked on the initial caller thread. |
void tz::transform_hierarchy< T >::iterate_nodes | +( | +tz::action< unsigned int > auto | +callback | ) | +const | +
Invoke a callback for each node within the hierarchy, in-order.
+Depth-first traversal.
callback | Callback to be invoked exactly once for each node in the hierarchy. Guaranteed to be invoked on the initial caller thread. |
void tz::transform_hierarchy< T >::remove_node | +( | +unsigned int | +node_id, | +
+ | + | remove_strategy | +strategy | +
+ | ) | ++ |
Remove a node.
+node_id | Node corresponding to the id that should be removed. |
strategy | Describes behaviour of how the remove should affect children. |
std::size_t tz::transform_hierarchy< T >::size | +( | +) | +const | +
Retrieves the number of nodes within the hierarchy.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Public Member Functions | |
template<tz::number... Ts> | |
constexpr | vector (Ts &&... ts) |
Construct a vector directly using a variadic parameter pack value. | |
+constexpr | vector (std::array< T, S > data) |
Construct a vector using an existing array of appropriate size. | |
+ | vector ()=default |
Default-constructed vectors have indeterminate values. | |
const T & | operator[] (std::size_t idx) const |
Retrieve the element value at the given index. | |
T & | operator[] (std::size_t idx) |
Retrieve the element value at the given index. | |
vector< T, S > & | operator+= (const vector< T, S > &rhs) |
Add each element of the given vector to the corresponding element of the current vector. | |
vector< T, S > | operator+ (const vector< T, S > &rhs) const |
Create a copy of the current vector, add each element of the given vector to the corresponding element of the copied vector and return the result. | |
vector< T, S > & | operator-= (const vector< T, S > &rhs) |
Subtract each element of the given vector from the corresponding element of the current vector. | |
vector< T, S > | operator- (const vector< T, S > &rhs) const |
Create a copy of the current vector, subtract each element of the given vector from the corresponding element of the copied vector and return the result. | |
vector< T, S > & | operator*= (T scalar) |
Multiply each element of the current vector by the given value. | |
vector< T, S > | operator* (T scalar) const |
Create a copy of the current vector, multiply each element of the copied vector by the given value, and return the result. | |
vector< T, S > & | operator*= (const vector< T, S > &rhs) |
Multiply each element of the current vector by the corresponding element of the parameter vector. | |
vector< T, S > | operator* (const vector< T, S > &rhs) const |
Create a copy of the current vector, multiply each element of the copied vector with the corresponding element of the parameter vector, and return the result. | |
vector< T, S > & | operator/= (T scalar) |
Divide each element of the current vector by the given value. | |
vector< T, S > | operator/ (T scalar) const |
Create a copy of the current vector, divide each element of the copied vector by the given value, and return the result. | |
bool | operator== (const vector< T, S > &rhs) const |
Equate the current vector with the given vector. | |
std::span< const T > | data () const |
Retrieve a pointer to the vector data. | |
std::span< T > | data () |
Retrieve a pointer to the vector data. | |
T | dot (const vector< T, S > &rhs) const |
Compute a dot-product (otherwise known as the scalar-product) of the current vector against another given vector. | |
T | length () const |
Retrieve the magnitude of the current vector. | |
void | normalise () |
Normalise the vector. | |
vector< T, S > | normalised () const |
Create a copy of the vector, normalise it and return the result. | |
template<int... indices> | |
vector< T, sizeof...(indices)> | swizzle () const |
Perform vector swizzling. | |
vector< T, S+1 > | with_more (T &&end) const |
Create a new vector, with a single extra element appended to the end. | |
template<std::size_t S2> | |
vector< T, S+S2 > | with_more (const vector< T, S2 > &end) const |
Create a new vector, with another vector appended to the end. | |
template<tz::number X, typename = std::enable_if_t<!std::is_same_v<T, X>>> | |
operator vector< X, S > () const | |
Perform a conversion to a vector of different numeric type. | |
+Static Public Member Functions | |
+static constexpr vector< T, S > | zero () |
Create a vector filled entirely with zeros. | |
+static constexpr vector< T, S > | filled (T t) |
Create a vector filled entirely with a given value. | |
+
|
+ +inlineconstexpr | +
Construct a vector directly using a variadic parameter pack value.
+Static Precondition: sizeof...(Ts) == S, otherwise the program is ill-formed.
+ +std::span< T > tz::vector< T, S >::data | +( | +) | ++ |
Retrieve a pointer to the vector data.
+This points to the first element of an array of size S.
std::span< const T > tz::vector< T, S >::data | +( | +) | +const | +
Retrieve a pointer to the vector data.
+This points to the first element of an array of size S.
T tz::vector< T, S >::dot | +( | +const vector< T, S > & | +rhs | ) | +const | +
Compute a dot-product (otherwise known as the scalar-product) of the current vector against another given vector.
+rhs | The other given vector. |
T tz::vector< T, S >::length | +( | +) | +const | +
Retrieve the magnitude of the current vector.
+void tz::vector< T, S >::normalise | +( | +) | ++ |
Normalise the vector.
+This is equivalent to dividing the vector by its length(). Note: This modifies the current vector. To retrieve a modified copy and leave the original unchanged, see vector<T, S>::normalised().
+ +vector< T, S > tz::vector< T, S >::normalised | +( | +) | +const | +
Create a copy of the vector, normalise it and return the result.
+tz::vector< T, S >::operator vector< X, S > | +( | +) | +const | +
Perform a conversion to a vector of different numeric type.
+Numeric conversion is performed via explicit conversion.
+ +vector< T, S > tz::vector< T, S >::operator* | +( | +const vector< T, S > & | +rhs | ) | +const | +
Create a copy of the current vector, multiply each element of the copied vector with the corresponding element of the parameter vector, and return the result.
+rhs | Vector whose elements should be multiplied with ours. |
vector< T, S > tz::vector< T, S >::operator* | +( | +T | +scalar | ) | +const | +
Create a copy of the current vector, multiply each element of the copied vector by the given value, and return the result.
+scalar | Value to multiply by each element of the current vector. |
vector< T, S > & tz::vector< T, S >::operator*= | +( | +const vector< T, S > & | +rhs | ) | ++ |
Multiply each element of the current vector by the corresponding element of the parameter vector.
+rhs | Vector whose elements should be multiplied with ours. |
vector< T, S > & tz::vector< T, S >::operator*= | +( | +T | +scalar | ) | ++ |
Multiply each element of the current vector by the given value.
+scalar | Value to multiply by each element of the current vector. |
vector< T, S > tz::vector< T, S >::operator+ | +( | +const vector< T, S > & | +rhs | ) | +const | +
Create a copy of the current vector, add each element of the given vector to the corresponding element of the copied vector and return the result.
+rhs | vector whose elemens need be added to the current vector. |
vector< T, S > & tz::vector< T, S >::operator+= | +( | +const vector< T, S > & | +rhs | ) | ++ |
Add each element of the given vector to the corresponding element of the current vector.
+rhs | vector whose elements need be added to the current vector. |
vector< T, S > tz::vector< T, S >::operator- | +( | +const vector< T, S > & | +rhs | ) | +const | +
Create a copy of the current vector, subtract each element of the given vector from the corresponding element of the copied vector and return the result.
+rhs | vector whose elemens need be subtracted from the current vector. |
vector< T, S > & tz::vector< T, S >::operator-= | +( | +const vector< T, S > & | +rhs | ) | ++ |
Subtract each element of the given vector from the corresponding element of the current vector.
+rhs | vector whose elements need be subtracted from the current vector. |
vector< T, S > tz::vector< T, S >::operator/ | +( | +T | +scalar | ) | +const | +
Create a copy of the current vector, divide each element of the copied vector by the given value, and return the result.
+scalar | Value to divide by each element of the current vector. |
vector< T, S > & tz::vector< T, S >::operator/= | +( | +T | +scalar | ) | ++ |
Divide each element of the current vector by the given value.
+scalar | Value to divide by each element of the current vector. |
bool tz::vector< T, S >::operator== | +( | +const vector< T, S > & | +rhs | ) | +const | +
Equate the current vector with the given vector.
+rhs | Given vector to compare with the current vector. |
T & tz::vector< T, S >::operator[] | +( | +std::size_t | +idx | ) | ++ |
Retrieve the element value at the given index.
+Precondition: idx < S. Otherwise, this will assert and invoke UB.
const T & tz::vector< T, S >::operator[] | +( | +std::size_t | +idx | ) | +const | +
Retrieve the element value at the given index.
+Precondition: idx < S. Otherwise, this will assert and invoke UB.
vector< T, sizeof...(indices)> tz::vector< T, S >::swizzle | +( | +) | +const | +
Perform vector swizzling.
+Creates a new vector of sizeof...(indices)
dimensions. The i'th value of the new vector corresponds to the value at the i'th index within the parameter pack of the original vector.
Example: tz::vec3{1.0f, 2.0f, 3.0f}.swizzle<0, 1, 0, 1>() == tz::vec4{1.0f, 2.0f, 1.0f, 2.0f}
indices | Variable number of integer indices. |
indices
is less than or equal to S
, being the number of dimensions of the original vector. Otherwise, the behaviour is undefined. vector< T, S+S2 > tz::vector< T, S >::with_more | +( | +const vector< T, S2 > & | +end | ) | +const | +
Create a new vector, with another vector appended to the end.
+Example: tz::vec2{0.0f, 1.0f}.with_more(tz::vec3{2.0f, 3.0f, 4.0f}) == tz::vector<float, 5>{0.0f, 1.0f, 2.0f, 3.0f, 4.0f}
S2 | numeric of dimensions of the appendage vector. |
end | vector to be appended to the end of the resultant vector. |
vector< T, S+1 > tz::vector< T, S >::with_more | +( | +T && | +end | ) | +const | +
Create a new vector, with a single extra element appended to the end.
+Example: tz::vec2{1.0f, 2.0f}.with_more(3.0f) == tz::vec3{1.0f, 2.0f, 3.0f}
end | Value to be appended to the end of the resultant vector. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Just like a tz::function, except will never return anything. +More...
+ +#include <types.hpp>
Just like a tz::function, except will never return anything.
+This makes for cleaner syntax.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
An integral type or a floating-point type (including char and bool). +More...
+ +#include <types.hpp>
An integral type or a floating-point type (including char and bool).
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
function concept which constrains F to any type that can be called with Args...
to produce a Result.
+More...
#include <types.hpp>
function concept which constrains F to any type that can be called with Args...
to produce a Result.
This is backend-agnostic, meaning that any invocable backend (func ptr, lambda, functor, you name it...) can be used so long as it matches the signature Result(Args...).
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Named Requirement: device Implemented by tz_gl2_device. +More...
+ +#include <device.hpp>
Named Requirement: device Implemented by tz_gl2_device.
+device types are types which:
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Named requirement for a renderer. +More...
+ +#include <renderer.hpp>
Named requirement for a renderer.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
A number is any arithmetic type excluding char and bool. +More...
+ +#include <types.hpp>
A number is any arithmetic type excluding char and bool.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Represents an API for a window. +More...
+ +#include <window.hpp>
Represents an API for a window.
+wsi::window
is implemented separately per platform, but all implementations are guaranteed to satisfy this api.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
algorithms | |
data | |
job | |
memory | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
core | |
dbgui | |
gl | |
io | |
lua | |
ren | |
wsi | |
+Files | |
tz.hpp | |
tz.inl | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Files | |
buffer.hpp | |
draw.hpp | |
framebuffer.hpp | |
image.hpp | |
image_format.hpp | |
renderbuffer.hpp | |
sampler.hpp | |
shader.hpp | |
tz_opengl.hpp | |
vertex_array.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
shaders | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
hardware | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
api | |
+Files | |
keyboard.hpp | |
monitor.hpp | |
mouse.hpp | |
window.hpp | |
wsi.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
tz | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
api | |
+Files | |
job.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Files | |
adapter.hpp | |
fallback.hpp | |
linear.hpp | |
malloc.hpp | |
null.hpp | |
stack.hpp | |
stack.inl | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
detail | |
+Files | |
component.hpp | |
convert.hpp | |
convert.inl | |
device2.hpp | |
renderer2.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
detail | |
+Files | |
component.hpp | |
convert.hpp | |
convert.inl | |
device.hpp | |
renderer.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
detail | |
+Files | |
keyboard.hpp | |
keyboard.inl | |
monitor.hpp | |
window.hpp | |
wsi_windows.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
gl | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
threadpool_lfq | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
api | |
declare | |
+Files | |
component.hpp | |
device.hpp | |
draw.hpp | |
imported_shaders.hpp | |
output.hpp | |
renderer.hpp | |
resource.hpp | |
resource.inl | |
shader.hpp | |
tz_gl.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
shaders | |
+Files | |
anim.hpp | |
animation.hpp | |
mesh.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Directories | |
allocators | |
+Files | |
clone.hpp | |
maybe_owned_ptr.hpp | |
maybe_owned_ptr.inl | |
memblk.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Files | |
component.hpp | |
device.hpp | |
device.inl | |
output.hpp | |
renderer.hpp | |
resource.hpp | |
schedule.hpp | |
shader.hpp | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
A grab-bag of common helpers used frequently in other engine modules. +More...
++Modules | |
Algorithms | |
Documentation for custom Topaz algorithms. | |
Data | |
Documentation for some niché data structures. | |
Job System | |
Documentation for job-system. | |
Memory Utility | |
Documentation for a grab-bag of memory helper structs, classes and functions. | |
+Data Structures | |
class | tz::callback< Args > |
Represents a centralised storage/management of callback functions of a common signature void(Args...) . More... | |
struct | tz::transform_node< T > |
Represents a node within a transform hierarchy. More... | |
class | tz::transform_hierarchy< T > |
Represents a hierarchy of 3D transformations, with a payload applied. More... | |
class | tz::vector< T, S > |
struct | tz::version |
Versions consist of a major, minor, patch and a version_type. More... | |
struct | tz::engine_info |
Represents information about the current engine used. More... | |
struct | tz::game_info |
Contains basic information about the target game/application. More... | |
class | tz::matrix< T, R, C > |
Represents a row-major matrix with R rows and C columns. More... | |
struct | tz::memblk |
A non-owning, contiguous block of memory. More... | |
class | tz::duration |
Represents some duration, expressable as a quantity of most time metrics. More... | |
class | tz::delay |
An object which is falsy until a certain amount of time has passed since construction. More... | |
struct | tz::initialise_info |
Specifies everything needed to initialise the engine. More... | |
+Typedefs | |
+using | tz::callback_handle = tz::handle< detail::callback_type > |
Opaque handle representing a reference to an existing tz::callback function. | |
+Enumerations | |
enum class | tz::application_flag { + application_flag::no_graphics +, + application_flag::no_dbgui +, + application_flag::window_hidden +, + application_flag::window_noresize +, + application_flag::window_transparent + + } |
Represents custom functionality to be enabled/disabled during initialisation. More... | |
+Functions | |
version | tz::get_version () |
Retrieve the current version of Topaz. | |
template<typename... Args> | |
void | tz::assert (bool condition, detail::format_string fmt="<No message>", Args &&... args) |
Assert on a condition. | |
template<typename... Args> | |
void | tz::error (detail::format_string fmt="<No message>", Args &&... args) |
Breakpoint if a debugger is present. | |
template<typename... Args> | |
void | tz::report (detail::format_string fmt, Args &&... args) |
Print out the formatted message to standard output, including source location information. | |
mat4 | tz::translate (tz::vec3 position) |
Generate a matrix which performs the following transformations at once: | |
mat4 | tz::rotate (tz::vec3 rotation) |
Generates a matrix which performs the following three transformations, in chronological order: | |
mat4 | tz::scale (tz::vec3 scale) |
Generates a matrix which performs the following transformations at once: | |
mat4 | tz::model (tz::vec3 position, tz::vec3 rotation, tz::vec3 scale) |
Generates a model matrix using the given position, euler-rotation and scale vectors. | |
mat4 | tz::view (tz::vec3 position, tz::vec3 rotation) |
Generates a view matrix using the given view position and rotation. | |
mat4 | tz::perspective (float fov, float aspect_ratio, float near, float far) |
Generates a perspective projection matrix using the given camera properties. | |
mat4 | tz::orthographic (float left, float right, float top, float bottom, float near, float far) |
Generates an orthographic projection matrix using the given camera properties. | |
+duration | tz::system_time () |
Retrieve a duration corresponding to the time passed since epoch. | |
void | tz::initialise (initialise_info init={}) |
Initialise Topaz, creating a main application window. | |
void | tz::terminate () |
Terminate Topaz. | |
void | tz::begin_frame () |
Begin a new frame. | |
void | tz::end_frame () |
End the current frame. | |
tz::wsi::window & | tz::window () |
Retrieve the application window. | |
bool | tz::is_initialised () |
Query as to whether Topaz is initialised. | |
engine_info | info () |
Retrieves the engine_info for this specific build of Topaz. | |
A grab-bag of common helpers used frequently in other engine modules.
+A collection of platform-agnostic core interfaces.
+Notable features:
using tz::mat4 = typedef matrix<float, 4, 4> | +
A 4x4 row-major matrix of floats.
+ +
+
|
+ +strong | +
Represents custom functionality to be enabled/disabled during initialisation.
+void tz::assert | +( | +bool | +condition, | +
+ | + | detail::format_string | +fmt = "<No message>" , |
+
+ | + | Args &&... | +args | +
+ | ) | ++ |
Assert on a condition.
+If the condition is false, tz::error
is invoked. Only works on debug builds (aka if TZ_DEBUG
).
void tz::begin_frame | +( | +) | ++ |
Begin a new frame.
+void tz::end_frame | +( | +) | ++ |
End the current frame.
+void tz::error | +( | +detail::format_string | +fmt = "<No message>" , |
+
+ | + | Args &&... | +args | +
+ | ) | ++ |
Breakpoint if a debugger is present.
+If no debugger is present, terminate the application with the given message. Only works on debug builds (aka if TZ_DEBUG
).
version tz::get_version | +( | +) | ++ |
Retrieve the current version of Topaz.
+Note that the build-config/render-api information is not contained here. For that, you'll want engine_info
+ +
+
|
+ +related | +
Retrieves the engine_info for this specific build of Topaz.
+void tz::initialise | +( | +initialise_info | +init = {} | ) | ++ |
Initialise Topaz, creating a main application window.
+The main application window is available via tz::window() from now until tz::terminate() is invoked.
init | Information about how the application should be initialised. |
bool tz::is_initialised | +( | +) | ++ |
Query as to whether Topaz is initialised.
+tz::initialise
has been invoked and tz::terminate()
has not yet been invoked. Otherwise, returns false. mat4 tz::model | +( | +tz::vec3 | +position, | +
+ | + | tz::vec3 | +rotation, | +
+ | + | tz::vec3 | +scale | +
+ | ) | ++ |
Generates a model matrix using the given position, euler-rotation and scale vectors.
+Note: This can be used to transform positions within model-space to world-space.
+ +mat4 tz::orthographic | +( | +float | +left, | +
+ | + | float | +right, | +
+ | + | float | +top, | +
+ | + | float | +bottom, | +
+ | + | float | +near, | +
+ | + | float | +far | +
+ | ) | ++ |
Generates an orthographic projection matrix using the given camera properties.
+The properties generate a cube-shaped projection.
+ +mat4 tz::perspective | +( | +float | +fov, | +
+ | + | float | +aspect_ratio, | +
+ | + | float | +near, | +
+ | + | float | +far | +
+ | ) | ++ |
Generates a perspective projection matrix using the given camera properties.
+The properties generate a regular pyramidal-frustum-shaped projection. Note: This can be used to transform positions within camera-space to clip-space.
+ +void tz::report | +( | +detail::format_string | +fmt, | +
+ | + | Args &&... | +args | +
+ | ) | ++ |
Print out the formatted message to standard output, including source location information.
+Only works on debug builds.
+ +mat4 tz::rotate | +( | +tz::vec3 | +rotation | ) | ++ |
Generates a matrix which performs the following three transformations, in chronological order:
+mat4 tz::scale | +( | +tz::vec3 | +scale | ) | ++ |
Generates a matrix which performs the following transformations at once:
+void tz::terminate | +( | +) | ++ |
Terminate Topaz.
+Just how tz::initialise() automatically spawns the main window, terminate
also automatically destroys the window.
mat4 tz::translate | +( | +tz::vec3 | +position | ) | ++ |
Generate a matrix which performs the following transformations at once:
+mat4 tz::view | +( | +tz::vec3 | +position, | +
+ | + | tz::vec3 | +rotation | +
+ | ) | ++ |
Generates a view matrix using the given view position and rotation.
+Note: This can be used to transform positions within world-space to camera-space.
+ +tz::wsi::window & tz::window | +( | +) | ++ |
Retrieve the application window.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for custom Topaz algorithms. +More...
++Data Structures | |
struct | tz::static_for_t< N, N > |
Compute a compile-time for-loop. More... | |
+Functions | |
template<typename needle , typename... haystack> | |
constexpr bool | tz::static_find () |
Check if a needle is found in a haystack at compile-time. | |
Documentation for custom Topaz algorithms.
+These do not attempt to replace standard library algorithms, but in niché circumstances these may come in useful.
+
+
|
+ +constexpr | +
Check if a needle is found in a haystack at compile-time.
+needle | needle type to check exists within haystack... |
haystack | Parameter pack which may or may not contain the type needle. |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for some niché data structures. +More...
++Data Structures | |
class | tz::basic_list< T, Allocator > |
Custom list, feature subset of std::vector . More... | |
class | tz::enum_field< E > |
Container for enum values, useful for vintage bitfield types. More... | |
class | tz::grid_view< T, N > |
A view into an array representing a flattened grid of data. More... | |
class | tz::PolymorphicList< T, Allocator > |
Documentation for some niché data structures.
+These do not attempt to replace standard library containers - you should continue using those for the most part, although often one of these containers may be preferable.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for job-system. +More...
++Data Structures | |
struct | tz::execution_info |
Additional optional data about how a job is to be executed. More... | |
+Typedefs | |
+using | tz::job_handle_data = tz::handle< detail::job_handle_tag > |
Represents a job that has begun execution within a job_system_type. | |
using | tz::job_t = std::function< void()> |
Represents a job. | |
using | tz::job_system_t = tz::impl::job_system_threadpool_lfq |
Underlying job system. | |
+Functions | |
+job_system_t & | tz::job_system () |
Retrieve the global job system. | |
Documentation for job-system.
+using tz::job_system_t = typedef tz::impl::job_system_threadpool_lfq | +
Underlying job system.
+See tz::job_system_type for API.
+ +using tz::job_t = typedef std::function<void()> | +
Represents a job.
+Jobs have no arguments and no return value.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for a grab-bag of memory helper structs, classes and functions. +More...
++Modules | |
Allocators | |
Documentation for bespoke memory allocators. | |
Documentation for a grab-bag of memory helper structs, classes and functions.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for bespoke memory allocators. +More...
++Data Structures | |
class | tz::allocator_adapter< T, A > |
A meta-allocator which allows a tz allocator to be used as if it were a std::allocator . More... | |
class | tz::fallback_allocator< P, S > |
Implements tz::allocator. More... | |
class | tz::linear_allocator |
An allocator which operates on a pre-allocated buffer of variable size. More... | |
class | tz::mallocator |
Implements tz:allocator. More... | |
class | tz::null_allocator |
An allocator which always returns nullptr. More... | |
class | tz::stack_allocator< S > |
An allocator which has its own fixed-size buffer on the stack from which memory is sub-allocated. More... | |
Documentation for bespoke memory allocators.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Modules | |
Core Functionality | |
A grab-bag of common helpers used frequently in other engine modules. | |
Debug UI | |
On debug builds, debug-ui is always displayed on the main window above anything being rendered. | |
Graphics Library | |
Hardware-accelerated 3D graphics library. | |
Lua Integration | |
Run Lua code from within Topaz C++. | |
Window System Integration | |
Documentation for functionality related to windowing, peripherals and input. | |
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
On debug builds, debug-ui is always displayed on the main window above anything being rendered. +More...
++Functions | |
void | tz::dbgui::run (tz::action auto action) |
As dbgui is only available on TZ_DEBUG, calling ImGui functions directly in game-code will yield runtime errors on non-debug builds. | |
game_menu_callback_type & | tz::dbgui::game_menu () |
Retrieve the game menu callback. | |
bool | tz::dbgui::claims_keyboard () |
Query as to whether the debug-ui is currently using the keyboard input. | |
bool | tz::dbgui::claims_mouse () |
Query as to whether the debug-ui is currently using the mouse input. | |
On debug builds, debug-ui is always displayed on the main window above anything being rendered.
+When debug-ui is enabled, this API is useful for allowing easy debug-only user activity (such as tweaking a value without recompiling).
+If you're experienced using ImGui, you're free to #include "tz/dbgui/dbgui.hpp"
and start using ImGui functions to your hearts content. If you're not comfortable using ImGui, now's a great time to learn.
bool tz::dbgui::claims_keyboard | +( | +) | ++ |
Query as to whether the debug-ui is currently using the keyboard input.
+You might want to check if this is false before taking key input elsewhere (or the user could input into multiple places at once).
+If dbgui is not available, this always returns false
.
bool tz::dbgui::claims_mouse | +( | +) | ++ |
Query as to whether the debug-ui is currently using the mouse input.
+You might want to check if this is false before taking mouse input elsewhere (or the user could input into multiple places at once).
+If dbgui is not available, this always returns false
.
game_menu_callback_type & tz::dbgui::game_menu | +( | +) | ++ |
Retrieve the game menu callback.
+Use this if you want to add menu items to the top imgui menu under your application name.
+Example:
+
|
+ +inline | +
As dbgui is only available on TZ_DEBUG, calling ImGui functions directly in game-code will yield runtime errors on non-debug builds.
+ImGui function invocations should instead be stored within a lambda and passed to this function, which will do nothing on non-debug builds, and can do extra debug-only state checks.
+Example:
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Hardware-accelerated 3D graphics library. +More...
++Modules | |
Inputs and Outputs | |
Documentation for inputs and outputs for both Renderers and Processors. | |
Maintainer Guide | |
For Topaz maintainers only. | |
Renderers | |
Documentation for Renderers. | |
Resources | |
Resources Wiki | |
+Concepts | |
concept | tz::gl::device_type |
Named Requirement: device Implemented by tz_gl2_device. | |
+Data Structures | |
class | tz::gl::device |
Implements tz::gl::device_type. More... | |
+Enumerations | |
enum class | tz::gl::image_format { image_format::undefined +, R8 +, R8_UNorm = R8 +, R8_SNorm +, R8_UInt +, R8_SInt +, R8_sRGB +, R16 +, R16_UNorm = R16 +, R16_SNorm +, R16_UInt +, R16_SInt +, RG16 +, RG16_UNorm = RG16 +, RG16_SNorm +, RG16_UInt +, RG16_SInt +, RG16_sRGB +, RG32 +, RG32_UNorm = RG32 +, RG32_SNorm +, RG32_UInt +, RG32_SInt +, RGB24 +, RGB24_UNorm = RGB24 +, RGB24_SNorm +, RGB24_UInt +, RGB24_SInt +, RGB24_sRGB +, BGR24 +, BGR24_UNorm = BGR24 +, BGR24_SNorm +, BGR24_UInt +, BGR24_SInt +, BGR24_sRGB +, RGBA32 +, RGBA32_UNorm = RGBA32 +, RGBA32_SNorm +, RGBA32_UInt +, RGBA32_SInt +, RGBA32_sRGB +, BGRA32 +, BGRA32_UNorm = BGRA32 +, BGRA32_SNorm +, BGRA32_UInt +, BGRA32_SInt +, BGRA32_sRGB +, RGBA64_SFloat +, RGBA128_SFloat +, Depth16 +, Depth16_UNorm = Depth16 +, Count + } |
Various image formats are supported in Topaz. More... | |
+Functions | |
device & | tz::gl::get_device () |
Retrieve the global device. | |
Hardware-accelerated 3D graphics library.
+Rendering 3D graphics in Topaz is achieved by doing the following:
tz::gl::device::create_renderer()
via the global tz::gl::get_device(). Save the returned renderer handle as a local variable.tz::gl::device::get_renderer(handle)
, to invoke invoke tz::gl::renderer::render()
to draw your graphics.
+
|
+ +strong | +
Various image formats are supported in Topaz.
+image_formats are comprised of three properties.
+The enum values are named as Components
Size
Internal
where:
Examples:
Enumerator | |
---|---|
undefined |
|
device & tz::gl::get_device | +( | +) | ++ |
Retrieve the global device.
+See tz::gl::device_type for usage and functionality.
+You should not be creating your own devices.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
For Topaz maintainers only. +More...
++Modules | |
OpenGL | |
Documentation for all things OpenGL. | |
Vulkan | |
Documentation for all things Vulkan. | |
For Topaz maintainers only.
+Here you will find implementation details for both of the graphics API backends (OpenGL and Vulkan)
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for all things OpenGL. +More...
++Modules | |
OpenGL Backend | |
Documentation for the OpenGL backend, which acts as a large abstraction around OpenGL. | |
OpenGL Frontend | |
Documentation for the OpenGL Frontend, which connects the OpenGL Backend to the tz::gl API. | |
Documentation for all things OpenGL.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the OpenGL Frontend, which connects the OpenGL Backend to the tz::gl API. +More...
++Modules | |
renderer Implementation | |
Documentation for the OpenGL Frontend implementation of renderer_type. | |
Documentation for the OpenGL Frontend, which connects the OpenGL Backend to the tz::gl API.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the OpenGL Frontend implementation of renderer_type. +More...
++Data Structures | |
class | tz::gl::ResourceStorage |
Copies all resource data from upon creation and handles resource and component lifetimes. More... | |
class | tz::gl::ShaderManager |
Stores the shader program and allows the renderer to use it before emitting a draw call. More... | |
class | tz::gl::OutputManager |
Stores information about the output target, and a framebuffer which either points to an offscreen image for render-to-texture (not yet implemented), or the main window framebuffer via ogl2::framebuffer::null(). More... | |
class | tz::gl::renderer_ogl |
renderer implementation which heavily calls into the backend at OpenGL Backend. More... | |
Documentation for the OpenGL Frontend implementation of renderer_type.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for all things Vulkan. +More...
++Modules | |
Vulkan Backend | |
Documentation for the Vulkan backend, which acts as a large abstraction around Vulkan. | |
Vulkan Frontend | |
Documentation for the Vulkan Frontend, which connects the Vulkan Backend to the tz::gl API. | |
Documentation for all things Vulkan.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the Vulkan Frontend, which connects the Vulkan Backend to the tz::gl API. +
+Documentation for the Vulkan Frontend, which connects the Vulkan Backend to the tz::gl API.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for inputs and outputs for both Renderers and Processors. +
+Documentation for inputs and outputs for both Renderers and Processors.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for Renderers. +More...
++Concepts | |
concept | tz::gl::renderer_type |
Named requirement for a renderer. | |
+Data Structures | |
struct | tz::gl::render_state |
Stores renderer-specific state, which drives the behaviour of the rendering. More... | |
class | tz::gl::renderer_info |
Helper struct which the user can use to specify which inputs, resources they want and where they want a renderer to render to. More... | |
class | tz::gl::RendererEditBuilder |
Helper class which can be used to generate a renderer_edit_request. More... | |
class | tz::gl::renderer |
Implements tz::gl::renderer_type. More... | |
+Typedefs | |
+using | tz::gl::renderer_handle = tz::handle< detail::renderer_tag > |
Represents a handle for a renderer owned by an existing device. | |
+using | tz::gl::renderer_options = tz::enum_field< renderer_option > |
Represents a collection of renderer options. | |
using | tz::gl::renderer_edit_request = std::vector< renderer_edit::variant > |
Represents an edit to an existing renderer. | |
+Enumerations | |
enum class | tz::gl::renderer_option { + renderer_option::no_depth_testing +, + renderer_option::alpha_blending +, + renderer_option::render_wait +, + renderer_option::no_clear_output +, + renderer_option::no_present +, + renderer_option::draw_indirect_count +, + _internal_final_dbgui_renderer +, + _internal +, + Count + + } |
Specifies options to enable extra functionality within Renderers. More... | |
+Functions | |
+void | tz::gl::common_renderer_dbgui (renderer_type auto &renderer) |
Helper function which displays render-api-agnostic information about renderers. | |
Documentation for Renderers.
+using tz::gl::renderer_edit_request = typedef std::vector<renderer_edit::variant> | +
Represents an edit to an existing renderer.
+
+
|
+ +strong | +
Specifies options to enable extra functionality within Renderers.
+Enumerator | |
---|---|
no_depth_testing |
|
alpha_blending |
|
render_wait |
|
no_clear_output |
|
no_present |
|
draw_indirect_count |
|
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+Data Structures | |
class | tz::gl::iresource |
Interface for a renderer or Processor resource. More... | |
class | tz::gl::buffer_resource |
Represents a fixed-size, static Buffer to be used by a renderer or Processor. More... | |
class | tz::gl::image_resource |
Represents a fixed-size, static Image to be used by a renderer or Processor. More... | |
+
|
+ +strong | +
+
|
+ +strong | +
Specifies optional flags which affect the behaviour of a resource in some way.
+Enumerator | |
---|---|
index_buffer |
|
draw_indirect_buffer |
|
renderer_output |
|
image_filter_nearest |
|
image_filter_linear |
|
image_mip_nearest |
|
image_mip_linear |
|
image_wrap_clamp_edge |
|
image_wrap_repeat |
|
image_wrap_mirrored_repeat |
|
+
|
+ +strong | +
Specifies the type of the resource; which is how a renderer or Processor will interpret the usage of the resource within a shader.
+Enumerator | |
---|---|
buffer |
|
image |
|
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the OpenGL backend, which acts as a large abstraction around OpenGL. +More...
++Modules | |
Buffers | |
Documentation for OpenGL Buffers. | |
Framebuffers | |
Documentation for everything relating to framebuffers. | |
Images, Samplers and Formats | |
Documentation for everything relating to Images, Samplers and image_formats. | |
Shaders | |
Documentation for everything relating to shaders. | |
+Data Structures | |
class | tz::gl::ogl2::vertex_array |
Wrapper for an OpenGL VAO. More... | |
Documentation for the OpenGL backend, which acts as a large abstraction around OpenGL.
+This is a low-level module free of all context relevant to Topaz.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for OpenGL Buffers. +More...
++Data Structures | |
struct | tz::gl::ogl2::buffer_info |
Specifies creation flags for a buffer. More... | |
class | tz::gl::ogl2::buffer |
Documentation for OpenGL buffers. More... | |
+Enumerations | |
enum class | tz::gl::ogl2::buffer_target : GLenum { + buffer_target::index = GL_ELEMENT_ARRAY_BUFFER +, + buffer_target::draw_indirect = GL_DRAW_INDIRECT_BUFFER +, + buffer_target::uniform = GL_UNIFORM_BUFFER +, + buffer_target::shader_storage = GL_SHADER_STORAGE_BUFFER +, + buffer_target::parameter = GL_PARAMETER_BUFFER_ARB + + } |
Specifies the target to which the buffer is bound for its data store. More... | |
enum class | tz::gl::ogl2::buffer_residency { + buffer_residency::static_fixed +, + buffer_residency::dynamic + + } |
Specifies the expected behaviour of the data store contents. More... | |
+Functions | |
void | tz::gl::ogl2::buffer_helper::copy (const buffer &source, buffer &destination) |
Copy the entire data store of a buffer to another. | |
buffer | tz::gl::ogl2::buffer_helper::clone_resized (const buffer &buf, std::size_t new_size) |
buffers are not resizeable. | |
Documentation for OpenGL Buffers.
+
+
|
+ +strong | +
Specifies the expected behaviour of the data store contents.
+
+
|
+ +strong | +
Specifies the target to which the buffer is bound for its data store.
+buffer tz::gl::ogl2::buffer_helper::clone_resized | +( | +const buffer & | +buf, | +
+ | + | std::size_t | +new_size | +
+ | ) | ++ |
buffers are not resizeable.
+However, this function creates an exact copy of the buffer, but with a new size. You can assume that the target, residency and data store contents are completely unchanged. If the resize increases the size of the buffer however, then the new bytes have undefined values.
+ +void tz::gl::ogl2::buffer_helper::copy | +( | +const buffer & | +source, | +
+ | + | buffer & | +destination | +
+ | ) | ++ |
Copy the entire data store of a buffer to another.
+If the destination buffer is larger than the source buffer, the bytes following the copy region are untouched.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for everything relating to framebuffers. +More...
++Data Structures | |
struct | tz::gl::ogl2::framebuffer_info |
Specifies creation flags for a framebuffer. More... | |
class | tz::gl::ogl2::framebuffer |
Represents an OpenGL framebuffer object. More... | |
+Typedefs | |
using | tz::gl::ogl2::framebuffer_texture = std::variant< const image *, const render_buffer * > |
Describes a reference to either an image or renderbuffer. | |
Documentation for everything relating to framebuffers.
+using tz::gl::ogl2::framebuffer_texture = typedef std::variant<const image*, const render_buffer*> | +
Describes a reference to either an image or renderbuffer.
+Is used as a framebuffer attachment.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for everything relating to Images, Samplers and image_formats. +More...
++Data Structures | |
struct | tz::gl::ogl2::image_info |
Specifies creation flags for a image. More... | |
class | tz::gl::ogl2::image |
Documentation for OpenGL images. More... | |
struct | tz::gl::ogl2::FormatData |
OpenGL formats are pretty finnicky, especially when using them to initialise texture data-stores. More... | |
struct | tz::gl::ogl2::sampler |
Describes various details about texture lookups from a sampled image. More... | |
+Enumerations | |
enum class | tz::gl::ogl2::lookup_filter : GLint { + lookup_filter::nearest = GL_NEAREST +, + lookup_filter::linear = GL_LINEAR + + } |
Determines how sub-pixel colours are filtered. More... | |
enum class | tz::gl::ogl2::address_mode : GLint { + address_mode::clamp_to_edge = GL_CLAMP_TO_EDGE +, + address_mode::repeat = GL_REPEAT +, + address_mode::mirrored_repeat = GL_MIRRORED_REPEAT + + } |
Determines the value retrieved from a texture lookup if the texture coordinate is out of range. More... | |
Documentation for everything relating to Images, Samplers and image_formats.
+
+
|
+ +strong | +
Determines the value retrieved from a texture lookup if the texture coordinate is out of range.
+
+
|
+ +strong | +
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for everything relating to shaders. +More...
++Data Structures | |
struct | tz::gl::ogl2::shader_module_info |
Specifies creation flags for a shader_module. More... | |
struct | tz::gl::ogl2::shader_info |
Specifies creation flags for a Shader. More... | |
class | tz::gl::ogl2::shader_module |
Represents an OpenGL shader. More... | |
class | tz::gl::ogl2::shader |
Represents an OpenGL shader program. More... | |
+Enumerations | |
enum class | tz::gl::ogl2::shader_type : GLenum { + shader_type::vertex = GL_VERTEX_SHADER +, + shader_type::tessellation_control = GL_TESS_CONTROL_SHADER +, + shader_type::tessellation_evaluation = GL_TESS_EVALUATION_SHADER +, + shader_type::fragment = GL_FRAGMENT_SHADER +, + shader_type::compute = GL_COMPUTE_SHADER + + } |
Specifies the shader type. More... | |
Documentation for everything relating to shaders.
+
+
|
+ +strong | +
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the Vulkan backend, which acts as a large abstraction around Vulkan. +More...
++Modules | |
Buffers | |
Documentation for Vulkan Buffers. | |
Command Buffers and Pools | |
Documentation for everything related to Command Buffers, Command Pools and Vulkan Commands. | |
Descriptor Layouts and Sets | |
Documentation for everything related to Descriptors. | |
Extensions and Features | |
Documentation for functionality related to instance/device extensions, and optional features. | |
Graphics Pipeline | |
Documentation for the graphics pipeline. | |
Images, Samplers and Formats | |
Documentation for everything relating to Images, Samplers and image_formats. | |
Presentation and Window Surface Interation (WSI) | |
Documentation for functionality related to presenting images to existing windows. | |
Synchronisation Primitives | |
Documentation for functionality related to CPU/GPU Vulkan synchronisation primitives. | |
+Data Structures | |
class | tz::gl::vk2::PhysicalDevice |
Represents something resembling a graphics card that can perform general graphical operations. More... | |
class | tz::gl::vk2::hardware::Queue |
Represents a single hardware Queue. More... | |
struct | tz::gl::vk2::LogicalDeviceInfo |
Specifies parameters for a newly created LogicalDevice. More... | |
class | tz::gl::vk2::LogicalDevice |
Logical interface to an existing PhysicalDevice. More... | |
struct | tz::gl::vk2::VulkanInstanceInfo |
Specifies creation flags for a VulkanInstance. More... | |
class | tz::gl::vk2::VulkanInstance |
Represents a vulkan instance, which acts as a reference to all per-application state. More... | |
+Enumerations | |
enum class | tz::gl::vk2::PhysicalDeviceVendor |
Represents a PhysicalDevice manufacturer. | |
+Functions | |
PhysicalDeviceList | tz::gl::vk2::get_all_devices (const VulkanInstance &instance) |
Retrieve a list of all physical devices available on the machine for the given VulkanInstance. | |
Documentation for the Vulkan backend, which acts as a large abstraction around Vulkan.
+This is a low-level module free of all context relevant to Topaz.
+const VulkanInstance & tz::gl::vk2::get | +( | +) | ++ |
Retrieve a reference to the current Vulkan Instance.
+This will have been created during initialisation.
+ +PhysicalDeviceList tz::gl::vk2::get_all_devices | +( | +const VulkanInstance & | +instance | ) | ++ |
Retrieve a list of all physical devices available on the machine for the given VulkanInstance.
+If no VulkanInstance is provided, the global instance vk2::get() will be used.
void tz::gl::vk2::initialise | +( | +tz::game_info | +game_info | ) | ++ |
Initialise the vulkan backend.
+tz::initialise
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for Vulkan Buffers. +More...
++Data Structures | |
struct | tz::gl::vk2::buffer_info |
Specifies creation flags for a Buffer. More... | |
class | tz::gl::vk2::Buffer |
Represents a linear array of data which can be used for various purposes. More... | |
+Enumerations | |
enum class | tz::gl::vk2::BufferUsage { + BufferUsage::TransferSource = VK_BUFFER_USAGE_TRANSFER_SRC_BIT +, + BufferUsage::TransferDestination = VK_BUFFER_USAGE_TRANSFER_DST_BIT +, + BufferUsage::UniformBuffer = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT +, + BufferUsage::StorageBuffer = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT +, + BufferUsage::draw_indirect_buffer = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT +, + BufferUsage::VertexBuffer = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT +, + BufferUsage::index_buffer = VK_BUFFER_USAGE_INDEX_BUFFER_BIT + + } |
Specifies allowed usages for a Buffer. More... | |
Documentation for Vulkan Buffers.
+
+
|
+ +strong | +
Specifies allowed usages for a Buffer.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for everything related to Command Buffers, Command Pools and Vulkan Commands. +More...
++Data Structures | |
struct | tz::gl::vk2::VulkanCommand |
Contains all the possible commands which can be recorded within a CommandBuffer. More... | |
struct | tz::gl::vk2::CommandPoolInfo |
Specifies creation flags for a CommandPool. More... | |
class | tz::gl::vk2::CommandBufferRecording |
Represents the full duration of the recording process of an existing CommandBuffer. More... | |
class | tz::gl::vk2::CommandBuffer |
Represents storage for vulkan commands, such as draw calls, binds, transfers etc... More... | |
class | tz::gl::vk2::CommandPool |
Represents storage for CommandBuffers. More... | |
Documentation for everything related to Command Buffers, Command Pools and Vulkan Commands.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for everything related to Descriptors. +More...
++Data Structures | |
struct | tz::gl::vk2::DescriptorLayoutInfo |
Specifies creation flags for a descriptor set layout. More... | |
class | tz::gl::vk2::DescriptorLayout |
Specifies the types of resources that will be accessed by a graphics or compute pipeline via a Shader. More... | |
class | tz::gl::vk2::DescriptorLayoutBuilder |
Helper class to populate a DescriptorLayoutInfo. More... | |
struct | tz::gl::vk2::DescriptorPoolInfo |
Specifies creation flags for a descriptor pool. More... | |
class | tz::gl::vk2::DescriptorSet |
Represents a set of one or more descriptors. More... | |
class | tz::gl::vk2::DescriptorPool |
Represents storage for DescriptorSets. More... | |
struct | tz::gl::vk2::RenderPassInfo |
Specifies creation flags for a RenderPass. More... | |
+Enumerations | |
enum class | tz::gl::vk2::DescriptorFlag { + DescriptorFlag::UpdateAfterBind = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT +, + DescriptorFlag::UpdateUnusedWhilePending = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT +, + DescriptorFlag::PartiallyBound = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT +, + DescriptorFlag::VariableCount = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT + + } |
Information about a specific descriptor (or array of descriptors) via a descriptor layout binding. More... | |
Documentation for everything related to Descriptors.
+
+
|
+ +strong | +
Information about a specific descriptor (or array of descriptors) via a descriptor layout binding.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for functionality related to instance/device extensions, and optional features. +More...
++Enumerations | |
enum class | tz::gl::vk2::DeviceFeature { + DeviceFeature::DrawIndirectCount +, + DeviceFeature::MultiDrawIndirect +, + DeviceFeature::ShaderDrawParameters +, + DeviceFeature::BindlessDescriptors +, + DeviceFeature::TimelineSemaphores +, + DeviceFeature::ColourBlendLogicalOperations +, + DeviceFeature::NonSolidFillRasteriser +, + DeviceFeature::TessellationShaders +, + DeviceFeature::VertexPipelineResourceWrite +, + DeviceFeature::FragmentShaderResourceWrite +, + DeviceFeature::DynamicRendering + + } |
Represents an optional feature specific to a PhysicalDevice. More... | |
Documentation for functionality related to instance/device extensions, and optional features.
+
+
|
+ +strong | +
Represents an optional feature specific to a PhysicalDevice.
+Enumerator | |
---|---|
DrawIndirectCount |
|
MultiDrawIndirect |
|
ShaderDrawParameters |
|
BindlessDescriptors |
|
TimelineSemaphores |
|
ColourBlendLogicalOperations |
|
NonSolidFillRasteriser |
|
TessellationShaders |
|
VertexPipelineResourceWrite |
|
FragmentShaderResourceWrite |
|
DynamicRendering |
|
+
|
+ +strong | +
Supported Vulkan extension for a VulkanInstance.
+Enumerator | |
---|---|
DebugMessenger |
|
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the graphics pipeline. +More...
++Modules | |
Fixed Pipeline State Values | |
Documentation for the fixed-pipeline settings, such as rasteriser state and input assembly. | |
Render Passes | |
Documentation for render passes and how they interact with the rendering pipeline. | |
Shader Programs and Modules | |
Documentation for shaders. | |
+Data Structures | |
struct | tz::gl::vk2::GraphicsPipelineInfo |
Specifies creation flags for a GraphicsPipeline. More... | |
class | tz::gl::vk2::GraphicsPipeline |
Represents the Graphics Pipeline. More... | |
struct | tz::gl::vk2::PipelineLayoutInfo |
Specifies creation flags for a PipelineLayout. More... | |
class | tz::gl::vk2::PipelineLayout |
Represents an interface between shader stages and shader resources in terms of the layout of a group of DescriptorSet. More... | |
+Enumerations | |
enum class | tz::gl::vk2::PipelineStage { + PipelineStage::Top = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT +, + PipelineStage::Bottom = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT +, + PipelineStage::AllCommands = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT +, + PipelineStage::AllGraphics = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT +, + PipelineStage::DrawIndirect = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT +, + PipelineStage::VertexIndexInput = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT +, + PipelineStage::VertexShader = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT +, + PipelineStage::TessellationControlShader = VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT +, + PipelineStage::TessellationEvaluationShader = VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +, + PipelineStage::GeometryShader = VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +, + PipelineStage::FragmentShader = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT +, + PipelineStage::EarlyFragmentTests = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT +, + PipelineStage::LateFragmentTests = VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT +, + PipelineStage::ColourAttachmentOutput = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT +, + ComputeShader = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT +, + PipelineStage::TransferCommands = VK_PIPELINE_STAGE_TRANSFER_BIT + + } |
Specifies a certain stage (point of execution) during the invocation of a graphics pipeline. More... | |
Documentation for the graphics pipeline.
+
+
|
+ +strong | +
Specifies a certain stage (point of execution) during the invocation of a graphics pipeline.
+Enumerator | |
---|---|
Top |
|
Bottom |
|
AllCommands |
|
AllGraphics |
|
DrawIndirect |
|
VertexIndexInput |
|
VertexShader |
|
TessellationControlShader |
|
TessellationEvaluationShader |
|
GeometryShader |
|
FragmentShader |
|
EarlyFragmentTests |
|
LateFragmentTests |
|
ColourAttachmentOutput |
|
TransferCommands |
|
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for the fixed-pipeline settings, such as rasteriser state and input assembly. +More...
++Data Structures | |
struct | tz::gl::vk2::VertexInputState |
Specifies how the input vertex data is organised. More... | |
struct | tz::gl::vk2::ViewportState |
Specifies the region of the output that will be rendered to. More... | |
struct | tz::gl::vk2::RasteriserState |
Configures how the geometry shaped by input data is transformed into fragments. More... | |
struct | tz::gl::vk2::MultisampleState |
At present, multisampling is not supported, so this struct is not configurable. More... | |
struct | tz::gl::vk2::DepthStencilState |
Specifies the state of the depth/stencil buffer, if any. More... | |
struct | tz::gl::vk2::ColourBlendState |
Specifies how a new fragment colour is combined with the previous colour within the output. More... | |
struct | tz::gl::vk2::DynamicState |
At present, dynamic state is not supported, so this struct is not configurable. More... | |
+Enumerations | |
enum class | tz::gl::vk2::VertexInputFormat { + VertexInputFormat::Vec1Float16 = VK_FORMAT_R16_SFLOAT +, + VertexInputFormat::Vec1Float32 = VK_FORMAT_R32_SFLOAT +, + VertexInputFormat::Vec2Float32 = VK_FORMAT_R16G16_SFLOAT +, + VertexInputFormat::Vec2Float64 = VK_FORMAT_R32G32_SFLOAT +, + VertexInputFormat::Vec3Float48 = VK_FORMAT_R16G16B16_SFLOAT +, + VertexInputFormat::Vec3Float96 = VK_FORMAT_R32G32B32_SFLOAT +, + VertexInputFormat::Vec4Float64 = VK_FORMAT_R16G16B16A16_SFLOAT +, + VertexInputFormat::Vec4Float128 = VK_FORMAT_R32G32B32A32_SFLOAT + + } |
Specifies the format of a vertex input attribute. More... | |
enum class | tz::gl::vk2::PolygonMode { + PolygonMode::Fill = VK_POLYGON_MODE_FILL +, + PolygonMode::Line = VK_POLYGON_MODE_LINE +, + PolygonMode::Point = VK_POLYGON_MODE_POINT + + } |
Describes how fragments are generated for geometry. More... | |
enum class | tz::gl::vk2::CullMode { + CullMode::NoCulling +, + CullMode::FrontCulling +, + CullMode::BackCulling +, + CullMode::BothCulling + + } |
Describes which faces should be culled. More... | |
enum class | tz::gl::vk2::DepthComparator { + DepthComparator::AlwaysFalse = VK_COMPARE_OP_NEVER +, + DepthComparator::LessThan = VK_COMPARE_OP_LESS +, + DepthComparator::EqualTo = VK_COMPARE_OP_EQUAL +, + DepthComparator::LessThanOrEqual = VK_COMPARE_OP_LESS_OR_EQUAL +, + DepthComparator::GreaterThan = VK_COMPARE_OP_GREATER +, + DepthComparator::NotEqualTo = VK_COMPARE_OP_NOT_EQUAL +, + DepthComparator::GreaterThanOrEqual = VK_COMPARE_OP_GREATER_OR_EQUAL +, + DepthComparator::AlwaysTrue = VK_COMPARE_OP_ALWAYS + + } |
When two fragments depth values are compared aka comp(lhs, rhs) , what should the return expression be? More... | |
Documentation for the fixed-pipeline settings, such as rasteriser state and input assembly.
+
+
|
+ +strong | +
+
|
+ +strong | +
When two fragments depth values are compared aka comp(lhs, rhs)
, what should the return expression be?
+
|
+ +strong | +
+
|
+ +strong | +
Specifies the format of a vertex input attribute.
+See VertexInputState::Attribute for usage.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for render passes and how they interact with the rendering pipeline. +More...
++Data Structures | |
struct | tz::gl::vk2::FramebufferInfo |
Specifies creation flags for a Framebuffer. More... | |
class | tz::gl::vk2::Framebuffer |
Represents a render target for a RenderPass. More... | |
struct | tz::gl::vk2::Attachment |
Specifies some data about an attachment. More... | |
class | tz::gl::vk2::RenderPass |
Represents a collection of attachments and subpasses and describes how the attachments are used throughout the subpases. More... | |
class | tz::gl::vk2::SubpassBuilder |
Helper class to create a RenderPassInfo::Subpass. More... | |
class | tz::gl::vk2::RenderPassBuilder |
Helper class to create a RenderPass. More... | |
+Enumerations | |
enum class | tz::gl::vk2::LoadOp { + LoadOp::Load = VK_ATTACHMENT_LOAD_OP_LOAD +, + LoadOp::Clear = VK_ATTACHMENT_LOAD_OP_CLEAR +, + LoadOp::DontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE + + } |
Represents how some resource is loaded. More... | |
enum class | tz::gl::vk2::StoreOp { + StoreOp::Store = VK_ATTACHMENT_STORE_OP_STORE +, + StoreOp::DontCare = VK_ATTACHMENT_STORE_OP_DONT_CARE + + } |
Represents how some resource is stored. More... | |
enum class | tz::gl::vk2::PipelineContext |
Specifies which pipeline type a RenderPass subpass is expected to bind to. | |
enum class | tz::gl::vk2::AccessFlag { + AccessFlag::NoneNeeded = VK_ACCESS_NONE_KHR +, + AccessFlag::AllReads = VK_ACCESS_MEMORY_READ_BIT +, + AccessFlag::AllWrites = VK_ACCESS_MEMORY_WRITE_BIT +, + AccessFlag::IndirectBufferRead = VK_ACCESS_INDIRECT_COMMAND_READ_BIT +, + AccessFlag::IndexBufferRead = VK_ACCESS_INDEX_READ_BIT +, + AccessFlag::VertexBufferRead = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT +, + AccessFlag::UniformBufferRead = VK_ACCESS_UNIFORM_READ_BIT +, + AccessFlag::InputAttachmentRead = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT +, + AccessFlag::ShaderResourceRead = VK_ACCESS_SHADER_READ_BIT +, + AccessFlag::ShaderResourceWrite = VK_ACCESS_SHADER_WRITE_BIT +, + AccessFlag::ColourAttachmentRead = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT +, + AccessFlag::ColourAttachmentWrite = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT +, + AccessFlag::DepthStencilAttachmentRead = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT +, + AccessFlag::DepthStencilAttachmentWrite = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT +, + AccessFlag::TransferOperationRead = VK_ACCESS_TRANSFER_READ_BIT +, + AccessFlag::TransferOperationWrite = VK_ACCESS_TRANSFER_WRITE_BIT +, + AccessFlag::HostRead = VK_ACCESS_HOST_READ_BIT +, + AccessFlag::HostWrite = VK_ACCESS_HOST_WRITE_BIT + + } |
Specifies specific events during which a memory dependency takes place. More... | |
Documentation for render passes and how they interact with the rendering pipeline.
+
+
|
+ +strong | +
Specifies specific events during which a memory dependency takes place.
+Enumerator | |
---|---|
NoneNeeded |
|
AllReads |
|
AllWrites |
|
IndirectBufferRead |
|
IndexBufferRead |
|
VertexBufferRead |
|
UniformBufferRead |
|
InputAttachmentRead |
|
ShaderResourceRead |
|
ShaderResourceWrite |
|
ColourAttachmentRead |
|
ColourAttachmentWrite |
|
DepthStencilAttachmentRead |
|
DepthStencilAttachmentWrite |
|
TransferOperationRead | + |
TransferOperationWrite | + |
HostRead |
|
HostWrite |
|
+
|
+ +strong | +
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for shaders. +More...
++Data Structures | |
struct | tz::gl::vk2::ShaderModuleInfo |
Specifies parameters of a single ShaderModule. More... | |
class | tz::gl::vk2::ShaderModule |
Represents a single module of a Shader. More... | |
struct | tz::gl::vk2::ShaderInfo |
Specifies parameters of a Shader, and all the modules that comprise it. More... | |
class | tz::gl::vk2::Shader |
Represents a Shader program. More... | |
+Enumerations | |
enum class | tz::gl::vk2::ShaderType |
Supported Shader Type. | |
Documentation for shaders.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for everything relating to Images, Samplers and image_formats. +More...
++Namespaces | |
namespace | tz::gl::vk2::format_traits |
Meta information about image_formats. | |
+Data Structures | |
struct | tz::gl::vk2::SwapchainImageInfo |
Specifies parameters of an Image referring to an existing Swapchain image. More... | |
struct | tz::gl::vk2::image_info |
Specifies creation flags for an Image. More... | |
class | tz::gl::vk2::Image |
Represents an Image owned by the Vulkan API. More... | |
class | tz::gl::vk2::ImageView |
struct | tz::gl::vk2::SamplerInfo |
Specifies creation flags for a Sampler. More... | |
class | tz::gl::vk2::Sampler |
Represents the state of an Image sampler which is used to read image data and apply filtering and other transformations to a Shader. More... | |
+Enumerations | |
enum class | tz::gl::vk2::ImageLayout { + ImageLayout::Undefined = VK_IMAGE_LAYOUT_UNDEFINED +, + ImageLayout::General = VK_IMAGE_LAYOUT_GENERAL +, + ImageLayout::ColourAttachment = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL +, + ImageLayout::DepthStencilAttachment = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL +, + ImageLayout::ShaderResource = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL +, + ImageLayout::TransferSource = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL +, + ImageLayout::TransferDestination = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL +, + ImageLayout::Present = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR + + } |
Images are always in a layout. More... | |
enum class | tz::gl::vk2::SampleCount |
Specifies the number of samples stored per image pixel. | |
enum class | tz::gl::vk2::ImageTiling { + ImageTiling::Optimal = VK_IMAGE_TILING_OPTIMAL +, + ImageTiling::Linear = VK_IMAGE_TILING_LINEAR + + } |
Specifies how the image is laid out in memory. More... | |
enum class | tz::gl::vk2::ImageUsage { + ImageUsage::TransferSource = VK_IMAGE_USAGE_TRANSFER_SRC_BIT +, + ImageUsage::TransferDestination = VK_IMAGE_USAGE_TRANSFER_DST_BIT +, + ImageUsage::SampledImage = VK_IMAGE_USAGE_SAMPLED_BIT +, + ImageUsage::StorageImage = VK_IMAGE_USAGE_STORAGE_BIT +, + ImageUsage::ColourAttachment = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT +, + ImageUsage::DepthStencilAttachment = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT +, + ImageUsage::InputAttachment = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT + + } |
Specifies intended usage of an Image. More... | |
enum class | tz::gl::vk2::ImageAspectFlag |
Specifies which aspects of the image are included within a view. | |
enum class | tz::gl::vk2::image_format { image_format::undefined = VK_FORMAT_UNDEFINED +, R8 = VK_FORMAT_R8_UNORM +, R8_UNorm = R8 +, R8_SNorm = VK_FORMAT_R8_SNORM +, R8_UInt = VK_FORMAT_R8_UINT +, R8_SInt = VK_FORMAT_R8_SINT +, R8_sRGB = VK_FORMAT_R8_SRGB +, R16 = VK_FORMAT_R16_UNORM +, R16_UNorm = R16 +, R16_SNorm = VK_FORMAT_R16_SNORM +, R16_UInt = VK_FORMAT_R16_UINT +, R16_SInt = VK_FORMAT_R16_SINT +, RG16 = VK_FORMAT_R8G8_UNORM +, RG16_UNorm = RG16 +, RG16_SNorm = VK_FORMAT_R8G8_SNORM +, RG16_UInt = VK_FORMAT_R8G8_UINT +, RG16_SInt = VK_FORMAT_R8G8_SINT +, RG16_sRGB = VK_FORMAT_R8G8_SRGB +, RG32 = VK_FORMAT_R16G16_UNORM +, RG32_UNorm = RG32 +, RG32_SNorm = VK_FORMAT_R16G16_SNORM +, RG32_UInt = VK_FORMAT_R16G16_UINT +, RG32_SInt = VK_FORMAT_R16G16_SINT +, RGB24 = VK_FORMAT_R8G8B8_UNORM +, RGB24_UNorm = RGB24 +, RGB24_SNorm = VK_FORMAT_R8G8B8_SNORM +, RGB24_UInt = VK_FORMAT_R8G8B8_UINT +, RGB24_SInt = VK_FORMAT_R8G8B8_SINT +, RGB24_sRGB = VK_FORMAT_R8G8B8_SRGB +, BGR24 = VK_FORMAT_B8G8R8_UNORM +, BGR24_UNorm = BGR24 +, BGR24_SNorm = VK_FORMAT_B8G8R8_SNORM +, BGR24_UInt = VK_FORMAT_B8G8R8_UINT +, BGR24_SInt = VK_FORMAT_B8G8R8_SINT +, BGR24_sRGB = VK_FORMAT_B8G8R8_SRGB +, RGBA32 = VK_FORMAT_R8G8B8A8_UNORM +, RGBA32_UNorm = RGBA32 +, RGBA32_SNorm = VK_FORMAT_R8G8B8A8_SNORM +, RGBA32_UInt = VK_FORMAT_R8G8B8A8_UINT +, RGBA32_SInt = VK_FORMAT_R8G8B8A8_SINT +, RGBA32_sRGB = VK_FORMAT_R8G8B8A8_SRGB +, BGRA32 = VK_FORMAT_B8G8R8A8_UNORM +, BGRA32_UNorm = BGRA32 +, BGRA32_SNorm = VK_FORMAT_B8G8R8A8_SNORM +, BGRA32_UInt = VK_FORMAT_B8G8R8A8_UINT +, BGRA32_SInt = VK_FORMAT_B8G8R8A8_SINT +, BGRA32_sRGB = VK_FORMAT_B8G8R8A8_SRGB +, RGBA64_SFloat = VK_FORMAT_R16G16B16A16_SFLOAT +, RGBA128_SFloat = VK_FORMAT_R32G32B32A32_SFLOAT +, Depth16_UNorm = VK_FORMAT_D16_UNORM +, Depth32_SFloat = VK_FORMAT_D32_SFLOAT + } |
Various image formats are supported. More... | |
enum class | tz::gl::vk2::LookupFilter |
Represents a filter to a texture lookup. | |
enum class | tz::gl::vk2::MipLookupFilter |
Specify mipmap mode for texture lookups. | |
enum class | tz::gl::vk2::SamplerAddressMode { + SamplerAddressMode::Repeat = VK_SAMPLER_ADDRESS_MODE_REPEAT +, + SamplerAddressMode::MirroredRepeat = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT +, + SamplerAddressMode::ClampToEdge = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE +, + SamplerAddressMode::ClampToBorder = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER + + } |
Specifies behaviour with sampling with texture coordinates that lie outside of the image. More... | |
Documentation for everything relating to Images, Samplers and image_formats.
+
+
|
+ +strong | +
Various image formats are supported.
+Note that PhysicalDevices may not support all formats listed here.
+image_formats are comprised of three properties.
+The enum values are named as Components
Size
Internal
where:
Examples:
Enumerator | |
---|---|
undefined |
|
+
|
+ +strong | +
Images are always in a layout.
+Images can only perform certain operations in a given layout.
+Enumerator | |
---|---|
Undefined |
|
General |
|
ColourAttachment |
|
DepthStencilAttachment |
|
ShaderResource |
|
TransferSource |
|
TransferDestination |
|
Present |
|
+
|
+ +strong | +
+
|
+ +strong | +
Specifies intended usage of an Image.
+Enumerator | |
---|---|
TransferSource |
|
TransferDestination |
|
SampledImage |
|
StorageImage |
|
ColourAttachment |
|
DepthStencilAttachment |
|
InputAttachment |
|
+
|
+ +strong | +
Specifies behaviour with sampling with texture coordinates that lie outside of the image.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for functionality related to presenting images to existing windows. +More...
++Namespaces | |
namespace | tz::gl::vk2::present_traits |
Meta behaviour related to presentation and surfaces. | |
+Data Structures | |
struct | tz::gl::vk2::SwapchainInfo |
Specifies parameters of a newly created Swapchain. More... | |
class | tz::gl::vk2::Swapchain |
Swapchains are infrastructures which represent GPU images we will render to before they can be presented to the screen. More... | |
class | tz::gl::vk2::WindowSurface |
Represents a Vulkan-friendly interface to an existing OS window. More... | |
+Enumerations | |
enum class | tz::gl::vk2::SurfacePresentMode { + SurfacePresentMode::Immediate = VK_PRESENT_MODE_IMMEDIATE_KHR +, + SurfacePresentMode::Mailbox = VK_PRESENT_MODE_MAILBOX_KHR +, + SurfacePresentMode::Fifo = VK_PRESENT_MODE_FIFO_KHR +, + SurfacePresentMode::FifoRelaxed = VK_PRESENT_MODE_FIFO_RELAXED_KHR + + } |
Supported Presentation mode supported for a WindowSurface. More... | |
Documentation for functionality related to presenting images to existing windows.
+
+
|
+ +strong | +
Supported Presentation mode supported for a WindowSurface.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for functionality related to CPU/GPU Vulkan synchronisation primitives. +More...
++Data Structures | |
struct | tz::gl::vk2::FenceInfo |
Specifies creation flags for a Fence. More... | |
class | tz::gl::vk2::Fence |
Synchronisation primitive which is useful to detect completion of a GPU operation, CPU-side. More... | |
class | tz::gl::vk2::BinarySemaphore |
Synchronisation primitive which is not interactable on the host and which has two states: More... | |
class | tz::gl::vk2::TimelineSemaphore |
Synchronisation primitive similar to BinarySemaphore. More... | |
+Typedefs | |
+using | tz::gl::vk2::Semaphore = BinarySemaphore |
Alias for BinarySemaphore. | |
Documentation for functionality related to CPU/GPU Vulkan synchronisation primitives.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Run Lua code from within Topaz C++. +More...
++Data Structures | |
class | tz::lua::state |
Represents a lua state. More... | |
+Functions | |
+state & | tz::lua::get_state () |
Retrieve the main lua tz::lua::state. | |
Run Lua code from within Topaz C++.
+See Lua API Reference for the Topaz-provided lua API.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Documentation for functionality related to windowing, peripherals and input. +More...
++Modules | |
Keyboard Input | |
Utilities, structures and helpers for keyboard input. | |
Monitors | |
Retrieve information about hardware monitors currently connected to the machine. | |
Mouse Input | |
Utilities, structures and helpers for mouse input. | |
Window | |
Create, destroy or customise an application window. | |
Documentation for functionality related to windowing, peripherals and input.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Utilities, structures and helpers for keyboard input. +More...
++Data Structures | |
struct | tz::wsi::keyboard_state |
Represents the total state of the keyboard and key-presses for a single window. More... | |
+Enumerations | |
enum class | tz::wsi::key |
Contains all possible keyboard inputs that Topaz supports. | |
+Functions | |
+std::string | tz::wsi::get_key_name (tz::wsi::key key) |
Retrieve a human-readable name for a key. | |
std::string | tz::wsi::get_chars_typed (tz::wsi::key key, const keyboard_state &state) |
Retrieve a string representing the characters typed, after modifiers. | |
bool | tz::wsi::is_key_down (const keyboard_state &kb, tz::wsi::key key) |
Query as to whether a specific key is currently pressed for a keyboard state. | |
Utilities, structures and helpers for keyboard input.
+std::string tz::wsi::get_chars_typed | +( | +tz::wsi::key | +key, | +
+ | + | const keyboard_state & | +state | +
+ | ) | ++ |
Retrieve a string representing the characters typed, after modifiers.
+key | Key that has just been pressed. |
state | State of the keyboard when the key was pressed. |
bool tz::wsi::is_key_down | +( | +const keyboard_state & | +kb, | +
+ | + | tz::wsi::key | +key | +
+ | ) | ++ |
Query as to whether a specific key is currently pressed for a keyboard state.
+kb | Keyboard state to query. |
key | Which key are you asking to see is pressed? |
key
is pressed according to the passed keyboard state, false if not. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Retrieve information about hardware monitors currently connected to the machine. +More...
++Data Structures | |
struct | tz::wsi::monitor |
Represents information about a monitor. More... | |
+Functions | |
std::vector< tz::wsi::monitor > | tz::wsi::get_monitors () |
Retrieve a list of all hardware monitors currently connected to the machine. | |
Retrieve information about hardware monitors currently connected to the machine.
+std::vector< tz::wsi::monitor > tz::wsi::get_monitors | +( | +) | ++ |
Retrieve a list of all hardware monitors currently connected to the machine.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Utilities, structures and helpers for mouse input. +More...
++Data Structures | |
struct | tz::wsi::mouse_state |
Represents the total state of the mouse for a single window. More... | |
+Enumerations | |
enum class | tz::wsi::mouse_button { + mouse_button::left +, + mouse_button::right +, + mouse_button::middle +, + _count + + } |
Represents all supported mouse buttons. More... | |
enum class | tz::wsi::mouse_button_state { + mouse_button_state::clicked +, + mouse_button_state::double_clicked +, + mouse_button_state::noclicked + + } |
Represents the current state of a mouse_button. More... | |
+Functions | |
bool | tz::wsi::is_mouse_button_down (const tz::wsi::mouse_state &ms, tz::wsi::mouse_button b) |
Query as to whether a specific mouse button is currently pressed for a mouse state (clicked or double-clicked). | |
Utilities, structures and helpers for mouse input.
+
+
|
+ +strong | +
+
|
+ +strong | +
bool tz::wsi::is_mouse_button_down | +( | +const tz::wsi::mouse_state & | +ms, | +
+ | + | tz::wsi::mouse_button | +b | +
+ | ) | ++ |
Query as to whether a specific mouse button is currently pressed for a mouse state (clicked or double-clicked).
+ms | Mouse state to query. |
b | Which mouse button are you asking to see is pressed? |
b
is pressed according to the passed mouse state, false if not. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Create, destroy or customise an application window. +More...
++Namespaces | |
namespace | tz::wsi::window_flag |
Represents an optional setting for a tz::wsi::window . | |
+Concepts | |
concept | tz::wsi::window_api |
Represents an API for a window. | |
+Data Structures | |
struct | tz::wsi::window_info |
Specifies creation flags for a wsi::window . More... | |
struct | tz::wsi::window |
Represents an application window. More... | |
+Typedefs | |
+using | tz::wsi::window_handle = tz::handle< detail::window_handle_tag > |
An opaque handle associated with a window. | |
+Functions | |
window_handle | tz::wsi::create_window (window_info info={}) |
Create a new window. | |
bool | tz::wsi::destroy_window (window_handle wh) |
Destroy an existing window associated with the provided handle. | |
window & | tz::wsi::get_window (window_handle wh) |
Retrieve a window associated with the provided handle. | |
bool | tz::wsi::has_window (window_handle wh) |
Query as to whether there exists a window associated with the provided handle. | |
+std::size_t | tz::wsi::window_count () |
Retrieve a count of all valid windows that have not yet been deleted. | |
Create, destroy or customise an application window.
+window_handle tz::wsi::create_window | +( | +window_info | +info = {} | ) | ++ |
Create a new window.
+info | Creation flags for the new window. |
bool tz::wsi::destroy_window | +( | +window_handle | +wh | ) | ++ |
Destroy an existing window associated with the provided handle.
+wh | Opaque window handle, retrieved from a prior call to tz::wsi::create_window |
window & tz::wsi::get_window | +( | +window_handle | +wh | ) | ++ |
Retrieve a window associated with the provided handle.
+wh | Window handle retrieved from a prior invocation of tz::wsi::create_window |
bool tz::wsi::has_window | +( | +window_handle | +wh | ) | ++ |
Query as to whether there exists a window associated with the provided handle.
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Topaz Shader Language (shaders) +More...
++Modules | |
Atomic Operations | |
Perform atomic operations on variables. | |
Debugging | |
Perform basic debugging operations within a shader. | |
Mathematical Operations | |
Access the most basic mathematical functions. | |
Matrix Operations | |
Access matrix operations. | |
Noise Functions | |
Access common noise functions which are already provided for you. | |
Precomputed Meshes | |
Retrieve basic pre-computed mesh expressed as an array of unindexed positions (triangles). | |
Topaz Shader Language (shaders)
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Perform atomic operations on variables. +More...
++Namespaces | |
namespace | tz::atomic |
Contains atomic operations as functions. | |
Perform atomic operations on variables.
+Import <atomic>
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Perform basic debugging operations within a shader. +More...
++Namespaces | |
namespace | tz::debug |
Contains debug-only operations as functions. | |
+Functions | |
void | tz::debug::printf (const char *fmt,...) |
Print formatted output to CPU-side stdout. | |
void | tz::debug::assert (bool condition) |
Assert that a condition is true. | |
Perform basic debugging operations within a shader.
+Import <debug>
+void tz::debug::assert | +( | +bool | +condition | ) | ++ |
Assert that a condition is true.
+If it evaluates to false, an assert will occur as soon as possible CPU-side.
+Only available on vulkan-debug. On all other build combinations, this has no effect.
+ +void tz::debug::printf | +( | +const char * | +fmt, | +
+ | + | + | ... | +
+ | ) | ++ |
Print formatted output to CPU-side stdout.
+Only available on vulkan-debug. On all other build combinations, this has no effect.
+const char*
is not a valid type in TZSL. In this context, it is a string-literal (which is only useable in this specific function due to compiler support. There are no string literals otherwise in TZSL.)You should take great care when using this, as this could be invoked many many times within shaders and quickly spam your application to lagginess.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Access the most basic mathematical functions. +More...
++Namespaces | |
namespace | tz::math |
Contains generic mathematical functions. | |
+Functions | |
+generic_number_t | tz::math::abs (generic_number_t x) |
Return the absolute value of the parameter. | |
+generic_number_t | tz::math::cos (generic_number_t angle) |
Return the cosine of the provided value, in radians. | |
+generic_number_t | tz::math::sin (generic_number_t angle) |
Return the sine of the provided value, in radians. | |
+generic_number_t | tz::math::tan (generic_number_t angle) |
Return the tangent of the provided value, in radians. | |
generic_number_t | tz::math::acos (generic_number_t value) |
Return the arc-cosine of the provided value. | |
generic_number_t | tz::math::acosh (generic_number_t value) |
Return the arc-hyperbolic-cosine of the provided value. | |
generic_number_t | tz::math::asin (generic_number_t value) |
Return the arc-sine of the provided value. | |
generic_number_t | tz::math::asinh (generic_number_t value) |
Return the arc-hyperbolic-sine of the provided value. | |
generic_number_t | tz::math::atan (generic_number_t value) |
Return the arc-tangent of the provided value. | |
generic_number_t | tz::math::atanh (generic_number_t value) |
Return the arc-hyperbolic-tangent of the provided value. | |
+generic_number_t | tz::math::ceil (generic_number_t value) |
Return a value equal to the nearest integer that is greater than or equal to the parameter. | |
+generic_number_t | tz::math::floor (generic_number_t value) |
Return a value equal to the nearest integer that is less than or equal to the parameter. | |
+generic_number_t | tz::math::round (generic_number_t value) |
Return a value equal to the value, rounded to the nearest integer. | |
+generic_number_t | tz::math::trunc (generic_number_t value) |
Return a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. | |
+generic_number_t | tz::math::fract (generic_number_t value) |
Return the fractional component of the argument. | |
generic_number_t | tz::math::sign (generic_number_t value) |
Extract the sign of the parameter. | |
+generic_number_t | tz::math::clamp (generic_number_t value, generic_number_t min_val, generic_number_t max_val) |
Constrain a value to lie between two further values. | |
+vec3 | tz::math::cross (vec3 x, vec3 y) |
Calculate the cross-product of two vectors. | |
+float | tz::math::distance (generic_number_t x, generic_number_t y) |
Calculate the distance between two points. | |
+float | tz::math::dot (generic_number_t x, generic_number_t y) |
Calculate the dot product of two vectors. | |
+generic_number_t | tz::math::exp (generic_number_t x) |
Retrieve the natural exponentiation of the parameter i.e e^x | |
+generic_number_t | tz::math::exp2 (generic_number_t x) |
Retrieve 2^x | |
generic_number_t | tz::math::sqrt (generic_number_t x) |
Retrieve the square-root of the parameter. | |
generic_number_t | tz::math::inverse_sqrt (generic_number_t x) |
Retrieve the inverse of the square-root of the parameter. | |
+bool | tz::math::is_infinity (generic_number_t x) |
Determine whether the parameter is positive of negative infinity. | |
+bool | tz::math::is_nan (generic_number_t x) |
Determine whether the parameter is not-a-number. | |
generic_number_t | tz::math::step (generic_number_t edge, generic_number_t x) |
Generates a step function by comparing two values. | |
+generic_number_t | tz::math::smooth_step (generic_number_t edge0, generic_number_t edge1, generic_number_t x) |
Perform Hermite interpolation between two values. | |
+float | tz::math::magnitude (vecn x) |
Calculate the length of a vector. | |
+vecn | tz::math::normalise (vecn x) |
Calculate the unit-vector in the same direction as the parameter vector. | |
+generic_number_t | tz::math::ln (generic_number_t x) |
Retrieve the natural logarithm o fthe parameter. | |
+generic_number_t | tz::math::log (generic_number_t x) |
Retrieve the base-2 logarithm of the parameter. | |
generic_number_t | tz::math::pow (generic_number_t x, generic_number_t y) |
Retrieve the value of the first parameter raised to the power of the second. | |
+generic_number_t | tz::math::max (generic_number_t x, generic_number_t y) |
Retrieve the greater of two values. | |
+generic_number_t | tz::math::min (generic_number_t x, generic_number_t y) |
Retrieve the min of two values. | |
generic_number_t | tz::math::lerp (generic_number_t x, generic_number_t y, generic_number_t v) |
Linearly interpolate between two values. | |
+generic_number_t | tz::math::mod (generic_number_t x, generic_number_t y) |
Compute value of one parameter modulo another. | |
vecn | tz::math::reflect (vecn i, vecn n) |
Calculate the reflection direction for an incident vector and a normal vector. | |
vecn | tz::math::refract (vecn i, vecn n, float eta) |
Calculate the refraction direction for an incident vector, a normal vector and a ratio of indices of refraction. | |
Access the most basic mathematical functions.
+Import <math>
+generic_number_t tz::math::acos | +( | +generic_number_t | +value | ) | ++ |
Return the arc-cosine of the provided value.
+-1 < value < 1
, otherwise the result is undefined. generic_number_t tz::math::acosh | +( | +generic_number_t | +value | ) | ++ |
Return the arc-hyperbolic-cosine of the provided value.
+value >= 1
, otherwise the result is undefined. generic_number_t tz::math::asin | +( | +generic_number_t | +value | ) | ++ |
Return the arc-sine of the provided value.
+-1 < value < 1
, otherwise the result is undefined. generic_number_t tz::math::asinh | +( | +generic_number_t | +value | ) | ++ |
Return the arc-hyperbolic-sine of the provided value.
+value >= 1
, otherwise the result is undefined. generic_number_t tz::math::atan | +( | +generic_number_t | +value | ) | ++ |
Return the arc-tangent of the provided value.
+value != 0
, otherwise the result is undefined. generic_number_t tz::math::atanh | +( | +generic_number_t | +value | ) | ++ |
Return the arc-hyperbolic-tangent of the provided value.
+-1 < value < 1
, otherwise the result is undefined. generic_number_t tz::math::inverse_sqrt | +( | +generic_number_t | +x | ) | ++ |
Retrieve the inverse of the square-root of the parameter.
+x > 0
, otherwise the result is undefined. generic_number_t tz::math::lerp | +( | +generic_number_t | +x, | +
+ | + | generic_number_t | +y, | +
+ | + | generic_number_t | +v | +
+ | ) | ++ |
Linearly interpolate between two values.
+x * (1 - v) + y * v
generic_number_t tz::math::pow | +( | +generic_number_t | +x, | +
+ | + | generic_number_t | +y | +
+ | ) | ++ |
Retrieve the value of the first parameter raised to the power of the second.
+x^y
vecn tz::math::reflect | +( | +vecn | +i, | +
+ | + | vecn | +n | +
+ | ) | ++ |
Calculate the reflection direction for an incident vector and a normal vector.
+i - 2.0 * tz::math::dot(n, i) * n
vecn tz::math::refract | +( | +vecn | +i, | +
+ | + | vecn | +n, | +
+ | + | float | +eta | +
+ | ) | ++ |
Calculate the refraction direction for an incident vector, a normal vector and a ratio of indices of refraction.
+i
and n
should be normalised, otherwise the result may be distorted. generic_number_t tz::math::sign | +( | +generic_number_t | +value | ) | ++ |
Extract the sign of the parameter.
+-1.0
if the parameter is less than 0.0
, or 1.0
if the parameter is greater than 0.0
. generic_number_t tz::math::sqrt | +( | +generic_number_t | +x | ) | ++ |
Retrieve the square-root of the parameter.
+x >= 0
, otherwise the result is undefined. generic_number_t tz::math::step | +( | +generic_number_t | +edge, | +
+ | + | generic_number_t | +x | +
+ | ) | ++ |
Generates a step function by comparing two values.
+0.0
if x < edge
, otherwise 1.0
. + |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Access matrix operations. +More...
++Namespaces | |
namespace | tz::matrix |
Contains matrix-specific mathematical functions. | |
+Functions | |
mat4 | tz::matrix::decompose_quaternion (vec4 quat) |
Given the quaternion parameter, retrieve a rotational 4x4 matrix which represents a similar rotation in 3D space. | |
+float | tz::matrix::determinant (matn m) |
Calculate the determinant of a matrix. | |
+matn | tz::matrix::inverse (matn m) |
Calculate the inverse of a matrix. | |
+matnm | tz::matrix::transpose (matmn m) |
Calculate the transpose of a matrix. | |
Access matrix operations.
+Import <matrix>
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Retrieve basic pre-computed mesh expressed as an array of unindexed positions (triangles). +More...
++Namespaces | |
namespace | tz::mesh |
Contains pre-computed mesh data. | |
+Variables | |
+vec3[] | tz::mesh::fullscreen_triangle [3] |
A single triangle which fills the entire screen, in clip-space. | |
+vec3[] | tz::mesh::fullscreen_quad [6] |
A quad comprised of two triangles which exactly fills the entire screen, in clip-space. | |
+vec3[] | tz::mesh::fullscreen_cube [36] |
A cube which fills the entire screen and depth -1.0 to 1.0 , in clip-space. | |
Retrieve basic pre-computed mesh expressed as an array of unindexed positions (triangles).
+Import <mesh>
++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Access common noise functions which are already provided for you. +More...
++Namespaces | |
namespace | tz::noise |
Contains noise functions. | |
+Functions | |
float | tz::noise::gold (vec2 uv) |
Gold Noise. | |
float | tz::noise::simplex (vec2 uv) |
Simplex Noise. | |
Access common noise functions which are already provided for you.
+Import <noise>
+float tz::noise::gold | +( | +vec2 | +uv | ) | ++ |
Gold Noise.
+This is extremely fast, but highly volatile noise based on the golden ratio. Recommended for very basic requirements, poor for terrain.
+ +float tz::noise::simplex | +( | +vec2 | +uv | ) | ++ |
Simplex Noise.
+This is a slower, stable, classic noise with little dimensional artifacts. Highly recommended for terrain.
+ ++ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
Welcome to the Topaz documentation.
These might come in useful, or you might find some of these interesting.
+The code snippet you're about to see is the source code of the simplest demo, which simply draws a triangle to the screen. This is known as tz_triangle_demo
.
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+
+ |
+ Topaz 4.1.0.1
+
+ C++20 Graphics Engine
+ |
+