Performance hits in Walker Demo from SubMenus

I originally posted this in the beginners forum, but from the lack of response I’ve got so for I thought it might be a linux spercific problem.


Hi,

Been learning from the Walker Demo
(Code Resources - OpenGL Wiki)

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
(XFree86® Public CVS Access).

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

Every standard 2d menu which is displayed over a gl window slows down rendering on consumer cards. On workstation type graphic cards like the quadro cards from nvidia this limitation is not present.

Good luck

Matthias

It looks like you are running on an nvidia card… but it does not look like you are running our HW accelerated driver. You can download that driver from our web site. go to:

www.nvidi.com

click download drivers,
choose graphics drivers, geforce/tnt, etc and the flavor of linux you use (32bit or 64bit).

I suggest looking at the README that is on the download page… on how to install the driver, and editing XF86config/xorg.conf. And I think you will see a HUGE performance increase with our drivers.

Cheers,
–Ben

Originally posted by bencbenc:
It looks like you are running on an nvidia card… but it does not look like you are running our HW accelerated driver.
<SNIP>
And I think you will see a HUGE performance increase with our drivers.

I do think it looks like he is running the HW accelerated driver. He gets direct rendering, all vendor strings show NVIDIA and the driver version is 53.36 (not the newest but I don’t think a driver update will help much).
Sorry that I can not help with the original problem.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.