c++ - OpenGL grayscale texture draws on one screen but not another -


i have sample code draws 8 bit rasters window using quads (glteximage2d w/ gl_luminance set both pixel format , internal format).

pfd initialized this:

pixelformatdescriptor pfd; int iformat;  hdc = getdc( hwnd );  zeromemory( &pfd, sizeof( pfd ) ); pfd.nsize = sizeof( pfd ); pfd.nversion = 1; pfd.dwflags = pfd_draw_to_window | pfd_support_opengl | pfd_doublebuffer; pfd.ipixeltype = pfd_type_rgba; pfd.ccolorbits = 8; pfd.ilayertype = pfd_main_plane; iformat = choosepixelformat( hdc, &pfd ); setpixelformat( hdc, iformat, &pfd ); 

and texture initialized this: glpixelstorei (gl_unpack_alignment, 1);

gltexparameteri (gl_texture_2d, gl_texture_wrap_s, gl_repeat); gltexparameteri (gl_texture_2d, gl_texture_wrap_t, gl_repeat); gltexparameteri (gl_texture_2d, gl_texture_mag_filter, gl_linear); gltexparameteri (gl_texture_2d, gl_texture_min_filter, gl_linear); gltexenvf (gl_texture_env, gl_texture_env_mode, gl_modulate);  glteximage2d (gl_texture_2d, 0, gl_luminance, width, height, 0, gl_luminance, gl_unsigned_byte, data); 

the machine consists of 1 matrox card, connected 1 regular color monitor , 2 monochrome monitors.

problem is, application draws part of window in color monitor, blanks on monochrome monitors. these configured 8-bit linear grayscale in control panel, works fine otherwise.

be glad hear ideas on this...


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -