mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:36:56 +02:00
Removed kludge; it turned out lighting was enabled.
This commit is contained in:
parent
d041072d40
commit
620e1c728c
3 changed files with 12 additions and 11 deletions
|
@ -37,6 +37,8 @@ bool usingBigSphereCollisionTest = true;
|
||||||
|
|
||||||
char iris_texture_file[] = "resources/images/green_eye.png";
|
char iris_texture_file[] = "resources/images/green_eye.png";
|
||||||
|
|
||||||
|
float chatMessageScale = 0.00025;
|
||||||
|
|
||||||
vector<unsigned char> iris_texture;
|
vector<unsigned char> iris_texture;
|
||||||
unsigned int iris_texture_width = 512;
|
unsigned int iris_texture_width = 512;
|
||||||
unsigned int iris_texture_height = 256;
|
unsigned int iris_texture_height = 256;
|
||||||
|
@ -657,7 +659,7 @@ void Avatar::render(bool lookingInMirror) {
|
||||||
if (!_chatMessage.empty()) {
|
if (!_chatMessage.empty()) {
|
||||||
float width = 0;
|
float width = 0;
|
||||||
for (string::iterator it = _chatMessage.begin(); it != _chatMessage.end(); it++) {
|
for (string::iterator it = _chatMessage.begin(); it != _chatMessage.end(); it++) {
|
||||||
width += glutStrokeWidth(GLUT_STROKE_ROMAN, *it)*0.00025;
|
width += glutStrokeWidth(GLUT_STROKE_ROMAN, *it)*chatMessageScale;
|
||||||
}
|
}
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
|
@ -671,14 +673,9 @@ void Avatar::render(bool lookingInMirror) {
|
||||||
glRotatef(atan2(-modelview[2], -modelview[10]) * 180 / PI, 0, 1, 0);
|
glRotatef(atan2(-modelview[2], -modelview[10]) * 180 / PI, 0, 1, 0);
|
||||||
glTranslatef(width * 0.5, 0, 0);
|
glTranslatef(width * 0.5, 0, 0);
|
||||||
|
|
||||||
// TODO: For no apparent reason, OpenGL is hiding the first character. This fixes it (it
|
glDisable(GL_LIGHTING);
|
||||||
// gets hidden instead), but we should find and fix the underlying problem.
|
drawtext(0, 0, chatMessageScale, 180, 1.0, 0, _chatMessage.c_str(), 0, 1, 0);
|
||||||
glBegin(GL_LINE_STRIP);
|
glEnable(GL_LIGHTING);
|
||||||
glVertex2f(0, 0);
|
|
||||||
glVertex2f(0, 0);
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
drawtext(0, 0, 0.00025, 180, 1.0, 0, _chatMessage.c_str(), 0, 1, 0);
|
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ public:
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
||||||
bool key(unsigned char k);
|
bool key(unsigned char k);
|
||||||
|
|
||||||
void specialKey(unsigned char k);
|
void specialKey(unsigned char k);
|
||||||
|
|
||||||
void render(int screenWidth, int screenHeight);
|
void render(int screenWidth, int screenHeight);
|
||||||
|
|
|
@ -1455,7 +1455,12 @@ void key(unsigned char k, int x, int y)
|
||||||
if (k == 'g') renderPitchRate += KEYBOARD_PITCH_RATE;
|
if (k == 'g') renderPitchRate += KEYBOARD_PITCH_RATE;
|
||||||
if (k == 'a') myAvatar.setDriveKeys(ROT_LEFT, 1);
|
if (k == 'a') myAvatar.setDriveKeys(ROT_LEFT, 1);
|
||||||
if (k == 'd') myAvatar.setDriveKeys(ROT_RIGHT, 1);
|
if (k == 'd') myAvatar.setDriveKeys(ROT_RIGHT, 1);
|
||||||
if (k == '\r') ::chatEntryOn = true;
|
|
||||||
|
if (k == '\r') {
|
||||||
|
::chatEntryOn = true;
|
||||||
|
myAvatar.setKeyState(AvatarData::NoKeyDown);
|
||||||
|
myAvatar.setChatMessage(string());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receive packets from other agents/servers and decide what to do with them!
|
// Receive packets from other agents/servers and decide what to do with them!
|
||||||
|
|
Loading…
Reference in a new issue