booster affiche
affiche simplement un carre rouge pour l'instant et ne se ramasse pas encore
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
#include "renderer.h"
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
#include <thread>
|
||||
#include <queue>
|
||||
|
||||
Renderer::Renderer() {
|
||||
m_meshes.Reset(nullptr);
|
||||
@@ -131,7 +136,8 @@ void Renderer::RenderWorld(World* origin, int& rendercount, const Vector3f& play
|
||||
}
|
||||
shader.Disable();
|
||||
glStencilFunc(GL_GREATER, 1, 0xFF);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void Renderer::UpdateMesh(World* origin, const Vector3f& player, BlockInfo* blockinfo[BTYPE_LAST]) {
|
||||
int cx = player.x;
|
||||
@@ -238,6 +244,30 @@ void Renderer::UpdateMesh(World* origin, const Vector3f& player, BlockInfo* bloc
|
||||
}
|
||||
}
|
||||
|
||||
void Renderer::RenderBillboard(const Vector3f pos, TextureAtlas textureAtlas, TextureAtlas::TextureIndex idx, Shader& shader, Transformation tran)
|
||||
{
|
||||
//float x = pos.x;
|
||||
//float y = pos.y;
|
||||
//float z = pos.z;
|
||||
//float width = 1.0f;
|
||||
//float height = 1.0f;
|
||||
|
||||
//float u, v, w, h;
|
||||
//shader.Use();
|
||||
//textureAtlas.Bind();
|
||||
//textureAtlas.TextureIndexToCoord(idx, u, v, w, h);
|
||||
|
||||
//glLoadMatrixf(tran.GetMatrix().GetInternalValues());
|
||||
//glBegin(GL_QUADS);
|
||||
//glTexCoord2f(u, v); glVertex3f(x - width / 2., y - height, z); //glVertex3f(v4.x, v4.y, v4.z);//glVertex3f(0, 50, 0);
|
||||
//glTexCoord2f(u + w, v); glVertex3f(x + width / 2., y - height, z); //glVertex3f(v3.x, v3.y, v3.z); //glVertex3f(50,50, 0);
|
||||
//glTexCoord2f(u + w, v + h); glVertex3f(x + width / 2., y, z); //glVertex3f(v2.x, v2.y, v2.z); //glVertex3f(50, 0, 0);
|
||||
//glTexCoord2f(u, v + h); glVertex3f(x - width / 2., y, z); //glVertex3f(v1.x, v1.y, v1.z);// glVertex3f(0, 0, 0);
|
||||
//glEnd();
|
||||
//shader.Disable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Renderer::RenderPlayer(Player* player, Transformation tran) const {
|
||||
}
|
||||
|
Reference in New Issue
Block a user