mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
'Assets', some refactor
This commit is contained in:
parent
b7e8ff5bea
commit
2aba3e91db
19 changed files with 350 additions and 213 deletions
|
|
@ -96,8 +96,7 @@ bool chunks_comparator(size_t i, size_t j) {
|
|||
}
|
||||
|
||||
|
||||
void draw_world(Camera* camera, Shader* shader, Texture* texture,
|
||||
Shader* crosshairShader, Shader* linesShader,
|
||||
void draw_world(Camera* camera, Assets* assets,
|
||||
Chunks* chunks, bool occlusion){
|
||||
glClearColor(0.7f,0.71f,0.73f,1);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
|
@ -105,6 +104,10 @@ void draw_world(Camera* camera, Shader* shader, Texture* texture,
|
|||
_chunks = chunks;
|
||||
|
||||
// Draw VAO
|
||||
Texture* texture = assets->getTexture("block");
|
||||
Shader* shader = assets->getShader("main");
|
||||
Shader* crosshairShader = assets->getShader("crosshair");
|
||||
Shader* linesShader = assets->getShader("lines");
|
||||
shader->use();
|
||||
shader->uniformMatrix("u_proj", camera->getProjection());
|
||||
shader->uniformMatrix("u_view", camera->getView());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue