mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-07-12 16:06:16 +03:00
TMP / Fixed vulkan_adapter.cpp
This commit is contained in:
@ -25,30 +25,26 @@ struct Vertex {
|
||||
};
|
||||
|
||||
class Texture : private progressia::main::NonCopyable {
|
||||
public:
|
||||
using Backend = void *;
|
||||
|
||||
private:
|
||||
Backend backend;
|
||||
struct Backend;
|
||||
std::unique_ptr<Backend> backend;
|
||||
friend class GraphicsInterface;
|
||||
|
||||
friend class Primitive;
|
||||
|
||||
public:
|
||||
Texture(Backend);
|
||||
Texture(std::unique_ptr<Backend>);
|
||||
~Texture();
|
||||
};
|
||||
|
||||
class Primitive : private progressia::main::NonCopyable {
|
||||
public:
|
||||
using Backend = void *;
|
||||
|
||||
private:
|
||||
Backend backend;
|
||||
|
||||
struct Backend;
|
||||
std::unique_ptr<Backend> backend;
|
||||
friend class GraphicsInterface;
|
||||
|
||||
public:
|
||||
Primitive(Backend);
|
||||
Primitive(std::unique_ptr<Backend>);
|
||||
~Primitive();
|
||||
|
||||
void draw();
|
||||
@ -57,14 +53,13 @@ class Primitive : private progressia::main::NonCopyable {
|
||||
};
|
||||
|
||||
class View : private progressia::main::NonCopyable {
|
||||
public:
|
||||
using Backend = void *;
|
||||
|
||||
private:
|
||||
Backend backend;
|
||||
struct Backend;
|
||||
std::unique_ptr<Backend> backend;
|
||||
friend class GraphicsInterface;
|
||||
|
||||
public:
|
||||
View(Backend);
|
||||
View(std::unique_ptr<Backend>);
|
||||
~View();
|
||||
|
||||
void configure(const glm::mat4 &proj, const glm::mat4 &view);
|
||||
@ -72,14 +67,13 @@ class View : private progressia::main::NonCopyable {
|
||||
};
|
||||
|
||||
class Light : private progressia::main::NonCopyable {
|
||||
public:
|
||||
using Backend = void *;
|
||||
|
||||
private:
|
||||
Backend backend;
|
||||
struct Backend;
|
||||
std::unique_ptr<Backend> backend;
|
||||
friend class GraphicsInterface;
|
||||
|
||||
public:
|
||||
Light(Backend);
|
||||
Light(std::unique_ptr<Backend>);
|
||||
~Light();
|
||||
|
||||
void configure(const glm::vec3 &color, const glm::vec3 &from,
|
||||
@ -98,18 +92,18 @@ class GraphicsInterface : private progressia::main::NonCopyable {
|
||||
GraphicsInterface(Backend);
|
||||
~GraphicsInterface();
|
||||
|
||||
Texture *newTexture(const Image &);
|
||||
std::unique_ptr<Texture> newTexture(const Image &);
|
||||
|
||||
Primitive *newPrimitive(const std::vector<Vertex> &,
|
||||
const std::vector<Vertex::Index> &,
|
||||
Texture *texture);
|
||||
std::unique_ptr<Primitive> newPrimitive(const std::vector<Vertex> &,
|
||||
const std::vector<Vertex::Index> &,
|
||||
Texture *texture);
|
||||
|
||||
glm::vec2 getViewport() const;
|
||||
|
||||
void setModelTransform(const glm::mat4 &);
|
||||
|
||||
View *newView();
|
||||
Light *newLight();
|
||||
std::unique_ptr<View> newView();
|
||||
std::unique_ptr<Light> newLight();
|
||||
|
||||
void flush();
|
||||
void startNextLayer();
|
||||
|
Reference in New Issue
Block a user