(API Change) Remove pointers from all typedefs
Typedef pointers are unsafe. If you do: typedef struct bla *bla_t; then you cannot use it as a constant, such as: const bla_t, because that constant will be to the pointer itself rather than to the underlying data. I admit this was a fundamental mistake that must be corrected. All typedefs that were pointer types will now have their pointers removed from the type itself, and the pointers will be used when they are actually used as variables/parameters/returns instead. This does not break ABI though, which is pretty nice.
This commit is contained in:
@@ -21,10 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <graphics/vec4.h>
|
||||
#include "obs-convenience.h"
|
||||
|
||||
gs_vertbuffer_t create_uv_vbuffer(uint32_t num_verts, bool add_color) {
|
||||
gs_vertbuffer_t *create_uv_vbuffer(uint32_t num_verts, bool add_color) {
|
||||
obs_enter_graphics();
|
||||
|
||||
gs_vertbuffer_t tmp = NULL;
|
||||
gs_vertbuffer_t *tmp = NULL;
|
||||
struct gs_vb_data *vrect = NULL;
|
||||
|
||||
vrect = gs_vbdata_create();
|
||||
@@ -55,11 +55,12 @@ gs_vertbuffer_t create_uv_vbuffer(uint32_t num_verts, bool add_color) {
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void draw_uv_vbuffer(gs_vertbuffer_t vbuf, gs_texture_t tex, gs_effect_t effect,
|
||||
uint32_t num_verts) {
|
||||
gs_texture_t texture = tex;
|
||||
gs_technique_t tech = gs_effect_get_technique(effect, "Draw");
|
||||
gs_eparam_t image = gs_effect_get_param_by_name(effect, "image");
|
||||
void draw_uv_vbuffer(gs_vertbuffer_t *vbuf, gs_texture_t *tex,
|
||||
gs_effect_t *effect, uint32_t num_verts)
|
||||
{
|
||||
gs_texture_t *texture = tex;
|
||||
gs_technique_t *tech = gs_effect_get_technique(effect, "Draw");
|
||||
gs_eparam_t *image = gs_effect_get_param_by_name(effect, "image");
|
||||
size_t passes;
|
||||
|
||||
if (vbuf == NULL || tex == NULL) return;
|
||||
|
Reference in New Issue
Block a user