Cleanup: GPU arg wrapping
This commit is contained in:
@@ -93,8 +93,9 @@ if (GPU_basic_shader_use_glsl_get()) { \
|
||||
} ((void)0)
|
||||
|
||||
|
||||
void GPU_basic_shader_colors(const float diffuse[3], const float specular[3],
|
||||
int shininess, float alpha);
|
||||
void GPU_basic_shader_colors(
|
||||
const float diffuse[3], const float specular[3],
|
||||
int shininess, float alpha);
|
||||
|
||||
/* Fixed Function Lighting */
|
||||
|
||||
|
||||
@@ -97,8 +97,9 @@ void GPU_clear_tpage(bool force);
|
||||
* - this affects fixed functions materials and texface, not glsl */
|
||||
|
||||
int GPU_default_lights(void);
|
||||
int GPU_scene_object_lights(struct Scene *scene, struct Object *ob,
|
||||
int lay, float viewmat[4][4], int ortho);
|
||||
int GPU_scene_object_lights(
|
||||
struct Scene *scene, struct Object *ob,
|
||||
int lay, float viewmat[4][4], int ortho);
|
||||
|
||||
/* Text render
|
||||
* - based on moving uv coordinates */
|
||||
@@ -132,13 +133,15 @@ void GPU_set_gpu_mipmapping(int gpu_mipmap);
|
||||
void GPU_paint_update_image(struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h);
|
||||
void GPU_update_images_framechange(void);
|
||||
int GPU_update_image_time(struct Image *ima, double time);
|
||||
int GPU_verify_image(struct Image *ima,
|
||||
struct ImageUser *iuser, int textarget, int tftile, bool compare, bool mipmap, bool is_data);
|
||||
void GPU_create_gl_tex(unsigned int *bind, unsigned int *rect, float *frect, int rectw, int recth,
|
||||
int textarget, bool mipmap, bool use_hight_bit_depth, struct Image *ima);
|
||||
int GPU_verify_image(
|
||||
struct Image *ima, struct ImageUser *iuser,
|
||||
int textarget, int tftile, bool compare, bool mipmap, bool is_data);
|
||||
void GPU_create_gl_tex(
|
||||
unsigned int *bind, unsigned int *rect, float *frect, int rectw, int recth,
|
||||
int textarget, bool mipmap, bool use_hight_bit_depth, struct Image *ima);
|
||||
void GPU_create_gl_tex_compressed(
|
||||
unsigned int *bind, unsigned int *pix, int x, int y, int mipmap,
|
||||
int textarget, struct Image *ima, struct ImBuf *ibuf);
|
||||
unsigned int *bind, unsigned int *pix, int x, int y, int mipmap,
|
||||
int textarget, struct Image *ima, struct ImBuf *ibuf);
|
||||
bool GPU_upload_dxt_texture(struct ImBuf *ibuf);
|
||||
void GPU_free_image(struct Image *ima);
|
||||
void GPU_free_images(void);
|
||||
|
||||
@@ -521,8 +521,9 @@ int GPU_basic_shader_bound_options(void)
|
||||
|
||||
/* Material Colors */
|
||||
|
||||
void GPU_basic_shader_colors(const float diffuse[3], const float specular[3],
|
||||
int shininess, float alpha)
|
||||
void GPU_basic_shader_colors(
|
||||
const float diffuse[3], const float specular[3],
|
||||
int shininess, float alpha)
|
||||
{
|
||||
float gl_diffuse[4], gl_specular[4];
|
||||
|
||||
|
||||
@@ -86,8 +86,10 @@ typedef struct GPUFunction {
|
||||
} GPUFunction;
|
||||
|
||||
/* Indices match the GPUType enum */
|
||||
static const char *GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
|
||||
NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
|
||||
static const char *GPU_DATATYPE_STR[17] = {
|
||||
"", "float", "vec2", "vec3", "vec4",
|
||||
NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4",
|
||||
};
|
||||
|
||||
/* GLSL code parsing for finding function definitions.
|
||||
* These are stored in a hash for lookup when creating a material. */
|
||||
|
||||
@@ -562,7 +562,9 @@ static void gpu_verify_high_bit_srgb_buffer(float *srgb_frect,
|
||||
}
|
||||
}
|
||||
|
||||
int GPU_verify_image(Image *ima, ImageUser *iuser, int textarget, int tftile, bool compare, bool mipmap, bool is_data)
|
||||
int GPU_verify_image(
|
||||
Image *ima, ImageUser *iuser,
|
||||
int textarget, int tftile, bool compare, bool mipmap, bool is_data)
|
||||
{
|
||||
unsigned int *bind = NULL;
|
||||
int tpx = 0, tpy = 0;
|
||||
@@ -844,8 +846,9 @@ static void gpu_del_cube_map(void **cube_map)
|
||||
}
|
||||
|
||||
/* Image *ima can be NULL */
|
||||
void GPU_create_gl_tex(unsigned int *bind, unsigned int *rect, float *frect, int rectw, int recth,
|
||||
int textarget, bool mipmap, bool use_high_bit_depth, Image *ima)
|
||||
void GPU_create_gl_tex(
|
||||
unsigned int *bind, unsigned int *rect, float *frect, int rectw, int recth,
|
||||
int textarget, bool mipmap, bool use_high_bit_depth, Image *ima)
|
||||
{
|
||||
ImBuf *ibuf = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user