Blender  V2.93
Macros | Typedefs | Enumerations | Functions | Variables
draw_hair.c File Reference

Contains procedural GPU hair drawing methods. More...

#include "DRW_render.h"
#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
#include "DNA_collection_types.h"
#include "DNA_customdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_particle_types.h"
#include "BKE_duplilist.h"
#include "GPU_batch.h"
#include "GPU_shader.h"
#include "GPU_vertex_buffer.h"
#include "draw_hair_private.h"

Go to the source code of this file.

Macros

#define USE_TRANSFORM_FEEDBACK
 

Typedefs

typedef enum ParticleRefineShader ParticleRefineShader
 

Enumerations

enum  ParticleRefineShader { PART_REFINE_CATMULL_ROM = 0 , PART_REFINE_MAX_SHADER }
 

Functions

static GPUShaderhair_refine_shader_get (ParticleRefineShader sh)
 
void DRW_hair_init (void)
 
static ParticleHairCachedrw_hair_particle_cache_get (Object *object, ParticleSystem *psys, ModifierData *md, int subdiv, int thickness_res)
 
GPUVertBufDRW_hair_pos_buffer_get (Object *object, ParticleSystem *psys, ModifierData *md)
 
void DRW_hair_duplimat_get (Object *object, ParticleSystem *psys, ModifierData *UNUSED(md), float(*dupli_mat)[4])
 
DRWShadingGroupDRW_shgroup_hair_create_sub (Object *object, ParticleSystem *psys, ModifierData *md, DRWShadingGroup *shgrp_parent)
 
void DRW_hair_update (void)
 
void DRW_hair_free (void)
 

Variables

static GPUVertBufg_dummy_vbo = NULL
 
static GPUTextureg_dummy_texture = NULL
 
static GPUShaderg_refine_shaders [PART_REFINE_MAX_SHADER] = {NULL}
 
static DRWPassg_tf_pass
 
char datatoc_common_hair_lib_glsl []
 
char datatoc_common_hair_refine_vert_glsl []
 
char datatoc_gpu_shader_3D_smooth_color_frag_glsl []
 

Detailed Description

Contains procedural GPU hair drawing methods.

Definition in file draw_hair.c.

Macro Definition Documentation

◆ USE_TRANSFORM_FEEDBACK

#define USE_TRANSFORM_FEEDBACK

Definition at line 45 of file draw_hair.c.

Typedef Documentation

◆ ParticleRefineShader

Enumeration Type Documentation

◆ ParticleRefineShader

Enumerator
PART_REFINE_CATMULL_ROM 
PART_REFINE_MAX_SHADER 

Definition at line 48 of file draw_hair.c.

Function Documentation

◆ DRW_hair_duplimat_get()

void DRW_hair_duplimat_get ( Object object,
ParticleSystem psys,
ModifierData UNUSEDmd,
float(*)  dupli_mat[4] 
)

◆ DRW_hair_free()

void DRW_hair_free ( void  )

◆ DRW_hair_init()

void DRW_hair_init ( void  )

◆ drw_hair_particle_cache_get()

static ParticleHairCache* drw_hair_particle_cache_get ( Object object,
ParticleSystem psys,
ModifierData md,
int  subdiv,
int  thickness_res 
)
static

◆ DRW_hair_pos_buffer_get()

GPUVertBuf* DRW_hair_pos_buffer_get ( Object object,
ParticleSystem psys,
ModifierData md 
)

◆ DRW_hair_update()

void DRW_hair_update ( void  )

◆ DRW_shgroup_hair_create_sub()

DRWShadingGroup* DRW_shgroup_hair_create_sub ( Object object,
ParticleSystem psys,
ModifierData md,
DRWShadingGroup shgrp_parent 
)

◆ hair_refine_shader_get()

static GPUShader* hair_refine_shader_get ( ParticleRefineShader  sh)
static

Variable Documentation

◆ datatoc_common_hair_lib_glsl

char datatoc_common_hair_lib_glsl[]
extern

Referenced by hair_refine_shader_get().

◆ datatoc_common_hair_refine_vert_glsl

char datatoc_common_hair_refine_vert_glsl[]
extern

Referenced by hair_refine_shader_get().

◆ datatoc_gpu_shader_3D_smooth_color_frag_glsl

char datatoc_gpu_shader_3D_smooth_color_frag_glsl[]
extern

Referenced by hair_refine_shader_get().

◆ g_dummy_texture

GPUTexture* g_dummy_texture = NULL
static

Definition at line 68 of file draw_hair.c.

Referenced by DRW_hair_free(), DRW_hair_init(), and DRW_shgroup_hair_create_sub().

◆ g_dummy_vbo

GPUVertBuf* g_dummy_vbo = NULL
static

Definition at line 67 of file draw_hair.c.

Referenced by DRW_hair_free(), and DRW_hair_init().

◆ g_refine_shaders

GPUShader* g_refine_shaders[PART_REFINE_MAX_SHADER] = {NULL}
static

Definition at line 69 of file draw_hair.c.

Referenced by DRW_hair_free(), and hair_refine_shader_get().

◆ g_tf_pass

DRWPass* g_tf_pass
static

Definition at line 70 of file draw_hair.c.

Referenced by DRW_hair_init(), drw_hair_particle_cache_get(), and DRW_hair_update().