Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/GPU_draw.h')
-rw-r--r--source/blender/gpu/GPU_draw.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index 3ddec157c49..0992f8e9d21 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -36,14 +36,16 @@
extern "C" {
#endif
+struct ImBuf;
struct Image;
struct ImageUser;
-struct MTFace;
+struct MTexPoly;
struct Object;
struct Scene;
struct View3D;
struct RegionView3D;
struct SmokeModifierData;
+struct DupliObject;
/* OpenGL drawing functions related to shading. These are also
* shared with the game engine, where there were previously
@@ -57,10 +59,6 @@ struct SmokeModifierData;
void GPU_state_init(void);
-/* Debugging */
-
-void GPU_state_print(void);
-
/* Material drawing
* - first the state is initialized by a particular object and
* it's materials
@@ -71,10 +69,14 @@ void GPU_state_print(void);
void GPU_begin_object_materials(struct View3D *v3d, struct RegionView3D *rv3d,
struct Scene *scene, struct Object *ob, bool glsl, bool *do_alpha_after);
void GPU_end_object_materials(void);
+bool GPU_object_materials_check(void);
int GPU_enable_material(int nr, void *attribs);
void GPU_disable_material(void);
+void GPU_begin_dupli_object(struct DupliObject *dob);
+void GPU_end_dupli_object(void);
+
void GPU_material_diffuse_get(int nr, float diff[4]);
bool GPU_material_use_matcaps_get(void);
@@ -86,8 +88,9 @@ int GPU_get_material_alpha_blend(void);
* be drawn using one or the other
* - passing NULL clears the state again */
-int GPU_set_tpage(struct MTFace *tface, int mipmap, int transp);
+int GPU_set_tpage(struct MTexPoly *mtexpoly, int mipmap, int transp);
void GPU_clear_tpage(bool force);
+
/* Lights
* - returns how many lights were enabled
* - this affects fixed functions materials and texface, not glsl */
@@ -99,18 +102,20 @@ int GPU_scene_object_lights(struct Scene *scene, struct Object *ob,
/* Text render
* - based on moving uv coordinates */
-void GPU_render_text(struct MTFace *tface, int mode,
- const char *textstr, int textlen, unsigned int *col,
- float *v1, float *v2, float *v3, float *v4, int glattrib);
+void GPU_render_text(
+ struct MTexPoly *mtexpoly, int mode,
+ const char *textstr, int textlen, unsigned int *col,
+ const float *v_quad[4], const float *uv_quad[4],
+ int glattrib);
/* Mipmap settings
* - these will free textures on changes */
-void GPU_set_mipmap(int mipmap);
-int GPU_get_mipmap(void);
-void GPU_set_linear_mipmap(int linear);
-int GPU_get_linear_mipmap(void);
-void GPU_paint_set_mipmap(int mipmap);
+void GPU_set_mipmap(bool mipmap);
+bool GPU_get_mipmap(void);
+void GPU_set_linear_mipmap(bool linear);
+bool GPU_get_linear_mipmap(void);
+void GPU_paint_set_mipmap(bool mipmap);
/* Anisotropic filtering settings
* - these will free textures on changes */
@@ -123,11 +128,11 @@ void GPU_set_gpu_mipmapping(int gpu_mipmap);
/* Image updates and free
* - these deal with images bound as opengl textures */
-void GPU_paint_update_image(struct Image *ima, int x, int y, int w, int h);
+void GPU_paint_update_image(struct Image *ima, 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 tftile, bool compare, bool mipmap, bool is_data);
-void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float *frect, int rectw, int recth,
+void GPU_create_gl_tex(unsigned int *bind, unsigned int *rect, float *frect, int rectw, int recth,
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, struct Image *ima, struct ImBuf *ibuf);
bool GPU_upload_dxt_texture(struct ImBuf *ibuf);
@@ -143,6 +148,11 @@ void GPU_create_smoke(struct SmokeModifierData *smd, int highres);
/* Delayed free of OpenGL buffers by main thread */
void GPU_free_unused_buffers(void);
+#ifdef WITH_OPENSUBDIV
+struct DerivedMesh;
+void GPU_draw_update_fvar_offset(struct DerivedMesh *dm);
+#endif
+
#ifdef __cplusplus
}
#endif