PDA

View Full Version : Performance hits in Walker Demo from SubMenus



dvsdv
10-01-2004, 03:08 AM
Hi,

Been learning from the Walker Demo
(http://www.opengl.org/resources/code/glut/glut_examples/demos/walker.zip)

But I've just noticed a horrible performace hit - bring up the glut menus with a right click and if I highlight one the selections that has a submenu (with the mouse) the frame-rate drops markedly.

I'm already heavily using this code and didn't notice till I went on a much slower machine (highlighting a submenu drops the framerate on that machine from ~40 to ~8) Thought it was an alteration I made but I have redownloaded and seen the same behaviour on the original code. (it's actually easier to spot as the performance hit is more profound on the original code)

Had to edit the Makefile to get it too compile in linux:

RM = -rm -rf

TARGETS = walker

SRCS = models.c walker.c walkviewer.c
OBJS = $(SRCS:.c=.o)
INCLUDES = -I/usr/X11R6/include
LIBS = -lglut

default : $(TARGETS)

walker : $(OBJS)
$(CC) -o $@ $(INCLUDES) $(LIBS) $(OBJS)

clean :
$(RM) $(TARGETS) $(OBJS)

===
===
===

I'm using a XP-1800+ with gf4mx440, debian testing
I'm unsure if this issue is a glut version issue or the original code has done something naughty with submenus.

Not quite sure what info would be helpful so PLEASE if you need anything else just say so.

I have the following glut debs installed

$ dpkg -l "*glut*" | grep ii
ii freeglut3 2.2.0-8 OpenGL Utility Toolkit
ii freeglut3-dev 2.2.0-8 OpenGL Utility Toolkit development files
ii glut-doc 3.7-25 documentation and examples for the OpenGL Ut
ii glutg3-dev 3.7-25 the OpenGL Utility Toolkit development files
ii libglut3 3.7-25 the OpenGL Utility Toolkit
ii libglut3-dev 3.7-25 development libraries and headers for GLUT

===
===
===

$ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.3
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control
client glx vendor string: NVIDIA Corporation
client glx version string: 1.3
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_NV_float_buffer
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce4 MX 440/AGP/SSE/3DNOW!
OpenGL version string: 1.4.1 NVIDIA 53.36
OpenGL extensions:
GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_point_parameters,
GL_ARB_point_sprite, GL_ARB_texture_compression, GL_ARB_texture_cube_map,
GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object,
GL_ARB_vertex_program, GL_ARB_window_pos, GL_S3_s3tc,
GL_EXT_texture_env_add, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
GL_EXT_compiled_vertex_array, GL_EXT_draw_range_elements,
GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels,
GL_EXT_paletted_texture, GL_EXT_point_parameters, GL_EXT_rescale_normal,
GL_EXT_secondary_color, GL_EXT_separate_specular_color,
GL_EXT_shared_texture_palette, GL_EXT_stencil_wrap,
GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map,
GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic,
GL_EXT_texture_lod, GL_EXT_texture_lod_bias, GL_EXT_texture_object,
GL_EXT_vertex_array, GL_IBM_rasterpos_clip,
GL_IBM_texture_mirrored_repeat, GL_KTX_buffer_region, GL_NV_blend_square,
GL_NV_fence, GL_NV_fog_distance, GL_NV_light_max_exponent,
GL_NV_packed_depth_stencil, GL_NV_pixel_data_range, GL_NV_point_sprite,
GL_NV_register_combiners, GL_NV_texgen_reflection,
GL_NV_texture_env_combine4, GL_NV_texture_rectangle,
GL_NV_vertex_array_range, GL_NV_vertex_array_range2, GL_NV_vertex_program,
GL_NV_vertex_program1_1, GL_NVX_ycrcb, GL_SGIS_generate_mipmap,
GL_SGIS_multitexture, GL_SGIS_texture_lod, GL_SUN_slice_accum
glu version: 1.3
glu extensions:
GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x21 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
0x22 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
0x23 16 tc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
0x24 16 tc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
0x25 16 tc 0 16 0 r . . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
0x26 16 dc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 16 0 0 None
0x27 16 dc 0 16 0 r y . 5 6 5 0 0 0 0 16 16 16 16 0 0 None
0x28 16 dc 0 16 0 r . . 5 6 5 0 0 0 0 16 16 16 16 0 0 None

===
===
===

$ XFree86 -version

This is a pre-release version of XFree86, and is not supported in any
way. Bugs may be reported to XFree86@XFree86.Org and patches submitted
to fixes@XFree86.Org. Before reporting bugs in pre-release versions,
please check the latest version in the XFree86 CVS repository
(http://www.XFree86.Org/cvs).

XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-4 20040529113443 root@cyberhq.internal.cyberhqz.com)
Release Date: 15 August 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.6.6-rc3-bk9 i686 [ELF]
Build Date: 29 May 2004
Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.6 (root@oi) (gcc version 3.3.4 (Debian 1:3.3.4-6sarge1)) #2 Thu Aug 19 09:23:55 EST 2004 T

===
===
===

any help would be most appreciated