Blender  V2.59
Classes | 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_property_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
#include "DNA_object_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 "BIF_gl.h"
#include "BIF_glutil.h"
#include "UI_resources.h"
#include "GPU_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
#include "ED_mesh.h"
#include "view3d_intern.h"

Go to the source code of this file.

Classes

struct  TextureDrawState

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_tfaces3D__setHiddenOpts (void *userData, int index)
static int draw_tfaces3D__setSeamOpts (void *userData, int index)
static int draw_tfaces3D__setSelectOpts (void *userData, int index)
static int draw_tfaces3D__drawFaceOptsInv (void *userData, int index)
static void draw_tfaces3D (RegionView3D *rv3d, Mesh *me, DerivedMesh *dm, short draw_seams)
static Materialgive_current_material_or_def (Object *ob, int matnr)
static int set_draw_settings_cached (int clearcache, int textured, MTFace *texface, int lit, Object *litob, int litmatnr, int doublesided)
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, MCol *mcol, int matnr)
static int draw_tface__set_draw (MTFace *tface, MCol *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 (void *userData, int index, int *drawSmooth_r)
static void draw_mesh_text (Scene *scene, Object *ob, int glsl)
void draw_mesh_textured (Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int faceselect)

Variables

static struct TextureDrawState Gtexdraw

Detailed Description

Definition in file drawmesh.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
eEdge_Visible 
eEdge_Select 

Definition at line 76 of file drawmesh.c.


Function Documentation

static void add_tface_color_layer ( DerivedMesh dm) [static]
static int draw_em_tf_mapped__set_draw ( 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  faceselect 
)
static void draw_textured_begin ( Scene scene,
View3D v3d,
RegionView3D rv3d,
Object ob 
) [static]
static void draw_textured_end ( void  ) [static]

Definition at line 389 of file drawmesh.c.

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

Referenced by draw_mesh_textured().

static int draw_tface__set_draw ( MTFace tface,
MCol mcol,
int  matnr 
) [static]
static int draw_tface__set_draw_legacy ( MTFace tface,
MCol mcol,
int  matnr 
) [static]
static int draw_tface_mapped__set_draw ( void *  userData,
int  index 
) [static]
static void draw_tfaces3D ( RegionView3D rv3d,
Mesh me,
DerivedMesh dm,
short  draw_seams 
) [static]
static int draw_tfaces3D__drawFaceOptsInv ( void *  userData,
int  index 
) [static]

Definition at line 200 of file drawmesh.c.

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

Referenced by draw_tfaces3D().

static int draw_tfaces3D__setHiddenOpts ( void *  userData,
int  index 
) [static]
static int draw_tfaces3D__setSeamOpts ( void *  userData,
int  index 
) [static]
static int draw_tfaces3D__setSelectOpts ( void *  userData,
int  index 
) [static]

Definition at line 164 of file drawmesh.c.

References BLI_edgehash_lookup(), eEdge_Select, MEdge::v1, and MEdge::v2.

Referenced by draw_tfaces3D().

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 266 of file drawmesh.c.

References defmaterial, and give_current_material().

Referenced by set_draw_settings_cached().

static int set_draw_settings_cached ( int  clearcache,
int  textured,
MTFace texface,
int  lit,
Object litob,
int  litmatnr,
int  doublesided 
) [static]
static int wpaint__setSolidDrawOptions ( void *  userData,
int  index,
int *  drawSmooth_r 
) [static]

Definition at line 557 of file drawmesh.c.

References MFace::flag, ME_HIDE, Mesh::mface, MTFace::mode, Mesh::mtface, and TF_INVISIBLE.

Referenced by draw_mesh_textured().


Variable Documentation

struct TextureDrawState Gtexdraw [static]