wip
This commit is contained in:
parent
15e2abbada
commit
03b8658666
18 changed files with 257 additions and 57 deletions
|
|
@ -7,26 +7,34 @@ namespace fishbone {
|
|||
class Texture;
|
||||
class Mesh;
|
||||
class Renderer;
|
||||
};
|
||||
}; // namespace fishbone
|
||||
|
||||
/* no includes */
|
||||
#include <fishbone/window.h>
|
||||
#include <fishbone/meshldr.h>
|
||||
|
||||
namespace fishbone {
|
||||
class Texture {
|
||||
struct Impl;
|
||||
Impl* impl;
|
||||
|
||||
public:
|
||||
public:
|
||||
Texture(fishbone::Renderer* renderer, unsigned char* rgba, int width, int height);
|
||||
~Texture();
|
||||
};
|
||||
|
||||
class Mesh {
|
||||
void init(fishbone::Renderer* renderer, std::vector<struct fishbone::Vector3> vertices, std::vector<struct fishbone::Vector2> texcoords, std::vector<struct fishbone::Vector3> normals);
|
||||
|
||||
struct Impl;
|
||||
Impl* impl;
|
||||
|
||||
public:
|
||||
Mesh(fishbone::Renderer* renderer, std::vector<struct fishbone::Vector3> vertices, std::vector<struct fishbone::Vector2> texcoords, std::vector<struct fishbone::Vector3> normals, std::vector<int> elements);
|
||||
public:
|
||||
Mesh(fishbone::Renderer* renderer, std::vector<struct fishbone::Vector3> vertices, std::vector<struct fishbone::Vector2> texcoords, std::vector<struct fishbone::Vector3> normals) {
|
||||
this->init(renderer, vertices, texcoords, normals);
|
||||
}
|
||||
Mesh(fishbone::Renderer* renderer, fishbone::MeshData* data) {
|
||||
this->init(renderer, data->vertices, data->texcoords, data->normals);
|
||||
}
|
||||
~Mesh();
|
||||
|
||||
void draw();
|
||||
|
|
@ -36,10 +44,10 @@ namespace fishbone {
|
|||
struct Impl;
|
||||
Impl* impl;
|
||||
|
||||
public:
|
||||
Renderer();
|
||||
public:
|
||||
Renderer(fishbone::Window* window);
|
||||
~Renderer();
|
||||
};
|
||||
};
|
||||
}; // namespace fishbone
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue