Hi,
I will try later with the latest svn.
I have an older version (8504) and your posted command line for
stereomatch works on Linux here:
The top right is white, but the top left shows the disparity image.
osgmultiplerendertargets without params should display a light yellow
square.
I also post my warnings, they are similar to yours, you do not need a
specific enable for sampler2DRect, OSG does this.
It seems something is up with FBO and multiple targets. Can you check if
osgprerender works properly?
jp
Thrall, Bryan wrote:
I've compiled OSG from svn HEAD (revision 8952)on Windows XP, but
osgstereomatch isn't working. I have an NVIDIA 8800 card; I tried driver
version 169 and 175 with the same results.
I'm using OpenSceneGraph-Data from svn HEAD (revision 8952) as well.
When I run
osgstereomatch --left Images/dog_left_eye.jpg --right
Images/dog_right_eye.jpg --min 0 --max 31 --window 9 --single
I see the two dog images with a flat red rectangle above them on the
left and a flat white rectangle above on the right. Isn't this example
supposed to show the pixel difference between these images?
I tried without '--single' as well, and the only difference is the red
rectangle is blue.
The only sign of something going wrong are warnings are printed from
compiling the shaders with OSG_NOTIFY_LEVEL=DEBUG_FP (see attached log).
Also, there was an additional warning that said sampler2DRect couldn't
be used without adding the following to the shaders:
#extension GL_ARB_texture_rectangle : enable
But adding that didn't resolve the problem.
On a possibly related note, osgstereoimage doesn't display anything, and
osgmultiplerendertargets only displays a blue rectangle (which I'm not
sure is correct).
Is anyone else having similar problems? Any suggestions?
--
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
RegisterWindowingSystemInterfaceProxy()
X11WindowingSystemInterface()
GraphicsContext::setWindowingSystemInterface() 0x806cd70 0xb7d1f300
itr='/usr/lib/'
FindFileInPath() : trying /usr/lib/osgPlugins-2.5.3/osgdb_jpeg.so ...
itr='/usr/local/lib/'
FindFileInPath() : trying /usr/local/lib/osgPlugins-2.5.3/osgdb_jpeg.so ...
FindFileInPath() : USING /usr/local/lib/osgPlugins-2.5.3/osgdb_jpeg.so
Opened DynamicLibrary osgPlugins-2.5.3/osgdb_jpeg.so
itr='/home/jpd/OSG_files'
FindFileInPath() : trying /home/jpd/OSG_files/Images/dog_left_eye.jpg ...
itr='/usr/local/share/OpenSceneGraph-Data'
FindFileInPath() : trying /usr/local/share/OpenSceneGraph-Data/Images/dog_left_eye.jpg ...
FindFileInPath() : USING /usr/local/share/OpenSceneGraph-Data/Images/dog_left_eye.jpg
itr='/home/jpd/OSG_files'
FindFileInPath() : trying /home/jpd/OSG_files/Images/dog_right_eye.jpg ...
itr='/usr/local/share/OpenSceneGraph-Data'
FindFileInPath() : trying /usr/local/share/OpenSceneGraph-Data/Images/dog_right_eye.jpg ...
FindFileInPath() : USING /usr/local/share/OpenSceneGraph-Data/Images/dog_right_eye.jpg
CullSettings::readEnvironmentalVariables()
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
itr='/home/jpd/OSG_files'
FindFileInPath() : trying /home/jpd/OSG_files/shaders/stereomatch_stereopass.frag ...
itr='/usr/local/share/OpenSceneGraph-Data'
FindFileInPath() : trying /usr/local/share/OpenSceneGraph-Data/shaders/stereomatch_stereopass.frag ...
FindFileInPath() : USING /usr/local/share/OpenSceneGraph-Data/shaders/stereomatch_stereopass.frag
Loading shader source file "/usr/local/share/OpenSceneGraph-Data/shaders/stereomatch_stereopass.frag"
CullSettings::readEnvironmentalVariables()
Render::Render() 0x8073578
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
_availableQueue.size()=2
CullSettings::readEnvironmentalVariables()
Render::Render() 0x8075990
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
_availableQueue.size()=2
View::setSceneData() Reusing exisitng scene0x80721a8
Viewer::realize() - No valid contexts found, setting up view across all screens.
GraphicsContext::getWindowingSystemInterface() 0x806cd70 0xb7d1f300
GraphicsContext::registerGraphicsContext 0x8076390
GraphicsContext::getWindowingSystemInterface() 0x806cd70 0xb7d1f300
GraphicsContext::createNewContextID() creating contextID=0
Updating the MaxNumberOfGraphicsContexts to 1
GraphicsWindow has been created successfully.
View::init()
FocusOut/UnmapNotify event received
FocusIn event received
KeymapNotify event received
cull_draw() 0x8073578
Renderer::compile()
OpenGL extensions supported by installed OpenGL drivers are:
GL_ARB_color_buffer_float
GL_ARB_depth_texture
GL_ARB_draw_buffers
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_half_float_pixel
GL_ARB_imaging
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_occlusion_query
GL_ARB_pixel_buffer_object
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_shader_objects
GL_ARB_shading_language_100
GL_ARB_shadow
GL_ARB_texture_border_clamp
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_float
GL_ARB_texture_mirrored_repeat
GL_ARB_texture_non_power_of_two
GL_ARB_texture_rectangle
GL_ARB_transpose_matrix
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_window_pos
GL_ATI_draw_buffers
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_EXT_Cg_shader
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_equation_separate
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_compiled_vertex_array
GL_EXT_depth_bounds_test
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_framebuffer_blit
GL_EXT_framebuffer_multisample
GL_EXT_framebuffer_object
GL_EXT_gpu_program_parameters
GL_EXT_multi_draw_arrays
GL_EXT_packed_depth_stencil
GL_EXT_packed_pixels
GL_EXT_pixel_buffer_object
GL_EXT_point_parameters
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_stencil_two_side
GL_EXT_stencil_wrap
GL_EXT_texture3D
GL_EXT_texture_compression_s3tc
GL_EXT_texture_cube_map
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
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_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_sRGB
GL_EXT_timer_query
GL_EXT_vertex_array
GL_IBM_rasterpos_clip
GL_IBM_texture_mirrored_repeat
GL_KTX_buffer_region
GL_NVX_conditional_render
GL_NV_blend_square
GL_NV_copy_depth_to_color
GL_NV_depth_clamp
GL_NV_fence
GL_NV_float_buffer
GL_NV_fog_distance
GL_NV_fragment_program
GL_NV_fragment_program2
GL_NV_fragment_program_option
GL_NV_framebuffer_multisample_coverage
GL_NV_half_float
GL_NV_light_max_exponent
GL_NV_multisample_filter_hint
GL_NV_occlusion_query
GL_NV_packed_depth_stencil
GL_NV_pixel_data_range
GL_NV_point_sprite
GL_NV_primitive_restart
GL_NV_register_combiners
GL_NV_register_combiners2
GL_NV_texgen_reflection
GL_NV_texture_compression_vtc
GL_NV_texture_env_combine4
GL_NV_texture_expand_normal
GL_NV_texture_rectangle
GL_NV_texture_shader
GL_NV_texture_shader2
GL_NV_texture_shader3
GL_NV_vertex_array_range
GL_NV_vertex_array_range2
GL_NV_vertex_program
GL_NV_vertex_program1_1
GL_NV_vertex_program2
GL_NV_vertex_program2_option
GL_NV_vertex_program3
GL_S3_s3tc
GL_SGIS_generate_mipmap
GL_SGIS_texture_lod
GL_SGIX_depth_texture
GL_SGIX_shadow
GL_SUN_slice_accum
OpenGL extension 'GL_ARB_vertex_program' is supported.
OpenGL extension 'GL_EXT_secondary_color' is supported.
OpenGL extension 'GL_EXT_fog_coord' is supported.
OpenGL extension 'GL_ARB_multitexture' is supported.
OpenGL extension 'GL_NV_occlusion_query' is supported.
OpenGL extension 'GL_ARB_occlusion_query' is supported.
OpenGL extension 'GL_EXT_timer_query' is supported.
OpenGL extension 'GL_EXT_secondary_color' is supported.
OpenGL extension 'GL_EXT_fog_coord' is supported.
OpenGL extension 'GL_ARB_texture_rectangle' is supported.
OpenGL extension 'GL_EXT_texture_filter_anisotropic' is supported.
OpenGL extension 'GL_EXT_texture_compression_s3tc' is supported.
OpenGL extension 'GL_ARB_shadow' is supported.
OpenGL extension 'GL_ARB_shadow_ambient' is not supported.
OpenGL extension 'GL_APPLE_client_storage' is not supported.
OpenGL extension 'GL_EXT_texture_integer' is not supported.
OpenGL extension 'GL_ARB_shader_objects' is supported.
OpenGL extension 'GL_ARB_vertex_shader' is supported.
OpenGL extension 'GL_ARB_fragment_shader' is supported.
OpenGL extension 'GL_ARB_shading_language_100' is supported.
OpenGL extension 'GL_EXT_geometry_shader4' is not supported.
OpenGL extension 'GL_EXT_gpu_shader4' is not supported.
glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.2
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureID0;
uniform sampler2DRect textureID1;
uniform int min_disparity;
uniform int max_disparity;
uniform int window_size;
float SADWindow(in int disparity, in int half_window_size, in vec2 texCoord)
{
float sad = 0.0;
float gain = 1.0;
float offset = 0.0;
for (int y=-half_window_size; y<=half_window_size; y++) {
float ygo = (y*gain)+(sign(y)*offset);
for (int x=-half_window_size; x<=half_window_size; x++) {
float xgo = (x*gain)+(sign(x)*offset);
vec2 l_coord = texCoord + vec2(xgo, ygo);
vec2 r_coord = texCoord + vec2(xgo-disparity, ygo);
vec4 l_val = texture2DRect(textureID0, l_coord);
vec4 r_val = texture2DRect(textureID1, r_coord);
sad = sad + abs(l_val - r_val);
}
}
return sad;
}
void main(void)
{
float sad=100;
float disp = min_disparity;
int halfsz = window_size/2;
for (int i=min_disparity; i < max_disparity; i++) {
float temp_sad = SADWindow(i, halfsz, gl_TexCoord[0].xy);
if (temp_sad < sad) {
sad = temp_sad;
disp = i;
}
}
if (sad > 2.3+100) {
gl_FragColor = vec4(1,0,0,1);
} else {
gl_FragColor = (disp-min_disparity)/(float)(max_disparity-min_disparity);
}
}
FRAGMENT Shader "" infolog:
0(2) : warning C7531: global type sampler2DRect requires "#extension GL_ARB_texture_rectangle : enable" before use
0(16) : warning C7011: implicit cast from "int" to "float"
0(16) : warning C7011: implicit cast from "int" to "float"
0(18) : warning C7011: implicit cast from "int" to "float"
0(18) : warning C7011: implicit cast from "int" to "float"
0(20) : warning C7011: implicit cast from "int" to "float"
0(31) : warning C7011: implicit cast from "int" to "float"
0(33) : warning C7011: implicit cast from "int" to "float"
0(45) : warning C7011: implicit cast from "int" to "float"
0(48) : warning C7011: implicit cast from "int" to "float"
0(48) : warning C7503: OpenGL does not allow C-style casts
Linking osg::Program "" id=2 contextID=0
Program "" link succeded, infolog:
Fragment info
-------------
0(2) : warning C7531: global type sampler2DRect requires "#extension GL_ARB_texture_rectangle : enable" before use
0(16) : warning C7011: implicit cast from "int" to "float"
0(16) : warning C7011: implicit cast from "int" to "float"
0(18) : warning C7011: implicit cast from "int" to "float"
0(18) : warning C7011: implicit cast from "int" to "float"
0(20) : warning C7011: implicit cast from "int" to "float"
0(31) : warning C7011: implicit cast from "int" to "float"
0(33) : warning C7011: implicit cast from "int" to "float"
0(45) : warning C7011: implicit cast from "int" to "float"
0(48) : warning C7011: implicit cast from "int" to "float"
0(48) : warning C7503: OpenGL does not allow C-style casts
0(23) : warning C7011: implicit cast from "vec4" to "float"
0(48) : warning C7011: implicit cast from "float" to "vec4"
0(41) : warning C7011: implicit cast from "int" to "float"
0(48) : warning C7011: implicit cast from "float" to "vec4"
0(41) : warning C7011: implicit cast from "int" to "float"
Uniform "max_disparity" loc=0 size=1 type=int
Uniform "min_disparity" loc=1 size=1 type=int
Uniform "textureID0" loc=2 size=1 type=UNDEFINED
Uniform "textureID1" loc=3 size=1 type=UNDEFINED
Uniform "window_size" loc=4 size=1 type=int
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
OpenGL extension '' is not supported.
OpenGL extension 'GL_ARB_pixel_buffer_object' is supported.
OpenGL extension 'GL_ARB_fragment_program' is supported.
OpenGL extension 'GL_EXT_framebuffer_object' is supported.
OpenGL extension 'GL_EXT_framebuffer_blit' is supported.
OpenGL extension 'GL_EXT_framebuffer_multisample' is supported.
OpenGL extension 'GL_NV_framebuffer_multisample_coverage' is supported.
OpenGL extension 'GL_ARB_vertex_program' is supported.
Setting up osg::Camera::FRAME_BUFFER_OBJECT
Setting up osg::Camera::FRAME_BUFFER
end cull_draw() 0x8073578
cull_draw() 0x8073578
end cull_draw() 0x8073578
cull_draw() 0x8073578
end cull_draw() 0x8073578
Viewer::~Viewer():: start destructor getThreads = 0
close(1)0x8076390
Releasing GL objects for Camera=0x8070a00 _state=0x80c3f60
Closing still viable window 0 _state->getContextID()=0
Doing Flush
Done Flush
Doing discard of deleted OpenGL objects.
decrementUsageCount()0
GraphicsContext::decrementContextIDUsageCount(0) to 0
Viewer::~Viewer() end destrcutor getThreads = 0
Destructing osgViewer::View
Render::~Render() 0x8075990
Destructing osg::View
Render::~Render() 0x8073578
close(1)0x8076390
close(0)0x8076390
GraphicsContext::unregisterGraphicsContext 0x8076390
Done destructing osg::View
Closing DynamicLibrary osgPlugins-2.5.3/osgdb_jpeg.so
~RegisterWindowingSystemInterfaceProxy()
GraphicsContext::setWindowingSystemInterface() 0 0xb7d1f300
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org