ReShade
A generic post-processing injector for games and video software.
reshade_api.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Patrick Mours
3  * SPDX-License-Identifier: BSD-3-Clause OR MIT
4  */
5 
6 #pragma once
7 
8 #include "reshade_api_device.hpp"
9 
10 namespace reshade { namespace api
11 {
33 
38  struct __declspec(novtable) effect_runtime : public swapchain
39  {
45 
58  virtual void render_effects(command_list *cmd_list, resource_view rtv, resource_view rtv_srgb = { 0 }) = 0;
59 
64  virtual bool capture_screenshot(uint8_t *pixels) = 0;
65 
69  virtual void get_screenshot_width_and_height(uint32_t *out_width, uint32_t *out_height) const = 0;
70 
76  virtual bool is_key_down(uint32_t keycode) const = 0;
82  virtual bool is_key_pressed(uint32_t keycode) const = 0;
88  virtual bool is_key_released(uint32_t keycode) const = 0;
94  virtual bool is_mouse_button_down(uint32_t button) const = 0;
100  virtual bool is_mouse_button_pressed(uint32_t button) const = 0;
106  virtual bool is_mouse_button_released(uint32_t button) const = 0;
107 
114  virtual void get_mouse_cursor_position(uint32_t *out_x, uint32_t *out_y, int16_t *out_wheel_delta = nullptr) const = 0;
115 
122  virtual void enumerate_uniform_variables(const char *effect_name, void(*callback)(effect_runtime *runtime, effect_uniform_variable variable, void *user_data), void *user_data) = 0;
128  template <typename F>
129  inline void enumerate_uniform_variables(const char *effect_name, F lambda)
130  {
131  enumerate_uniform_variables(effect_name, [](effect_runtime *runtime, effect_uniform_variable variable, void *user_data) { static_cast<F *>(user_data)->operator()(runtime, variable); }, &lambda);
132  }
133 
140  virtual effect_uniform_variable find_uniform_variable(const char *effect_name, const char *variable_name) const = 0;
141 
150  virtual void get_uniform_variable_type(effect_uniform_variable variable, format *out_base_type, uint32_t *out_rows = nullptr, uint32_t *out_columns = nullptr, uint32_t *out_array_length = nullptr) const = 0;
151 
158  virtual void get_uniform_variable_name(effect_uniform_variable variable, char *name, size_t *name_size) const = 0;
159  template <size_t SIZE>
160  inline void get_uniform_variable_name(effect_uniform_variable variable, char(&name)[SIZE]) const
161  {
162  size_t name_size = SIZE;
163  get_uniform_variable_name(variable, name, &name_size);
164  }
165 
174  virtual bool get_annotation_bool_from_uniform_variable(effect_uniform_variable variable, const char *name, bool *values, size_t count, size_t array_index = 0) const = 0;
183  virtual bool get_annotation_float_from_uniform_variable(effect_uniform_variable variable, const char *name, float *values, size_t count, size_t array_index = 0) const = 0;
192  virtual bool get_annotation_int_from_uniform_variable(effect_uniform_variable variable, const char *name, int32_t *values, size_t count, size_t array_index = 0) const = 0;
201  virtual bool get_annotation_uint_from_uniform_variable(effect_uniform_variable variable, const char *name, uint32_t *values, size_t count, size_t array_index = 0) const = 0;
209  virtual bool get_annotation_string_from_uniform_variable(effect_uniform_variable variable, const char *name, char *value, size_t *value_size) const = 0;
210  template <size_t SIZE>
211  inline bool get_annotation_string_from_uniform_variable(effect_uniform_variable variable, const char *name, char(&value)[SIZE]) const
212  {
213  size_t value_size = SIZE;
214  return get_annotation_string_from_uniform_variable(variable, name, value, &value_size);
215  }
216 
224  virtual void get_uniform_value_bool(effect_uniform_variable variable, bool *values, size_t count, size_t array_index = 0) const = 0;
232  virtual void get_uniform_value_float(effect_uniform_variable variable, float *values, size_t count, size_t array_index = 0) const = 0;
240  virtual void get_uniform_value_int(effect_uniform_variable variable, int32_t *values, size_t count, size_t array_index = 0) const = 0;
248  virtual void get_uniform_value_uint(effect_uniform_variable variable, uint32_t *values, size_t count, size_t array_index = 0) const = 0;
249 
259  virtual void set_uniform_value_bool(effect_uniform_variable variable, const bool *values, size_t count, size_t array_index = 0) = 0;
270  inline void set_uniform_value_bool(effect_uniform_variable variable, bool x, bool y = bool(0), bool z = bool(0), bool w = bool(0))
271  {
272  const bool values[4] = { x, y, z, w };
273  set_uniform_value_bool(variable, values, 4);
274  }
284  virtual void set_uniform_value_float(effect_uniform_variable variable, const float *values, size_t count, size_t array_index = 0) = 0;
295  inline void set_uniform_value_float(effect_uniform_variable variable, float x, float y = float(0), float z = float(0), float w = float(0))
296  {
297  const float values[4] = { x, y, z, w };
298  set_uniform_value_float(variable, values, 4);
299  }
309  virtual void set_uniform_value_int(effect_uniform_variable variable, const int32_t *values, size_t count, size_t array_index = 0) = 0;
320  inline void set_uniform_value_int(effect_uniform_variable variable, int32_t x, int32_t y = int32_t(0), int32_t z = int32_t(0), int32_t w = int32_t(0))
321  {
322  const int32_t values[4] = { x, y, z, w };
323  set_uniform_value_int(variable, values, 4);
324  }
334  virtual void set_uniform_value_uint(effect_uniform_variable variable, const uint32_t *values, size_t count, size_t array_index = 0) = 0;
345  inline void set_uniform_value_uint(effect_uniform_variable variable, uint32_t x, uint32_t y = uint32_t(0), uint32_t z = uint32_t(0), uint32_t w = uint32_t(0))
346  {
347  const uint32_t values[4] = { x, y, z, w };
348  set_uniform_value_uint(variable, values, 4);
349  }
350 
357  virtual void enumerate_texture_variables(const char *effect_name, void(*callback)(effect_runtime *runtime, effect_texture_variable variable, void *user_data), void *user_data) = 0;
363  template <typename F>
364  inline void enumerate_texture_variables(const char *effect_name, F lambda)
365  {
366  enumerate_texture_variables(effect_name, [](effect_runtime *runtime, effect_texture_variable variable, void *user_data) { static_cast<F *>(user_data)->operator()(runtime, variable); }, &lambda);
367  }
368 
375  virtual effect_texture_variable find_texture_variable(const char *effect_name, const char *variable_name) const = 0;
376 
383  virtual void get_texture_variable_name(effect_texture_variable variable, char *name, size_t *name_size) const = 0;
384  template <size_t SIZE>
385  inline void get_texture_variable_name(effect_texture_variable variable, char(&name)[SIZE]) const
386  {
387  size_t name_size = SIZE;
388  get_texture_variable_name(variable, name, &name_size);
389  }
390 
399  virtual bool get_annotation_bool_from_texture_variable(effect_texture_variable variable, const char *name, bool *values, size_t count, size_t array_index = 0) const = 0;
408  virtual bool get_annotation_float_from_texture_variable(effect_texture_variable variable, const char *name, float *values, size_t count, size_t array_index = 0) const = 0;
417  virtual bool get_annotation_int_from_texture_variable(effect_texture_variable variable, const char *name, int32_t *values, size_t count, size_t array_index = 0) const = 0;
426  virtual bool get_annotation_uint_from_texture_variable(effect_texture_variable variable, const char *name, uint32_t *values, size_t count, size_t array_index = 0) const = 0;
434  virtual bool get_annotation_string_from_texture_variable(effect_texture_variable variable, const char *name, char *value, size_t *value_size) const = 0;
435  template <size_t SIZE>
436  inline bool get_annotation_string_from_texture_variable(effect_texture_variable variable, const char *name, char(&value)[SIZE]) const
437  {
438  size_t value_size = SIZE;
439  return get_annotation_string_from_texture_variable(variable, name, value, &value_size);
440  }
441 
449  virtual void update_texture(effect_texture_variable variable, const uint32_t width, const uint32_t height, const uint8_t *pixels) = 0;
450 
457  virtual void get_texture_binding(effect_texture_variable variable, resource_view *out_srv, resource_view *out_srv_srgb = nullptr) const = 0;
458 
468  virtual void update_texture_bindings(const char *semantic, resource_view srv, resource_view srv_srgb = { 0 }) = 0;
469 
476  virtual void enumerate_techniques(const char *effect_name, void(*callback)(effect_runtime *runtime, effect_technique technique, void *user_data), void *user_data) = 0;
482  template <typename F>
483  inline void enumerate_techniques(const char *effect_name, F lambda)
484  {
485  enumerate_techniques(effect_name, [](effect_runtime *runtime, effect_technique technique, void *user_data) { static_cast<F *>(user_data)->operator()(runtime, technique); }, &lambda);
486  }
487 
494  virtual effect_technique find_technique(const char *effect_name, const char *technique_name) = 0;
495 
502  virtual void get_technique_name(effect_technique technique, char *name, size_t *name_size) const = 0;
503  template <size_t SIZE>
504  inline void get_technique_name(effect_technique technique, char(&name)[SIZE]) const
505  {
506  size_t name_size = SIZE;
507  get_technique_name(technique, name, &name_size);
508  }
509 
518  virtual bool get_annotation_bool_from_technique(effect_technique technique, const char *name, bool *values, size_t count, size_t array_index = 0) const = 0;
527  virtual bool get_annotation_float_from_technique(effect_technique technique, const char *name, float *values, size_t count, size_t array_index = 0) const = 0;
536  virtual bool get_annotation_int_from_technique(effect_technique technique, const char *name, int32_t *values, size_t count, size_t array_index = 0) const = 0;
545  virtual bool get_annotation_uint_from_technique(effect_technique technique, const char *name, uint32_t *values, size_t count, size_t array_index = 0) const = 0;
553  virtual bool get_annotation_string_from_technique(effect_technique technique, const char *name, char *value, size_t *value_size) const = 0;
554  template <size_t SIZE>
555  inline bool get_annotation_string_from_technique(effect_technique technique, const char *name, char(&value)[SIZE]) const
556  {
557  size_t value_size = SIZE;
558  return get_annotation_string_from_technique(technique, name, value, &value_size);
559  }
560 
565  virtual bool get_technique_state(effect_technique technique) const = 0;
571  virtual void set_technique_state(effect_technique technique, bool enabled) = 0;
572 
579  virtual bool get_preprocessor_definition(const char *name, char *value, size_t *value_size) const = 0;
580  template <size_t SIZE>
581  inline bool get_preprocessor_definition(const char *name, char(&value)[SIZE]) const
582  {
583  size_t value_size = SIZE;
584  return get_preprocessor_definition(name, value, &value_size);
585  }
591  virtual void set_preprocessor_definition(const char *name, const char *value) = 0;
592 
605  virtual void render_technique(effect_technique technique, command_list *cmd_list, resource_view rtv, resource_view rtv_srgb = { 0 }) = 0;
606 
610  virtual bool get_effects_state() const = 0;
615  virtual void set_effects_state(bool enabled) = 0;
616 
622  virtual void get_current_preset_path(char *path, size_t *path_size) const = 0;
623  template <size_t SIZE>
624  inline void get_current_preset_path(char(&path)[SIZE]) const
625  {
626  size_t path_size = SIZE;
627  get_current_preset_path(path, &path_size);
628  }
633  virtual void set_current_preset_path(const char *path) = 0;
634 
640  virtual void reorder_techniques(size_t count, const effect_technique *techniques) = 0;
641 
646  virtual void block_input_next_frame() = 0;
647 
651  virtual uint32_t last_key_pressed() const = 0;
655  virtual uint32_t last_key_released() const = 0;
656 
663  virtual void get_uniform_variable_effect_name(effect_uniform_variable variable, char *effect_name, size_t *effect_name_size) const = 0;
664  template <size_t SIZE>
665  inline void get_uniform_variable_effect_name(effect_uniform_variable variable, char(&effect_name)[SIZE]) const
666  {
667  size_t effect_name_size = SIZE;
668  get_uniform_variable_effect_name(variable, effect_name, &effect_name_size);
669  }
670 
677  virtual void get_texture_variable_effect_name(effect_texture_variable variable, char *effect_name, size_t *effect_name_size) const = 0;
678  template <size_t SIZE>
679  inline void get_texture_variable_effect_name(effect_texture_variable variable, char(&effect_name)[SIZE]) const
680  {
681  size_t effect_name_size = SIZE;
682  get_texture_variable_effect_name(variable, effect_name, &effect_name_size);
683  }
684 
691  virtual void get_technique_effect_name(effect_technique technique, char *effect_name, size_t *effect_name_size) const = 0;
692  template <size_t SIZE>
693  inline void get_technique_effect_name(effect_technique technique, char(&effect_name)[SIZE]) const
694  {
695  size_t effect_name_size = SIZE;
696  get_technique_effect_name(technique, effect_name, &effect_name_size);
697  }
698 
702  virtual void save_current_preset() const = 0;
703 
711  virtual bool get_preprocessor_definition_for_effect(const char *effect_name, const char *name, char *value, size_t *value_size) const = 0;
712  template <size_t SIZE>
713  inline bool get_preprocessor_definition_for_effect(const char *effect_name, const char *name, char(&value)[SIZE]) const
714  {
715  size_t value_size = SIZE;
716  return get_preprocessor_definition_for_effect(effect_name, name, value, &value_size);
717  }
724  virtual void set_preprocessor_definition_for_effect(const char *effect_name, const char *name, const char *value) = 0;
725  };
726 } }
format
The available data and texture formats. This is mostly compatible with 'DXGI_FORMAT'.
Definition: reshade_api_format.hpp:18
Definition: reshade.hpp:46
#define RESHADE_DEFINE_HANDLE(name)
Definition: reshade_api_resource.hpp:8
A command list, used to enqueue render commands on the CPU, before later executing them in a command ...
Definition: reshade_api_device.hpp:508
A command queue, used to execute command lists on the GPU.
Definition: reshade_api_device.hpp:916
A ReShade effect runtime, used to control effects.
Definition: reshade_api.hpp:39
virtual bool get_annotation_string_from_uniform_variable(effect_uniform_variable variable, const char *name, char *value, size_t *value_size) const =0
Gets the value from a string annotation attached to the specified uniform variable .
virtual void set_uniform_value_float(effect_uniform_variable variable, const float *values, size_t count, size_t array_index=0)=0
Sets the value of the specified uniform variable as floating-point values.
void enumerate_uniform_variables(const char *effect_name, F lambda)
Enumerates all uniform variables of loaded effects and calls the specified callback function with a h...
Definition: reshade_api.hpp:129
virtual bool get_annotation_string_from_texture_variable(effect_texture_variable variable, const char *name, char *value, size_t *value_size) const =0
Gets the value from a string annotation attached to the specified texture variable .
virtual void get_technique_name(effect_technique technique, char *name, size_t *name_size) const =0
Gets the name of a technique .
virtual void get_technique_effect_name(effect_technique technique, char *effect_name, size_t *effect_name_size) const =0
Gets the effect file name of a technique .
bool get_annotation_string_from_technique(effect_technique technique, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:555
virtual void get_texture_binding(effect_texture_variable variable, resource_view *out_srv, resource_view *out_srv_srgb=nullptr) const =0
Gets the shader resource view that is bound to the specified texture variable .
virtual bool get_annotation_bool_from_technique(effect_technique technique, const char *name, bool *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified technique as boolean values.
virtual bool get_preprocessor_definition(const char *name, char *value, size_t *value_size) const =0
Gets the value of a preprocessor definition.
void set_uniform_value_int(effect_uniform_variable variable, int32_t x, int32_t y=int32_t(0), int32_t z=int32_t(0), int32_t w=int32_t(0))
Sets the value of the specified uniform variable as a vector of signed integer values.
Definition: reshade_api.hpp:320
virtual bool is_key_down(uint32_t keycode) const =0
Gets the current status of the specified key.
void get_technique_name(effect_technique technique, char(&name)[SIZE]) const
Definition: reshade_api.hpp:504
virtual bool get_annotation_bool_from_texture_variable(effect_texture_variable variable, const char *name, bool *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified texture variable as boolean values.
void enumerate_texture_variables(const char *effect_name, F lambda)
Enumerates all texture variables of loaded effects and calls the specified callback function with a h...
Definition: reshade_api.hpp:364
virtual effect_uniform_variable find_uniform_variable(const char *effect_name, const char *variable_name) const =0
Finds a specific uniform variable in the loaded effects and returns a handle to it.
virtual bool is_mouse_button_released(uint32_t button) const =0
Gets whether the specified mouse button was released this frame.
virtual bool is_mouse_button_pressed(uint32_t button) const =0
Gets whether the specified mouse button was pressed this frame.
virtual void get_current_preset_path(char *path, size_t *path_size) const =0
Gets the file path to the currently active preset.
virtual bool get_effects_state() const =0
Gets whether effects are enabled or disabled.
bool get_preprocessor_definition(const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:581
bool get_annotation_string_from_texture_variable(effect_texture_variable variable, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:436
virtual void get_screenshot_width_and_height(uint32_t *out_width, uint32_t *out_height) const =0
Gets the current buffer dimensions of the swap chain.
virtual void block_input_next_frame()=0
Makes ReShade block any keyboard and mouse input from reaching the game for the duration of the next ...
virtual void get_uniform_value_bool(effect_uniform_variable variable, bool *values, size_t count, size_t array_index=0) const =0
Gets the value of the specified uniform variable as boolean values.
void set_uniform_value_bool(effect_uniform_variable variable, bool x, bool y=bool(0), bool z=bool(0), bool w=bool(0))
Sets the value of the specified uniform variable as a vector of boolean values.
Definition: reshade_api.hpp:270
virtual bool get_annotation_float_from_uniform_variable(effect_uniform_variable variable, const char *name, float *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified uniform variable as floating-point value...
bool get_preprocessor_definition_for_effect(const char *effect_name, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:713
virtual void update_texture_bindings(const char *semantic, resource_view srv, resource_view srv_srgb={ 0 })=0
Binds a new shader resource view to all texture variables that use the specified semantic .
virtual void set_technique_state(effect_technique technique, bool enabled)=0
Enables or disables the specified technique .
virtual void set_uniform_value_int(effect_uniform_variable variable, const int32_t *values, size_t count, size_t array_index=0)=0
Sets the value of the specified uniform variable as signed integer values.
virtual uint32_t last_key_released() const =0
Gets the virtual key code of the last key that was released.
virtual void get_uniform_value_uint(effect_uniform_variable variable, uint32_t *values, size_t count, size_t array_index=0) const =0
Gets the value of the specified uniform variable as unsigned integer values.
void get_current_preset_path(char(&path)[SIZE]) const
Definition: reshade_api.hpp:624
virtual void set_uniform_value_uint(effect_uniform_variable variable, const uint32_t *values, size_t count, size_t array_index=0)=0
Sets the value of the specified uniform variable as unsigned integer values.
void get_technique_effect_name(effect_technique technique, char(&effect_name)[SIZE]) const
Definition: reshade_api.hpp:693
virtual void set_uniform_value_bool(effect_uniform_variable variable, const bool *values, size_t count, size_t array_index=0)=0
Sets the value of the specified uniform variable as boolean values.
void set_uniform_value_float(effect_uniform_variable variable, float x, float y=float(0), float z=float(0), float w=float(0))
Sets the value of the specified uniform variable as a vector of floating-point values.
Definition: reshade_api.hpp:295
void set_uniform_value_uint(effect_uniform_variable variable, uint32_t x, uint32_t y=uint32_t(0), uint32_t z=uint32_t(0), uint32_t w=uint32_t(0))
Sets the value of the specified uniform variable as a vector of unsigned integer values.
Definition: reshade_api.hpp:345
virtual void update_texture(effect_texture_variable variable, const uint32_t width, const uint32_t height, const uint8_t *pixels)=0
Uploads 32 bits-per-pixel RGBA image data to the specified texture variable .
virtual void enumerate_techniques(const char *effect_name, void(*callback)(effect_runtime *runtime, effect_technique technique, void *user_data), void *user_data)=0
Enumerates all techniques of loaded effects and calls the specified callback function with a handle ...
virtual void enumerate_uniform_variables(const char *effect_name, void(*callback)(effect_runtime *runtime, effect_uniform_variable variable, void *user_data), void *user_data)=0
Enumerates all uniform variables of loaded effects and calls the specified callback function with a ...
virtual void save_current_preset() const =0
Saves the current preset with the current state of the loaded techniques and uniform variables.
virtual bool get_technique_state(effect_technique technique) const =0
Gets the state of a technique .
virtual void set_preprocessor_definition(const char *name, const char *value)=0
Defines a preprocessor definition to the specified value .
virtual void get_uniform_variable_type(effect_uniform_variable variable, format *out_base_type, uint32_t *out_rows=nullptr, uint32_t *out_columns=nullptr, uint32_t *out_array_length=nullptr) const =0
Gets information about the data type of a uniform variable .
virtual bool get_annotation_uint_from_technique(effect_technique technique, const char *name, uint32_t *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified technique as unsigned integer values.
virtual void get_texture_variable_name(effect_texture_variable variable, char *name, size_t *name_size) const =0
Gets the name of a texture variable .
void get_uniform_variable_effect_name(effect_uniform_variable variable, char(&effect_name)[SIZE]) const
Definition: reshade_api.hpp:665
virtual bool get_annotation_uint_from_texture_variable(effect_texture_variable variable, const char *name, uint32_t *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified texture variable as unsigned integer val...
virtual void get_uniform_value_int(effect_uniform_variable variable, int32_t *values, size_t count, size_t array_index=0) const =0
Gets the value of the specified uniform variable as signed integer values.
virtual void get_uniform_value_float(effect_uniform_variable variable, float *values, size_t count, size_t array_index=0) const =0
Gets the value of the specified uniform variable as floating-point values.
virtual bool get_annotation_bool_from_uniform_variable(effect_uniform_variable variable, const char *name, bool *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified uniform variable as boolean values.
virtual void render_technique(effect_technique technique, command_list *cmd_list, resource_view rtv, resource_view rtv_srgb={ 0 })=0
Applies a technique to the specified render targets (regardless of the state of this technique).
void enumerate_techniques(const char *effect_name, F lambda)
Enumerates all techniques of loaded effects and calls the specified callback function with a handle f...
Definition: reshade_api.hpp:483
virtual void get_uniform_variable_name(effect_uniform_variable variable, char *name, size_t *name_size) const =0
Gets the name of a uniform variable .
virtual bool get_preprocessor_definition_for_effect(const char *effect_name, const char *name, char *value, size_t *value_size) const =0
Gets the value of a preprocessor definition for the specified effect.
virtual uint32_t last_key_pressed() const =0
Gets the virtual key code of the last key that was pressed.
virtual bool is_mouse_button_down(uint32_t button) const =0
Gets the current status of the specified mouse button.
virtual bool get_annotation_int_from_technique(effect_technique technique, const char *name, int32_t *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified technique as signed integer values.
virtual bool get_annotation_string_from_technique(effect_technique technique, const char *name, char *value, size_t *value_size) const =0
Gets the value from a string annotation attached to the specified technique .
bool get_annotation_string_from_uniform_variable(effect_uniform_variable variable, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:211
virtual bool is_key_pressed(uint32_t keycode) const =0
Gets whether the specified key was pressed this frame.
virtual void enumerate_texture_variables(const char *effect_name, void(*callback)(effect_runtime *runtime, effect_texture_variable variable, void *user_data), void *user_data)=0
Enumerates all texture variables of loaded effects and calls the specified callback function with a ...
virtual command_queue * get_command_queue()=0
Gets the main graphics command queue associated with this effect runtime. This may potentially be dif...
virtual bool get_annotation_int_from_texture_variable(effect_texture_variable variable, const char *name, int32_t *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified texture variable as signed integer value...
virtual bool get_annotation_uint_from_uniform_variable(effect_uniform_variable variable, const char *name, uint32_t *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified uniform variable as unsigned integer val...
virtual bool capture_screenshot(uint8_t *pixels)=0
Captures a screenshot of the current back buffer resource and returns its image data in 32 bits-per-p...
virtual void set_preprocessor_definition_for_effect(const char *effect_name, const char *name, const char *value)=0
Defines a preprocessor definition for the specified effect to the specified value .
virtual bool get_annotation_int_from_uniform_variable(effect_uniform_variable variable, const char *name, int32_t *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified uniform variable as signed integer value...
virtual void set_current_preset_path(const char *path)=0
Saves the currently active preset and then switches to the specified new preset.
virtual bool is_key_released(uint32_t keycode) const =0
Gets whether the specified key was released this frame.
void get_texture_variable_effect_name(effect_texture_variable variable, char(&effect_name)[SIZE]) const
Definition: reshade_api.hpp:679
void get_texture_variable_name(effect_texture_variable variable, char(&name)[SIZE]) const
Definition: reshade_api.hpp:385
void get_uniform_variable_name(effect_uniform_variable variable, char(&name)[SIZE]) const
Definition: reshade_api.hpp:160
virtual effect_technique find_technique(const char *effect_name, const char *technique_name)=0
Finds a specific technique in the loaded effects and returns a handle to it.
virtual void get_texture_variable_effect_name(effect_texture_variable variable, char *effect_name, size_t *effect_name_size) const =0
Gets the effect file name of a texture variable .
virtual void render_effects(command_list *cmd_list, resource_view rtv, resource_view rtv_srgb={ 0 })=0
Applies post-processing effects to the specified render targets and prevents the usual rendering of e...
virtual bool get_annotation_float_from_technique(effect_technique technique, const char *name, float *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified technique as floating-point values.
virtual effect_texture_variable find_texture_variable(const char *effect_name, const char *variable_name) const =0
Finds a specific texture variable in the loaded effects and returns a handle to it.
virtual void get_uniform_variable_effect_name(effect_uniform_variable variable, char *effect_name, size_t *effect_name_size) const =0
Gets the effect file name of a uniform variable .
virtual bool get_annotation_float_from_texture_variable(effect_texture_variable variable, const char *name, float *values, size_t count, size_t array_index=0) const =0
Gets the value from an annotation attached to the specified texture variable as floating-point value...
virtual void set_effects_state(bool enabled)=0
Enables or disables all effects.
virtual void reorder_techniques(size_t count, const effect_technique *techniques)=0
Changes the rendering order of loaded techniques to that of the specified technique list.
virtual void get_mouse_cursor_position(uint32_t *out_x, uint32_t *out_y, int16_t *out_wheel_delta=nullptr) const =0
Gets the current absolute position of the mouse cursor in screen coordinates.
An opaque handle to a technique in an effect.
Definition: reshade_api.hpp:18
An opaque handle to a texture variable in an effect.
Definition: reshade_api.hpp:25
An opaque handle to a uniform variable in an effect.
Definition: reshade_api.hpp:32
An opaque handle to a resource view object (depth-stencil, render target, shader resource view,...
Definition: reshade_api_resource.hpp:410
A swap chain, used to present images to the screen.
Definition: reshade_api_device.hpp:991