19 : instance_(instance), texture_(
texture), tile_mapping_texture_(tile_mapping_texture)
23 if (tile_mapping_texture_) {
32 if (tile_mapping_texture_) {
49 pass.
push_constant(
"far_near_distances", instance_.state.sh_params.far_near);
50 pass.
push_constant(
"shuffle", instance_.state.sh_params.shuffle);
52 pass.
push_constant(
"is_image_premultiplied", instance_.state.sh_params.use_premul_alpha);
60 if (tile_mapping_texture_) {
65 pass.
push_constant(
"is_repeated", instance_.state.flags.do_tile_drawing);
69 instance_.manager->submit(instance_.state.image_ps, instance_.state.view);
void draw_procedural(GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceIDRange res_id={}, uint custom_id=0)
void shader_set(gpu::Shader *shader)
void bind_texture(const char *name, gpu::Texture *texture, GPUSamplerState state=sampler_auto)
void state_set(DRWState state, int clip_plane_count=0)
void push_constant(const char *name, const float &data)
A running instance of the engine.
void image_sync(blender::Image *image, blender::ImageUser *iuser) const override
~ImageSpaceDrawingMode() override
ImageSpaceDrawingMode(Instance &instance, gpu::Texture *texture, gpu::Texture *tile_mapping_texture=nullptr, const bool owned=false)
void begin_sync() const override
void draw_viewport() const override
static ShaderModule & module_get()
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
detail::Pass< command::DrawCommandBuf > PassSimple
@ GPU_SAMPLER_EXTEND_MODE_REPEAT
@ GPU_SAMPLER_FILTERING_DEFAULT
MatBase< float, 4, 4 > float4x4
void GPU_texture_free(gpu::Texture *texture)
void GPU_texture_ref(gpu::Texture *texture)