Open Broadcaster Software
Free, open source software for live streaming and recording
graphics-internal.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
17 
18 #pragma once
19 
20 #include "../util/threading.h"
21 #include "../util/darray.h"
22 #include "graphics.h"
23 #include "matrix3.h"
24 #include "matrix4.h"
25 
26 struct gs_exports {
27  const char *(*device_get_name)(void);
28  int (*device_get_type)(void);
30  bool (*callback)(void*, const char*, uint32_t),
31  void*);
32  const char *(*device_preprocessor_name)(void);
33  int (*device_create)(gs_device_t **device, uint32_t adapter);
34  void (*device_destroy)(gs_device_t *device);
37  gs_swapchain_t *(*device_swapchain_create)(gs_device_t *device,
38  const struct gs_init_data *data);
39  void (*device_resize)(gs_device_t *device, uint32_t x, uint32_t y);
40  void (*device_get_size)(const gs_device_t *device,
41  uint32_t *x, uint32_t *y);
44  gs_texture_t *(*device_texture_create)(gs_device_t *device,
45  uint32_t width, uint32_t height,
46  enum gs_color_format color_format, uint32_t levels,
47  const uint8_t **data, uint32_t flags);
48  gs_texture_t *(*device_cubetexture_create)(gs_device_t *device,
49  uint32_t size, enum gs_color_format color_format,
50  uint32_t levels, const uint8_t **data, uint32_t flags);
51  gs_texture_t *(*device_voltexture_create)(gs_device_t *device,
52  uint32_t width, uint32_t height, uint32_t depth,
53  enum gs_color_format color_format, uint32_t levels,
54  const uint8_t **data, uint32_t flags);
55  gs_zstencil_t *(*device_zstencil_create)(gs_device_t *device,
56  uint32_t width, uint32_t height,
58  gs_stagesurf_t *(*device_stagesurface_create)(gs_device_t *device,
59  uint32_t width, uint32_t height,
60  enum gs_color_format color_format);
61  gs_samplerstate_t *(*device_samplerstate_create)(gs_device_t *device,
62  const struct gs_sampler_info *info);
63  gs_shader_t *(*device_vertexshader_create)(gs_device_t *device,
64  const char *shader, const char *file,
65  char **error_string);
66  gs_shader_t *(*device_pixelshader_create)(gs_device_t *device,
67  const char *shader, const char *file,
68  char **error_string);
69  gs_vertbuffer_t *(*device_vertexbuffer_create)(gs_device_t *device,
70  struct gs_vb_data *data, uint32_t flags);
71  gs_indexbuffer_t *(*device_indexbuffer_create)(gs_device_t *device,
72  enum gs_index_type type, void *indices, size_t num,
73  uint32_t flags);
75  const gs_texture_t *texture);
77  gs_vertbuffer_t *vertbuffer);
79  gs_indexbuffer_t *indexbuffer);
81  int unit);
83  gs_samplerstate_t *samplerstate, int unit);
85  gs_shader_t *vertshader);
87  gs_shader_t *pixelshader);
89  bool b_3d, int unit);
90  gs_shader_t *(*device_get_vertex_shader)(const gs_device_t *device);
91  gs_shader_t *(*device_get_pixel_shader)(const gs_device_t *device);
92  gs_texture_t *(*device_get_render_target)(const gs_device_t *device);
93  gs_zstencil_t *(*device_get_zstencil_target)(const gs_device_t *device);
95  gs_zstencil_t *zstencil);
97  gs_texture_t *cubetex, int side, gs_zstencil_t *zstencil);
99  gs_texture_t *src);
101  gs_texture_t *dst, uint32_t dst_x, uint32_t dst_y,
102  gs_texture_t *src, uint32_t src_x, uint32_t src_y,
103  uint32_t src_w, uint32_t src_h);
105  gs_texture_t *src);
106  void (*device_begin_scene)(gs_device_t *device);
107  void (*device_draw)(gs_device_t *device, enum gs_draw_mode draw_mode,
108  uint32_t start_vert, uint32_t num_verts);
109  void (*device_end_scene)(gs_device_t *device);
111  gs_swapchain_t *swaphchain);
112  void (*device_clear)(gs_device_t *device, uint32_t clear_flags,
113  const struct vec4 *color, float depth, uint8_t stencil);
114  void (*device_present)(gs_device_t *device);
115  void (*device_flush)(gs_device_t *device);
117  enum gs_cull_mode mode);
119  void (*device_enable_blending)(gs_device_t *device, bool enable);
120  void (*device_enable_depth_test)(gs_device_t *device, bool enable);
121  void (*device_enable_stencil_test)(gs_device_t *device, bool enable);
122  void (*device_enable_stencil_write)(gs_device_t *device, bool enable);
123  void (*device_enable_color)(gs_device_t *device, bool red, bool green,
124  bool blue, bool alpha);
126  enum gs_blend_type src, enum gs_blend_type dest);
128  enum gs_blend_type src_c, enum gs_blend_type dest_c,
129  enum gs_blend_type src_a, enum gs_blend_type dest_a);
131  enum gs_depth_test test);
133  enum gs_stencil_side side, enum gs_depth_test test);
135  enum gs_stencil_side side,
136  enum gs_stencil_op_type fail,
137  enum gs_stencil_op_type zfail,
138  enum gs_stencil_op_type zpass);
139  void (*device_set_viewport)(gs_device_t *device, int x, int y,
140  int width, int height);
141  void (*device_get_viewport)(const gs_device_t *device,
142  struct gs_rect *rect);
144  const struct gs_rect *rect);
145  void (*device_ortho)(gs_device_t *device, float left, float right,
146  float top, float bottom, float znear, float zfar);
147  void (*device_frustum)(gs_device_t *device, float left, float right,
148  float top, float bottom, float znear, float zfar);
151 
153 
158  const gs_texture_t *tex);
160  uint32_t *linesize);
163  void *(*gs_texture_get_obj)(const gs_texture_t *tex);
164 
168  const gs_texture_t *cubetex);
169 
175  const gs_texture_t *voltex);
176 
181  const gs_stagesurf_t *stagesurf);
183  uint8_t **data, uint32_t *linesize);
185 
186  void (*gs_zstencil_destroy)(gs_zstencil_t *zstencil);
187 
189 
193  const struct gs_vb_data *data);
194  struct gs_vb_data *(*gs_vertexbuffer_get_data)(
195  const gs_vertbuffer_t *vertbuffer);
196 
198  void (*gs_indexbuffer_flush)(gs_indexbuffer_t *indexbuffer);
200  const void *data);
201  void *(*gs_indexbuffer_get_data)(const gs_indexbuffer_t *indexbuffer);
203  const gs_indexbuffer_t *indexbuffer);
205  const gs_indexbuffer_t *indexbuffer);
206 
207  void (*gs_shader_destroy)(gs_shader_t *shader);
208  int (*gs_shader_get_num_params)(const gs_shader_t *shader);
209  gs_sparam_t *(*gs_shader_get_param_by_idx)(gs_shader_t *shader,
210  uint32_t param);
211  gs_sparam_t *(*gs_shader_get_param_by_name)(gs_shader_t *shader,
212  const char *name);
213  gs_sparam_t *(*gs_shader_get_viewproj_matrix)(
214  const gs_shader_t *shader);
215  gs_sparam_t *(*gs_shader_get_world_matrix)(const gs_shader_t *shader);
216  void (*gs_shader_get_param_info)(const gs_sparam_t *param,
217  struct gs_shader_param_info *info);
218  void (*gs_shader_set_bool)(gs_sparam_t *param, bool val);
219  void (*gs_shader_set_float)(gs_sparam_t *param, float val);
220  void (*gs_shader_set_int)(gs_sparam_t *param, int val);
222  const struct matrix3 *val);
224  const struct matrix4 *val);
225  void (*gs_shader_set_vec2)(gs_sparam_t *param, const struct vec2 *val);
226  void (*gs_shader_set_vec3)(gs_sparam_t *param, const struct vec3 *val);
227  void (*gs_shader_set_vec4)(gs_sparam_t *param, const struct vec4 *val);
229  void (*gs_shader_set_val)(gs_sparam_t *param, const void *val,
230  size_t size);
233  gs_samplerstate_t *sampler);
234 
235 #ifdef __APPLE__
236  /* OSX/Cocoa specific functions */
237  gs_texture_t *(*device_texture_create_from_iosurface)(gs_device_t *dev,
238  void *iosurf);
239  bool (*gs_texture_rebind_iosurface)(gs_texture_t *texture,
240  void *iosurf);
241 
242 #elif _WIN32
243  bool (*device_gdi_texture_available)(void);
244  bool (*device_shared_texture_available)(void);
245 
246  bool (*device_get_duplicator_monitor_info)(gs_device_t *device,
247  int monitor_idx, struct gs_monitor_info *monitor_info);
248 
249  gs_duplicator_t *(*device_duplicator_create)(gs_device_t *device,
250  int monitor_idx);
251  void (*gs_duplicator_destroy)(gs_duplicator_t *duplicator);
252 
253  bool (*gs_duplicator_update_frame)(gs_duplicator_t *duplicator);
254  gs_texture_t *(*gs_duplicator_get_texture)(gs_duplicator_t *duplicator);
255 
256  gs_texture_t *(*device_texture_create_gdi)(gs_device_t *device,
257  uint32_t width, uint32_t height);
258 
259  void *(*gs_texture_get_dc)(gs_texture_t *gdi_tex);
260  void (*gs_texture_release_dc)(gs_texture_t *gdi_tex);
261 
262  gs_texture_t *(*device_texture_open_shared)(gs_device_t *device,
263  uint32_t handle);
264 #endif
265 };
266 
267 struct blend_state {
268  bool enabled;
273 };
274 
276  void *module;
279 
280  DARRAY(struct gs_rect) viewport_stack;
281 
282  DARRAY(struct matrix4) matrix_stack;
283  size_t cur_matrix;
284 
287 
289 
291  struct gs_vb_data *vbd;
293  DARRAY(struct vec3) verts;
294  DARRAY(struct vec3) norms;
296  DARRAY(struct vec2) texverts[16];
297 
298  pthread_mutex_t effect_mutex;
300 
301  pthread_mutex_t mutex;
302  volatile long ref;
303 
305  DARRAY(struct blend_state) blend_state_stack;
306 };
gs_vertbuffer_t * immediate_vertbuffer
Definition: graphics-internal.h:292
void(* device_destroy)(gs_device_t *device)
Definition: graphics-internal.h:34
void(* device_stencil_function)(gs_device_t *device, enum gs_stencil_side side, enum gs_depth_test test)
Definition: graphics-internal.h:132
gs_texture_type
Definition: graphics.h:165
void(* gs_cubetexture_destroy)(gs_texture_t *cubetex)
Definition: graphics-internal.h:165
enum gs_color_format(* gs_voltexture_get_color_format)(const gs_texture_t *voltex)
Definition: graphics-internal.h:174
void(* device_leave_context)(gs_device_t *device)
Definition: graphics-internal.h:36
size_t cur_matrix
Definition: graphics-internal.h:283
void(* device_enable_stencil_write)(gs_device_t *device, bool enable)
Definition: graphics-internal.h:122
volatile long ref
Definition: graphics-internal.h:302
bool(* gs_stagesurface_map)(gs_stagesurf_t *stagesurf, uint8_t **data, uint32_t *linesize)
Definition: graphics-internal.h:182
Definition: graphics.h:216
void(* device_set_render_target)(gs_device_t *device, gs_texture_t *tex, gs_zstencil_t *zstencil)
Definition: graphics-internal.h:94
void(* device_projection_push)(gs_device_t *device)
Definition: graphics-internal.h:149
struct gs_shader gs_shader_t
Definition: graphics.h:266
unsigned uint32_t
Definition: vc_stdint.h:31
void(* gs_swapchain_destroy)(gs_swapchain_t *swapchain)
Definition: graphics-internal.h:152
void(* device_enable_color)(gs_device_t *device, bool red, bool green, bool blue, bool alpha)
Definition: graphics-internal.h:123
uint32_t(* gs_voltexture_get_height)(const gs_texture_t *voltex)
Definition: graphics-internal.h:172
void(* device_stencil_op)(gs_device_t *device, enum gs_stencil_side side, enum gs_stencil_op_type fail, enum gs_stencil_op_type zfail, enum gs_stencil_op_type zpass)
Definition: graphics-internal.h:134
Definition: vec3.h:33
void(* gs_shader_set_float)(gs_sparam_t *param, float val)
Definition: graphics-internal.h:219
enum gs_color_format format
Definition: graphics.h:459
void(* gs_shader_set_default)(gs_sparam_t *param)
Definition: graphics-internal.h:231
void(* device_copy_texture)(gs_device_t *device, gs_texture_t *dst, gs_texture_t *src)
Definition: graphics-internal.h:98
struct gs_vertex_buffer gs_vertbuffer_t
Definition: graphics.h:261
bool(* device_enum_adapters)(bool(*callback)(void *, const char *, uint32_t), void *)
Definition: graphics-internal.h:29
struct gs_exports exports
Definition: graphics-internal.h:278
struct gs_stage_surface gs_stagesurf_t
Definition: graphics.h:259
struct gs_device gs_device_t
Definition: graphics.h:271
Definition: vec2.h:27
void(* device_load_swapchain)(gs_device_t *device, gs_swapchain_t *swaphchain)
Definition: graphics-internal.h:110
struct gs_vb_data * vbd
Definition: graphics-internal.h:291
Definition: graphics.h:455
void(* device_enable_stencil_test)(gs_device_t *device, bool enable)
Definition: graphics-internal.h:121
gs_stencil_side
Definition: graphics.h:121
void(* device_present)(gs_device_t *device)
Definition: graphics-internal.h:114
DARRAY(struct gs_rect) viewport_stack
struct gs_shader_param gs_sparam_t
Definition: graphics.h:267
uint32_t(* gs_texture_get_height)(const gs_texture_t *tex)
Definition: graphics-internal.h:156
gs_color_format
Definition: graphics.h:56
void(* device_resize)(gs_device_t *device, uint32_t x, uint32_t y)
Definition: graphics-internal.h:39
void(* device_get_size)(const gs_device_t *device, uint32_t *x, uint32_t *y)
Definition: graphics-internal.h:40
unsigned char uint8_t
Definition: vc_stdint.h:27
void(* device_frustum)(gs_device_t *device, float left, float right, float top, float bottom, float znear, float zfar)
Definition: graphics-internal.h:147
void(* device_projection_pop)(gs_device_t *device)
Definition: graphics-internal.h:150
void(* device_ortho)(gs_device_t *device, float left, float right, float top, float bottom, float znear, float zfar)
Definition: graphics-internal.h:145
enum gs_texture_type(* device_get_texture_type)(const gs_texture_t *texture)
Definition: graphics-internal.h:74
void(* device_set_cull_mode)(gs_device_t *device, enum gs_cull_mode mode)
Definition: graphics-internal.h:116
void(* gs_indexbuffer_flush_direct)(gs_indexbuffer_t *indexbuffer, const void *data)
Definition: graphics-internal.h:199
int(* gs_shader_get_num_params)(const gs_shader_t *shader)
Definition: graphics-internal.h:208
Definition: matrix3.h:31
enum gs_index_type(* gs_indexbuffer_get_type)(const gs_indexbuffer_t *indexbuffer)
Definition: graphics-internal.h:204
void * module
Definition: graphics-internal.h:276
bool using_immediate
Definition: graphics-internal.h:290
void(* gs_stagesurface_unmap)(gs_stagesurf_t *stagesurf)
Definition: graphics-internal.h:184
void(* gs_stagesurface_destroy)(gs_stagesurf_t *stagesurf)
Definition: graphics-internal.h:177
void(* device_clear)(gs_device_t *device, uint32_t clear_flags, const struct vec4 *color, float depth, uint8_t stencil)
Definition: graphics-internal.h:112
Definition: vec4.h:30
void(* gs_shader_set_matrix3)(gs_sparam_t *param, const struct matrix3 *val)
Definition: graphics-internal.h:221
void(* gs_vertexbuffer_flush)(gs_vertbuffer_t *vertbuffer)
Definition: graphics-internal.h:191
gs_stencil_op_type
Definition: graphics.h:127
void(* gs_texture_destroy)(gs_texture_t *tex)
Definition: graphics-internal.h:154
gs_index_type
Definition: graphics.h:85
int(* device_get_type)(void)
Definition: graphics-internal.h:28
Definition: graphics-internal.h:275
uint32_t(* device_get_width)(const gs_device_t *device)
Definition: graphics-internal.h:42
enum gs_color_format(* gs_stagesurface_get_color_format)(const gs_stagesurf_t *stagesurf)
Definition: graphics-internal.h:180
gs_cull_mode
Definition: graphics.h:90
void(* gs_zstencil_destroy)(gs_zstencil_t *zstencil)
Definition: graphics-internal.h:186
void(* gs_vertexbuffer_flush_direct)(gs_vertbuffer_t *vertbuffer, const struct gs_vb_data *data)
Definition: graphics-internal.h:192
Definition: graphics-internal.h:267
Definition: effect.h:139
void(* gs_shader_set_texture)(gs_sparam_t *param, gs_texture_t *val)
Definition: graphics-internal.h:228
Definition: graphics-internal.h:26
void(* device_set_viewport)(gs_device_t *device, int x, int y, int width, int height)
Definition: graphics-internal.h:139
enum gs_color_format(* gs_texture_get_color_format)(const gs_texture_t *tex)
Definition: graphics-internal.h:157
void(* device_blend_function)(gs_device_t *device, enum gs_blend_type src, enum gs_blend_type dest)
Definition: graphics-internal.h:125
enum gs_color_format(* gs_cubetexture_get_color_format)(const gs_texture_t *cubetex)
Definition: graphics-internal.h:167
void(* device_load_vertexbuffer)(gs_device_t *device, gs_vertbuffer_t *vertbuffer)
Definition: graphics-internal.h:76
void(* gs_samplerstate_destroy)(gs_samplerstate_t *samplerstate)
Definition: graphics-internal.h:188
void(* device_flush)(gs_device_t *device)
Definition: graphics-internal.h:115
bool enabled
Definition: graphics-internal.h:268
struct gs_effect * first_effect
Definition: graphics-internal.h:299
void(* gs_shader_set_val)(gs_sparam_t *param, const void *val, size_t size)
Definition: graphics-internal.h:229
Definition: matrix4.h:32
void(* device_load_texture)(gs_device_t *device, gs_texture_t *tex, int unit)
Definition: graphics-internal.h:80
struct gs_index_buffer gs_indexbuffer_t
Definition: graphics.h:262
void(* device_load_default_samplerstate)(gs_device_t *device, bool b_3d, int unit)
Definition: graphics-internal.h:88
gs_device_t * device
Definition: graphics-internal.h:277
void(* gs_shader_set_vec2)(gs_sparam_t *param, const struct vec2 *val)
Definition: graphics-internal.h:225
enum gs_blend_type dest_c
Definition: graphics-internal.h:270
struct gs_texture gs_texture_t
Definition: graphics.h:258
void(* device_draw)(gs_device_t *device, enum gs_draw_mode draw_mode, uint32_t start_vert, uint32_t num_verts)
Definition: graphics-internal.h:107
void(* device_enter_context)(gs_device_t *device)
Definition: graphics-internal.h:35
struct gs_zstencil_buffer gs_zstencil_t
Definition: graphics.h:260
void(* gs_indexbuffer_destroy)(gs_indexbuffer_t *indexbuffer)
Definition: graphics-internal.h:197
uint32_t(* gs_voltexture_get_depth)(const gs_texture_t *voltex)
Definition: graphics-internal.h:173
void(* gs_vertexbuffer_destroy)(gs_vertbuffer_t *vertbuffer)
Definition: graphics-internal.h:190
void(* gs_shader_set_bool)(gs_sparam_t *param, bool val)
Definition: graphics-internal.h:218
void(* gs_texture_unmap)(gs_texture_t *tex)
Definition: graphics-internal.h:161
void(* device_load_samplerstate)(gs_device_t *device, gs_samplerstate_t *samplerstate, int unit)
Definition: graphics-internal.h:82
Definition: graphics.h:171
void(* device_set_scissor_rect)(gs_device_t *device, const struct gs_rect *rect)
Definition: graphics-internal.h:143
uint32_t(* device_get_height)(const gs_device_t *device)
Definition: graphics-internal.h:43
struct gs_sampler_state gs_samplerstate_t
Definition: graphics.h:263
gs_draw_mode
Definition: graphics.h:48
Definition: graphics.h:295
size_t(* gs_indexbuffer_get_num_indices)(const gs_indexbuffer_t *indexbuffer)
Definition: graphics-internal.h:202
enum gs_cull_mode(* device_get_cull_mode)(const gs_device_t *device)
Definition: graphics-internal.h:118
void(* gs_shader_destroy)(gs_shader_t *shader)
Definition: graphics-internal.h:207
void(* device_get_viewport)(const gs_device_t *device, struct gs_rect *rect)
Definition: graphics-internal.h:141
void(* device_end_scene)(gs_device_t *device)
Definition: graphics-internal.h:109
void(* gs_shader_set_vec3)(gs_sparam_t *param, const struct vec3 *val)
Definition: graphics-internal.h:226
void(* device_enable_depth_test)(gs_device_t *device, bool enable)
Definition: graphics-internal.h:120
enum gs_blend_type dest_a
Definition: graphics-internal.h:272
uint32_t(* gs_voltexture_get_width)(const gs_texture_t *voltex)
Definition: graphics-internal.h:171
void(* device_load_pixelshader)(gs_device_t *device, gs_shader_t *pixelshader)
Definition: graphics-internal.h:86
void(* device_depth_function)(gs_device_t *device, enum gs_depth_test test)
Definition: graphics-internal.h:130
void(* device_stage_texture)(gs_device_t *device, gs_stagesurf_t *dst, gs_texture_t *src)
Definition: graphics-internal.h:104
struct gs_effect * cur_effect
Definition: graphics-internal.h:286
Definition: graphics.h:232
void(* device_load_indexbuffer)(gs_device_t *device, gs_indexbuffer_t *indexbuffer)
Definition: graphics-internal.h:78
struct matrix4 projection
Definition: graphics-internal.h:285
uint32_t(* gs_cubetexture_get_size)(const gs_texture_t *cubetex)
Definition: graphics-internal.h:166
void(* gs_voltexture_destroy)(gs_texture_t *voltex)
Definition: graphics-internal.h:170
void(* device_begin_scene)(gs_device_t *device)
Definition: graphics-internal.h:106
uint32_t * colors
Definition: graphics.h:189
uint32_t(* gs_stagesurface_get_height)(const gs_stagesurf_t *stagesurf)
Definition: graphics-internal.h:179
uint32_t(* gs_texture_get_width)(const gs_texture_t *tex)
Definition: graphics-internal.h:155
pthread_mutex_t effect_mutex
Definition: graphics-internal.h:298
void(* device_enable_blending)(gs_device_t *device, bool enable)
Definition: graphics-internal.h:119
enum gs_blend_type src_a
Definition: graphics-internal.h:271
gs_zstencil_format
Definition: graphics.h:77
void(* gs_shader_set_matrix4)(gs_sparam_t *param, const struct matrix4 *val)
Definition: graphics-internal.h:223
pthread_mutex_t mutex
Definition: graphics-internal.h:301
gs_blend_type
Definition: graphics.h:96
void(* gs_shader_set_vec4)(gs_sparam_t *param, const struct vec4 *val)
Definition: graphics-internal.h:227
void(* gs_shader_set_next_sampler)(gs_sparam_t *param, gs_samplerstate_t *sampler)
Definition: graphics-internal.h:232
Definition: graphics.h:184
uint32_t(* gs_stagesurface_get_width)(const gs_stagesurf_t *stagesurf)
Definition: graphics-internal.h:178
void(* gs_indexbuffer_flush)(gs_indexbuffer_t *indexbuffer)
Definition: graphics-internal.h:198
void(* device_load_vertexshader)(gs_device_t *device, gs_shader_t *vertshader)
Definition: graphics-internal.h:84
float x
Definition: vec4.h:33
size_t num
Definition: graphics.h:185
float y
Definition: vec4.h:33
#define bool
Definition: vc_stdbool.h:5
gs_depth_test
Definition: graphics.h:110
bool(* gs_texture_is_rect)(const gs_texture_t *tex)
Definition: graphics-internal.h:162
void(* gs_shader_set_int)(gs_sparam_t *param, int val)
Definition: graphics-internal.h:220
void(* gs_shader_get_param_info)(const gs_sparam_t *param, struct gs_shader_param_info *info)
Definition: graphics-internal.h:216
gs_vertbuffer_t * sprite_buffer
Definition: graphics-internal.h:288
int(* device_create)(gs_device_t **device, uint32_t adapter)
Definition: graphics-internal.h:33
bool(* gs_texture_map)(gs_texture_t *tex, uint8_t **ptr, uint32_t *linesize)
Definition: graphics-internal.h:159
struct blend_state cur_blend_state
Definition: graphics-internal.h:304
void(* device_set_cube_render_target)(gs_device_t *device, gs_texture_t *cubetex, int side, gs_zstencil_t *zstencil)
Definition: graphics-internal.h:96
struct gs_swap_chain gs_swapchain_t
Definition: graphics.h:264
void(* device_copy_texture_region)(gs_device_t *device, gs_texture_t *dst, uint32_t dst_x, uint32_t dst_y, gs_texture_t *src, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h)
Definition: graphics-internal.h:100
void(* device_blend_function_separate)(gs_device_t *device, enum gs_blend_type src_c, enum gs_blend_type dest_c, enum gs_blend_type src_a, enum gs_blend_type dest_a)
Definition: graphics-internal.h:127
enum gs_blend_type src_c
Definition: graphics-internal.h:269