wip: practica1
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/buffer.h
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/buffer.h
									
									
									
									
									
								
							| @@ -1,10 +1,21 @@ | ||||
| #ifndef BUFFER_H_ | ||||
| #define BUFFER_H_ | ||||
|  | ||||
| #include <vector> | ||||
|  | ||||
| #include "../lib/glm/glm.hpp" | ||||
|  | ||||
| struct Buffer { | ||||
| 	glm::vec3 position{ 0.0f, 0.0f, 0.0f }; | ||||
| #include "vertex.h" | ||||
| #include "shader.h" | ||||
|  | ||||
| class Buffer { | ||||
| public: | ||||
| 	Buffer(const std::vector<Vertex>& vertices, const std::vector<uint16_t>& indices); | ||||
|  | ||||
| 	void Draw(const Shader& shader) const; | ||||
|  | ||||
| private: | ||||
| 	uint32_t VAO, VBO, EBO; | ||||
| }; | ||||
|  | ||||
| #endif // BUFFER_H_ | ||||
		Reference in New Issue
	
	Block a user
	 izenynn
					izenynn