void CTextureNode::SetVBOData(const u32 aFrame, const f32 aX_i, const f32 aX_f, const f32 aY_i, const f32 aY_f, const f32 aU_i, const f32 aU_f, const f32 aV_i, const f32 aV_f ) { AddVBOData(); m_QuadData.m_TopLeft = D5_T2F_V3F(glm::vec2(aU_i,aV_i), glm::vec3(aX_i,aY_f,1)); m_QuadData.m_BottomLeft = D5_T2F_V3F(glm::vec2(aU_i,aV_f), glm::vec3(aX_i,aY_i,1)); m_QuadData.m_BottomRight = D5_T2F_V3F(glm::vec2(aU_f,aV_i), glm::vec3(aX_f,aY_f,1)); m_QuadData.m_TopRight = D5_T2F_V3F(glm::vec2(aU_f,aV_f), glm::vec3(aX_f,aY_i,1)); m_VBO[aFrame]->LoadBufferData(&m_QuadData, 1, GL_STATIC_DRAW); }
void CTextureNode::SetVBOData() { const f32 w = (m_TextureSize.x/2); const f32 h = (m_TextureSize.y/2); m_QuadData.m_TopLeft = D5_T2F_V3F(glm::vec2(0,0), glm::vec3(-w,h,1)); m_QuadData.m_BottomLeft = D5_T2F_V3F(glm::vec2(0,1), glm::vec3(-w,-h,1)); m_QuadData.m_BottomRight = D5_T2F_V3F(glm::vec2(1,0), glm::vec3(w,h,1)); m_QuadData.m_TopRight = D5_T2F_V3F(glm::vec2(1,1), glm::vec3(w,-h,1)); m_VBO.LoadBufferData(&m_QuadData, 1, GL_STATIC_DRAW); }