SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
3 changed files with 4 additions and 4 deletions
Showing only changes of commit 38a6c26407 - Show all commits

View File

@ -1,6 +1,6 @@
#include "booster.h";
void Booster::RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, TextureAtlas::TextureIndex idx, Shader& shader, Transformation tran)
void Booster::RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, Shader& shader, Transformation tran)
{
//
//Vector3f playerToQuad = m_player.GetPosition() - m_position;
@ -31,7 +31,7 @@ void Booster::RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, Te
//glDisable(GL_DEPTH_TEST);
shader.Use();
textureAtlas.Bind();
textureAtlas.TextureIndexToCoord(idx, u, v, w, h);
textureAtlas.TextureIndexToCoord(8, u, v, w, h);
//glLoadIdentity();
glLoadMatrixf(tran.GetMatrix().GetInternalValues());
glBegin(GL_QUADS);

View File

@ -9,6 +9,6 @@
class Booster {
public:
void RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, TextureAtlas::TextureIndex idx, Shader& shader, Transformation tran);
void RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, Shader& shader, Transformation tran);
};
#endif

View File

@ -1202,7 +1202,7 @@ void Engine::Render(float elapsedTime) {
m_world.Update(m_bullets, m_player.GetPosition(), m_blockinfo);
m_renderer.UpdateMesh(&m_world, m_player.GetPosition(), m_blockinfo);
m_remotePlayer.Render(m_animeAtlas, m_shader01, all, elapsedTime);
m_booster.RenderBillboard({ 120,20,120 }, m_textureAtlas, texBoostHeal, m_shader01, all);
m_booster.RenderBillboard({ 195,16,195 }, m_textureAtlas, m_shader01, all);
if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas);