Blender V2.61 - r43446
Classes | Typedefs | Enumerations | Functions | Variables

drawmesh.c File Reference

#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
#include "BKE_DerivedMesh.h"
#include "BKE_effect.h"
#include "BKE_image.h"
#include "BKE_material.h"
#include "BKE_paint.h"
#include "BKE_property.h"
#include "BKE_scene.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "UI_resources.h"
#include "GPU_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
#include "GPU_material.h"
#include "ED_mesh.h"
#include "ED_uvedit.h"
#include "view3d_intern.h"

Go to the source code of this file.

Classes

struct  drawMeshFaceSelect_userData
struct  drawEMTFMapped_userData
struct  drawTFace_userData
struct  TextureDrawState
struct  TexMatCallback

Typedefs

typedef struct
drawMeshFaceSelect_userData 
drawMeshFaceSelect_userData
typedef struct
drawEMTFMapped_userData 
drawEMTFMapped_userData
typedef struct drawTFace_userData drawTFace_userData
typedef struct TexMatCallback TexMatCallback

Enumerations

enum  { eEdge_Visible = (1<<0), eEdge_Select = (1<<1) }

Functions

static void get_marked_edge_info__orFlags (EdgeHash *eh, int v0, int v1, int flags)
static EdgeHashget_tface_mesh_marked_edge_info (Mesh *me)
static int draw_mesh_face_select__setHiddenOpts (void *userData, int index)
static int draw_mesh_face_select__setSelectOpts (void *userData, int index)
static int draw_mesh_face_select__drawFaceOptsInv (void *userData, int index)
static void draw_mesh_face_select (RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
static Materialgive_current_material_or_def (Object *ob, int matnr)
static int set_draw_settings_cached (int clearcache, MTFace *texface, Material *ma, struct TextureDrawState gtexdraw)
static void draw_textured_begin (Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
static void draw_textured_end (void)
static int draw_tface__set_draw_legacy (MTFace *tface, int has_mcol, int matnr)
static int draw_mcol__set_draw_legacy (MTFace *UNUSED(tface), int has_mcol, int UNUSED(matnr))
static int draw_tface__set_draw (MTFace *tface, int has_mcol, int matnr)
static void add_tface_color_layer (DerivedMesh *dm)
static int draw_tface_mapped__set_draw (void *userData, int index)
static int draw_em_tf_mapped__set_draw (void *userData, int index)
static int wpaint__setSolidDrawOptions_material (void *userData, int index, int *drawSmooth_r)
static int wpaint__setSolidDrawOptions_facemask (void *userData, int index, int *drawSmooth_r)
static void draw_mesh_text (Scene *scene, Object *ob, int glsl)
static int compareDrawOptions (void *userData, int cur_index, int next_index)
static int compareDrawOptionsEm (void *userData, int cur_index, int next_index)
void draw_mesh_textured_old (Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_flags)
static void tex_mat_set_material_cb (void *UNUSED(userData), int mat_nr, void *attribs)
static void tex_mat_set_texture_cb (void *userData, int mat_nr, void *attribs)
static int tex_mat_set_face_mesh_cb (void *userData, int index)
static int tex_mat_set_face_editmesh_cb (void *UNUSED(userData), int index)
void draw_mesh_textured (Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_flags)

Variables

static struct TextureDrawState Gtexdraw

Detailed Description

Definition in file drawmesh.c.


Typedef Documentation


Enumeration Type Documentation

anonymous enum
Enumerator:
eEdge_Visible 
eEdge_Select 

Definition at line 95 of file drawmesh.c.


Function Documentation

static void add_tface_color_layer ( DerivedMesh dm) [static]
static int compareDrawOptions ( void *  userData,
int  cur_index,
int  next_index 
) [static]
static int compareDrawOptionsEm ( void *  userData,
int  cur_index,
int  next_index 
) [static]
static int draw_em_tf_mapped__set_draw ( void *  userData,
int  index 
) [static]
static int draw_mcol__set_draw_legacy ( MTFace UNUSEDtface,
int  has_mcol,
int   UNUSEDmatnr 
) [static]

Definition at line 425 of file drawmesh.c.

Referenced by draw_mesh_textured_old().

static void draw_mesh_face_select ( RegionView3D rv3d,
Mesh me,
DerivedMesh dm 
) [static]
static int draw_mesh_face_select__drawFaceOptsInv ( void *  userData,
int  index 
) [static]

Definition at line 168 of file drawmesh.c.

References MFace::flag, ME_FACE_SEL, ME_HIDE, and Mesh::mface.

Referenced by draw_mesh_face_select().

static int draw_mesh_face_select__setHiddenOpts ( void *  userData,
int  index 
) [static]
static int draw_mesh_face_select__setSelectOpts ( void *  userData,
int  index 
) [static]
static void draw_mesh_text ( Scene scene,
Object ob,
int  glsl 
) [static]
void draw_mesh_textured ( Scene scene,
View3D v3d,
RegionView3D rv3d,
Object ob,
DerivedMesh dm,
int  draw_flags 
)
void draw_mesh_textured_old ( Scene scene,
View3D v3d,
RegionView3D rv3d,
Object ob,
DerivedMesh dm,
int  draw_flags 
)
static void draw_textured_begin ( Scene scene,
View3D v3d,
RegionView3D rv3d,
Object ob 
) [static]
static void draw_textured_end ( void  ) [static]

Definition at line 369 of file drawmesh.c.

References GPU_default_lights(), GPU_set_tpage(), and NULL.

Referenced by draw_mesh_textured_old().

static int draw_tface__set_draw ( MTFace tface,
int  has_mcol,
int  matnr 
) [static]
static int draw_tface__set_draw_legacy ( MTFace tface,
int  has_mcol,
int  matnr 
) [static]
static int draw_tface_mapped__set_draw ( void *  userData,
int  index 
) [static]
static void get_marked_edge_info__orFlags ( EdgeHash eh,
int  v0,
int  v1,
int  flags 
) [static]
static EdgeHash* get_tface_mesh_marked_edge_info ( Mesh me) [static]
static Material* give_current_material_or_def ( Object ob,
int  matnr 
) [static]

Definition at line 222 of file drawmesh.c.

References defmaterial, and give_current_material().

Referenced by set_draw_settings_cached().

static int set_draw_settings_cached ( int  clearcache,
MTFace texface,
Material ma,
struct TextureDrawState  gtexdraw 
) [static]
static int tex_mat_set_face_editmesh_cb ( void *  UNUSEDuserData,
int  index 
) [static]

Definition at line 845 of file drawmesh.c.

References EM_get_face_for_index(), and EditFace::h.

Referenced by draw_mesh_textured().

static int tex_mat_set_face_mesh_cb ( void *  userData,
int  index 
) [static]

Definition at line 835 of file drawmesh.c.

References data, TexMatCallback::me, ME_HIDE, and Mesh::mface.

Referenced by draw_mesh_textured().

static void tex_mat_set_material_cb ( void *  UNUSEDuserData,
int  mat_nr,
void *  attribs 
) [static]

Definition at line 763 of file drawmesh.c.

References GPU_enable_material().

Referenced by draw_mesh_textured().

static void tex_mat_set_texture_cb ( void *  userData,
int  mat_nr,
void *  attribs 
) [static]
static int wpaint__setSolidDrawOptions_facemask ( void *  userData,
int  index,
int *  drawSmooth_r 
) [static]

Definition at line 566 of file drawmesh.c.

References MFace::flag, ME_HIDE, and Mesh::mface.

Referenced by draw_mesh_textured_old().

static int wpaint__setSolidDrawOptions_material ( void *  userData,
int  index,
int *  drawSmooth_r 
) [static]

Variable Documentation

struct TextureDrawState Gtexdraw [static]