Hi there,
I work on a project with OpenGL and SDL. When I use:
glColorMaterial()
to set the material properties automatically when I issue glColor*(), it doesnt seem to function correctly.
My scene is composed of a world with GL_LIGHT0 activated and a GUI drawn without any light. Of course, I disable GL_LIGHT0, GL_COLOR_MATERIAL and GL_LIGHTING when I draw the GUI. However the last glColor*() I use to draw the GUI modifies the properties of GL_LIGHT0 or/and the material properties. My world which is drawn before the GUI is lighted with the color I set when I draw the GUI after the world.
However, when I replace the
glColorMaterial()
by “many” calls to
glMaterial*()
everything works well.
I don’t know if it’s whether driver’s bug or the kernel’s bug or the XFree’s.
Please help !
Here is a screenshot of the world and the GUI (without any light enabled) http://opencity.sourceforge.net/screenshots/opencity-0.0.2-rmb.png
=====================================================
Development platform:
Linux 2.4.22, gcc-3.3.1 (GCC) 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
=====================================================
Model: Medion Microstar laptop computer
Processor: P-IV 2.4 GHz - 768 Mb RAM
OS: Linux 2.4.22 - 256 Mb swap; WinXP - 1Gb swap
Patches: drm, fb (mdk for Linux)
Soundcard: SiS SI7012 (driver intel8x0 with ALSA)
Videocard: ATI Radeon 9000 M - 64 Mb
Resolution: 1024x768
DVD/CDR/RW drive
=====================================================
SDL version 1.2.5
=====================================================
GL Vendor: ‘Tungsten Graphics, Inc.’
GL Renderer: ‘Mesa DRI R200 20020827 AGP 4x x86/MMX/SSE TCL’
GL Version: ‘1.2 Mesa 4.0.4’
GL Extensions: ‘GL_ARB_imaging GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_transpose_matrix GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_logic_op GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_convolution GL_EXT_compiled_vertex_array GL_EXT_histogram GL_EXT_packed_pixels GL_EXT_polygon_offset GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_object GL_EXT_texture_lod_bias GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_MESA_window_pos GL_NV_texgen_reflection GL_NV_texture_rectangle GL_SGI_color_matrix GL_SGI_color_table’
=====================================================
XFree86 Version 4.3.0
Release Date: 9 May 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.4.18-23mdksmp i686 [ELF]
Build Date: 10 September 2003
Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present