Initialize gfx objects id to 0 in class instead of constructor
This commit is contained in:
parent
03976206ce
commit
52bb516d5c
9 changed files with 7 additions and 13 deletions
|
|
@ -28,7 +28,7 @@ namespace psemek::gfx
|
|||
void reset();
|
||||
|
||||
private:
|
||||
GLuint id_;
|
||||
GLuint id_ = 0;
|
||||
|
||||
explicit array(std::nullptr_t);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -122,11 +122,10 @@ namespace psemek::gfx
|
|||
}
|
||||
|
||||
private:
|
||||
GLuint id_;
|
||||
GLuint id_ = 0;
|
||||
std::weak_ptr<void> mapped_;
|
||||
|
||||
explicit basic_buffer(std::nullptr_t)
|
||||
: id_{0}
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace psemek::gfx
|
|||
}
|
||||
|
||||
private:
|
||||
GLuint id_;
|
||||
GLuint id_ = 0;
|
||||
|
||||
explicit framebuffer(std::nullptr_t);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -120,12 +120,11 @@ namespace psemek::gfx
|
|||
void uniform_block_binding(GLuint index, GLuint binding) const;
|
||||
|
||||
private:
|
||||
GLuint program_;
|
||||
GLuint program_ = 0;
|
||||
mutable boost::container::flat_map<std::string, GLint, std::less<>> uniforms_;
|
||||
mutable boost::container::flat_map<std::string, GLuint, std::less<>> uniform_blocks_;
|
||||
|
||||
program(std::nullptr_t)
|
||||
: program_{0}
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace psemek::gfx
|
|||
}
|
||||
|
||||
private:
|
||||
GLuint id_;
|
||||
GLuint id_ = 0;
|
||||
geom::vector<std::size_t, 2> size_ = {0, 0};
|
||||
|
||||
explicit renderbuffer(std::nullptr_t);
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ namespace psemek::gfx
|
|||
void clamp();
|
||||
|
||||
protected:
|
||||
GLuint id_;
|
||||
geom::vector<std::size_t, D> size_;
|
||||
GLuint id_ = 0;
|
||||
geom::vector<std::size_t, D> size_ = geom::vector<std::size_t, D>::zero();
|
||||
|
||||
explicit basic_texture(std::nullptr_t);
|
||||
};
|
||||
|
|
@ -465,7 +465,6 @@ namespace psemek::gfx
|
|||
|
||||
template <std::size_t D, GLenum Target>
|
||||
basic_texture<D, Target>::basic_texture(std::nullptr_t)
|
||||
: id_{0}
|
||||
{}
|
||||
|
||||
inline buffer_texture::buffer_texture()
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ namespace psemek::gfx
|
|||
}
|
||||
|
||||
array::array(std::nullptr_t)
|
||||
: id_{0}
|
||||
{}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ namespace psemek::gfx
|
|||
}
|
||||
|
||||
framebuffer::framebuffer(std::nullptr_t)
|
||||
: id_{0}
|
||||
{}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ namespace psemek::gfx
|
|||
}
|
||||
|
||||
renderbuffer::renderbuffer(std::nullptr_t)
|
||||
: id_{0}
|
||||
{}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue