Replace ugly "cross-hair", with better cross-hair
parent
02b2532750
commit
292f3887ac
|
@ -19,6 +19,8 @@ class Q3Renderer
|
|||
void end2d();
|
||||
|
||||
void drawRect(float x, float y, float w, float h, glm::vec3 col);
|
||||
|
||||
void drawCrosshair();
|
||||
|
||||
private:
|
||||
};
|
|
@ -36,7 +36,8 @@ int main(int argc, char **argv)
|
|||
renderer.clear();
|
||||
|
||||
renderer.start2d();
|
||||
renderer.drawRect(-0.01f, -0.01f, 0.02, 0.03, glm::vec3(1.0f, 1.0f, 1.0f));
|
||||
//renderer.drawRect(-0.01f, -0.01f, 0.02, 0.03, glm::vec3(1.0f, 1.0f, 1.0f));
|
||||
renderer.drawCrosshair();
|
||||
renderer.end2d();
|
||||
|
||||
renderer.start3d();
|
||||
|
|
|
@ -87,6 +87,26 @@ void Q3Renderer::drawRect(float x, float y, float w, float h, glm::vec3 col)
|
|||
glEnd();
|
||||
}
|
||||
|
||||
void Q3Renderer::drawCrosshair()
|
||||
{
|
||||
glColor3ub(240, 240, 240); //white
|
||||
glLineWidth(2.0);
|
||||
|
||||
glBegin(GL_LINES);
|
||||
|
||||
glVertex3f(-0.05f, 0.f, 0.f);
|
||||
glVertex3f(0.05f, 0.f, 0.f);
|
||||
|
||||
glEnd();
|
||||
|
||||
glBegin(GL_LINES);
|
||||
|
||||
glVertex3f(0.f, -0.05f, 0.f);
|
||||
glVertex3f(0.f, 0.05f, 0.f);
|
||||
|
||||
glEnd();
|
||||
}
|
||||
|
||||
void Q3Renderer::drawCube(float x, float y, float z, float sx, float sy, float sz)
|
||||
{
|
||||
glPushMatrix();
|
||||
|
|
Loading…
Reference in New Issue