Skip to content
Snippets Groups Projects
Commit 351b1854 authored by nksallem's avatar nksallem
Browse files
parents 33480e4c 5cb5634d
No related branches found
No related tags found
No related merge requests found
SHA1 (BioMove3D-3.7.13.tar.gz) = df49951dc567eae8bb302a087884713b53b74acb
RMD160 (BioMove3D-3.7.13.tar.gz) = 84bb8335255cd9a19dae5f168f3d479a037291a0
Size (BioMove3D-3.7.13.tar.gz) = 5650289 bytes
SHA1 (patch-aa) = 6b2c3039448cfb79aa0636746a4483dc711c99ca
diff --git a/graphic/g3d_draw_env.c b/graphic/g3d_draw_env.c
index fb65ddd..2274907 100644
--- graphic/g3d_draw_env.c
+++ graphic/g3d_draw_env.c
@@ -1745,8 +1745,7 @@ void g3d_draw(void)
g3d_draw_env();
- float scale= 0.7;
if(win->vs.enableLogo==1) {
- g3d_display_logo(win->vs, 10.0, 10.0, 0.7);
+ g3d_display_logo(win->vs, 10.0, 10.0, 0.33);
}
}
diff --git a/graphic/g3d_states.c b/graphic/g3d_states.c
index 75f2f51..a287620 100644
--- graphic/g3d_states.c
+++ graphic/g3d_states.c
@@ -927,9 +927,9 @@ int g3d_load_logo_texture(g3d_states &vs)
//! Displays the LAAS logo.
//! \param offsetX X position of the logo lower-left corner (from the image lower-left corner)
//! \param offsetY Y position of the logo lower-left corner (from the image lower-left corner)
-//! \param scale scale factor to apply to the logo (original size in g3d_logo.h)
+//! \param widthRatio ratio of the logo width with respect of the OpenGL window width (e.g.: use 0.1 if you want the logo width to be 1/10 of the window width)
//! \return 0 in case of success, 1 otherwise
-int g3d_display_logo(g3d_states &vs, float offsetX, float offsetY, float scale)
+int g3d_display_logo(g3d_states &vs, float offsetX, float offsetY, float widthRatio)
{
static int firstTime= TRUE;
@@ -942,10 +942,14 @@ int g3d_display_logo(g3d_states &vs, float offsetX, float offsetY, float scale)
GLint viewport[4];
int width, height;
+ float scale;
glGetIntegerv(GL_VIEWPORT, viewport);
width = viewport[2];
height = viewport[3];
+
+ scale= widthRatio*width/( (float) LOGO_WIDTH);
+
#ifdef USE_SHADERS
g3d_no_shader();
#endif
diff --git a/graphic/proto/g3d_states_proto.h b/graphic/proto/g3d_states_proto.h
index 8ef011e..50ee647 100644
--- graphic/proto/g3d_states_proto.h
+++ graphic/proto/g3d_states_proto.h
@@ -45,6 +45,6 @@ extern int g3d_load_state(g3d_win *win, g3d_states *st);
extern int g3d_checkGLerrors(char *message);
int g3d_load_logo_texture(g3d_states &vs);
-int g3d_display_logo(g3d_states &vs, float offsetX, float offsetY, float scale);
+int g3d_display_logo(g3d_states &vs, float offsetX, float offsetY, float widthRatio);
#endif // G3D_STATES_PROTO_H
......@@ -37,6 +37,7 @@ include ../../architecture/genom/depend.mk
include ../../localization/pom-genom/depend.mk
include ../../architecture/genBasic-genom/depend.mk
include ../../manipulation/genManip-genom/depend.mk
include ../../architecture/genHum-genom/depend.mk
include ../../motion/softMotion-libs/depend.mk
include ../../graphics/pqp/depend.mk
include ../../graphics/coldman-libs/depend.mk
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment