move and rotate overlay map with player
This commit is contained in:
parent
23b4177962
commit
6f0aa56976
@ -289,6 +289,8 @@ void Client::draw_overlay()
|
|||||||
proj.ortho(-span, span, -span, span, -1, 1);
|
proj.ortho(-span, span, -span, span, -1, 1);
|
||||||
proj.to_uniform(m_overlay_program.uniform("projection"));
|
proj.to_uniform(m_overlay_program.uniform("projection"));
|
||||||
GLMatrix modelview;
|
GLMatrix modelview;
|
||||||
|
modelview.rotate(90 - m_player->direction * 180 / M_PI, 0, 0, 1);
|
||||||
|
modelview.translate(-m_player->x, -m_player->y, 0);
|
||||||
GLfloat hex_color[] = {0.2, 0.8, 0.8, 0.3};
|
GLfloat hex_color[] = {0.2, 0.8, 0.8, 0.3};
|
||||||
GLfloat border_color[] = {0.4, 0.9, 0.9, 1.0};
|
GLfloat border_color[] = {0.4, 0.9, 0.9, 1.0};
|
||||||
m_overlay_hex_attributes.bind();
|
m_overlay_hex_attributes.bind();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user