Cleanup: Fix warnings in Overlay Next
This commit is contained in:
@@ -12,13 +12,9 @@ namespace blender::draw::overlay {
|
||||
|
||||
class Background {
|
||||
private:
|
||||
const SelectionType selection_type_;
|
||||
|
||||
PassSimple bg_ps_ = {"Background"};
|
||||
|
||||
public:
|
||||
Background(const SelectionType selection_type) : selection_type_(selection_type){};
|
||||
|
||||
void begin_sync(Resources &res, const State &state)
|
||||
{
|
||||
DRWState pass_state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_BACKGROUND;
|
||||
|
||||
@@ -17,8 +17,6 @@ namespace blender::draw::overlay {
|
||||
|
||||
class Grid {
|
||||
private:
|
||||
const SelectionType selection_type_;
|
||||
|
||||
UniformBuffer<OVERLAY_GridData> data_;
|
||||
|
||||
PassSimple grid_ps_ = {"grid_ps_"};
|
||||
@@ -32,8 +30,6 @@ class Grid {
|
||||
bool enabled_ = false;
|
||||
|
||||
public:
|
||||
Grid(const SelectionType selection_type) : selection_type_(selection_type){};
|
||||
|
||||
void begin_sync(Resources &res, const State &state, const View &view)
|
||||
{
|
||||
this->update_ubo(state, view);
|
||||
|
||||
@@ -33,11 +33,11 @@ class Instance {
|
||||
State state;
|
||||
|
||||
/** Overlay types. */
|
||||
Background background = {selection_type_};
|
||||
Prepass prepass = {selection_type_};
|
||||
Background background;
|
||||
Prepass prepass;
|
||||
Metaballs metaballs = {selection_type_};
|
||||
Empties empties = {selection_type_};
|
||||
Grid grid = {selection_type_};
|
||||
Grid grid;
|
||||
|
||||
Instance(const SelectionType selection_type) : selection_type_(selection_type){};
|
||||
|
||||
|
||||
@@ -15,14 +15,10 @@ namespace blender::draw::overlay {
|
||||
|
||||
class Prepass {
|
||||
private:
|
||||
const SelectionType selection_type_;
|
||||
|
||||
PassMain prepass_ps_ = {"prepass"};
|
||||
PassMain prepass_in_front_ps_ = {"prepass_in_front"};
|
||||
|
||||
public:
|
||||
Prepass(const SelectionType selection_type) : selection_type_(selection_type){};
|
||||
|
||||
void begin_sync(Resources &res, const State &state)
|
||||
{
|
||||
auto init_pass = [&](PassMain &pass) {
|
||||
|
||||
@@ -15,8 +15,9 @@ ShaderModule::ShaderPtr ShaderModule::selectable_shader(const char *create_info_
|
||||
/* TODO: This is what it should be like with all variations defined with create infos. */
|
||||
// std::string create_info_name = base_create_info;
|
||||
// create_info_name += SelectEngineT::shader_suffix;
|
||||
// create_info_name += ClippingEnabled ? "_clipped" : "";
|
||||
// create_info_name += clipping_enabled_ ? "_clipped" : "";
|
||||
// this->shader_ = GPU_shader_create_from_info_name(create_info_name.c_str());
|
||||
UNUSED_VARS(clipping_enabled_);
|
||||
|
||||
/* WORKAROUND: ... but for now, we have to patch the create info used by the old engine. */
|
||||
gpu::shader::ShaderCreateInfo info = *reinterpret_cast<const gpu::shader::ShaderCreateInfo *>(
|
||||
|
||||
Reference in New Issue
Block a user