Hi Paul,
the warnings:
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
is "normal", OSG automatically enables the extension.
The cast warnings can probably be fixed, I did not look at these at the
time.
jp
[email protected] wrote:
Is it me or can somebody explain why when I "setenv OSG_NOTIFY_LEVEL debug" and
then run osgstereomatch example and I'm seeing the following all these warnings in the
output (see below). It seems like things are running okay (maybe because these are only
warnings :-). I'm running with OSG 2.6 with the OSG Data Set from OSG 2.6 but I don't
think anything has changed in this area since then... I don't get any messages when I run
without the notify level.
I'm not sure what the intended action is in each of these cases but there seems
to be alot of warnings (in my opinion they should be errors).
Paul
glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.2
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
void main(void)
{
gl_FragData[0] = vec4(100.0, 0.0, 0.0, 1.0);
gl_FragData[1] = vec4(100.0, 0.0, 0.0, 1.0);
}
Linking osg::Program "" id=2 contextID=0
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureLeft;
uniform sampler2DRect textureRight;
uniform int start_disparity;
void main(void)
{
vec2 texCoord = gl_TexCoord[0].xy;
vec4 final;
vec4 im0 = texture2DRect(textureLeft, texCoord);
for (int t=0; t<4; t++) {
for (int c=0; c<4; c++) {
int disp_offset = (t*4)+c;
vec4 im1 = texture2DRect(textureRight, texCoord +
vec2(-(disp_offset+start_disparity),0));
gl_FragData[t][c] = abs(im0 - im1);
}
}
}
FRAGMENT Shader "" infolog:
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(17) : warning C7011: implicit cast from "vec4" to "float"
Linking osg::Program "" id=4 contextID=0
Program "" link succeded, infolog:
Fragment info
-------------
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(17) : warning C7011: implicit cast from "vec4" to "float"
Uniform "start_disparity" loc=0 size=1 type=int
Uniform "textureLeft" loc=1 size=1 type=UNDEFINED
Uniform "textureRight" loc=2 size=1 type=UNDEFINED
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureDiff0;
uniform sampler2DRect textureDiff1;
uniform sampler2DRect textureDiff2;
uniform sampler2DRect textureDiff3;
uniform sampler2DRect textureAggIn;
uniform int start_disparity;
uniform int window_size;
void main(void)
{
int half_window_size = window_size/2;
vec2 texCoord = gl_TexCoord[0].xy;
sampler2DRect tdiff[4];
tdiff[0] = textureDiff0;
tdiff[1] = textureDiff1;
tdiff[2] = textureDiff2;
tdiff[3] = textureDiff3;
float smallest_sum = 100;
float sum;
float disparity = 0;
for (int t=0; t<4; t++) { // four textures
for (int c=0; c<4; c++) { // four channels
sum = 0.0;
for (int y=-half_window_size; y<=half_window_size; y++) {
for (int x=-half_window_size; x<=half_window_size; x++) {
vec2 coord = texCoord + vec2(x,y);
vec4 val = texture2DRect(tdiff[t], coord)[c];
sum+=val;
}
}
if (sum < smallest_sum) {
smallest_sum = sum;
disparity = start_disparity + ((t*4)+c);
}
}
}
float old_best_sum = texture2DRect(textureAggIn, texCoord)[0];
float old_disparity = texture2DRect(textureAggIn, texCoord)[1];
if (smallest_sum < old_best_sum) {
gl_FragData[0][0] = smallest_sum;
gl_FragData[0][1] = disparity;
} else {
gl_FragData[0][0] = old_best_sum;
gl_FragData[0][1] = old_disparity;
}
}
FRAGMENT Shader "" infolog:
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(21) : warning C7011: implicit cast from "int" to "float"
(23) : warning C7011: implicit cast from "int" to "float"
(31) : warning C7011: implicit cast from "float" to "vec4"
(32) : warning C7011: implicit cast from "vec4" to "float"
(37) : warning C7011: implicit cast from "int" to "float"
Linking osg::Program "" id=6 contextID=0
Program "" link succeded, infolog:
Fragment info
-------------
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(21) : warning C7011: implicit cast from "int" to "float"
(23) : warning C7011: implicit cast from "int" to "float"
(31) : warning C7011: implicit cast from "float" to "vec4"
(32) : warning C7011: implicit cast from "vec4" to "float"
(37) : warning C7011: implicit cast from "int" to "float"
Uniform "start_disparity" loc=0 size=1 type=int
Uniform "textureAggIn" loc=1 size=1 type=UNDEFINED
Uniform "textureDiff0" loc=2 size=1 type=UNDEFINED
Uniform "textureDiff1" loc=3 size=1 type=UNDEFINED
Uniform "textureDiff2" loc=4 size=1 type=UNDEFINED
Uniform "textureDiff3" loc=5 size=1 type=UNDEFINED
Uniform "window_size" loc=6 size=1 type=int
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureLeft;
uniform sampler2DRect textureRight;
uniform int start_disparity;
void main(void)
{
vec2 texCoord = gl_TexCoord[0].xy;
vec4 final;
vec4 im0 = texture2DRect(textureLeft, texCoord);
for (int t=0; t<4; t++) {
for (int c=0; c<4; c++) {
int disp_offset = (t*4)+c;
vec4 im1 = texture2DRect(textureRight, texCoord +
vec2(-(disp_offset+start_disparity),0));
gl_FragData[t][c] = abs(im0 - im1);
}
}
}
FRAGMENT Shader "" infolog:
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(17) : warning C7011: implicit cast from "vec4" to "float"
Linking osg::Program "" id=8 contextID=0
Program "" link succeded, infolog:
Fragment info
-------------
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(17) : warning C7011: implicit cast from "vec4" to "float"
Uniform "start_disparity" loc=0 size=1 type=int
Uniform "textureLeft" loc=1 size=1 type=UNDEFINED
Uniform "textureRight" loc=2 size=1 type=UNDEFINED
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureDiff0;
uniform sampler2DRect textureDiff1;
uniform sampler2DRect textureDiff2;
uniform sampler2DRect textureDiff3;
uniform sampler2DRect textureAggIn;
uniform int start_disparity;
uniform int window_size;
void main(void)
{
int half_window_size = window_size/2;
vec2 texCoord = gl_TexCoord[0].xy;
sampler2DRect tdiff[4];
tdiff[0] = textureDiff0;
tdiff[1] = textureDiff1;
tdiff[2] = textureDiff2;
tdiff[3] = textureDiff3;
float smallest_sum = 100;
float sum;
float disparity = 0;
for (int t=0; t<4; t++) { // four textures
for (int c=0; c<4; c++) { // four channels
sum = 0.0;
for (int y=-half_window_size; y<=half_window_size; y++) {
for (int x=-half_window_size; x<=half_window_size; x++) {
vec2 coord = texCoord + vec2(x,y);
vec4 val = texture2DRect(tdiff[t], coord)[c];
sum+=val;
}
}
if (sum < smallest_sum) {
smallest_sum = sum;
disparity = start_disparity + ((t*4)+c);
}
}
}
float old_best_sum = texture2DRect(textureAggIn, texCoord)[0];
float old_disparity = texture2DRect(textureAggIn, texCoord)[1];
if (smallest_sum < old_best_sum) {
gl_FragData[0][0] = smallest_sum;
gl_FragData[0][1] = disparity;
} else {
gl_FragData[0][0] = old_best_sum;
gl_FragData[0][1] = old_disparity;
}
}
FRAGMENT Shader "" infolog:
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(21) : warning C7011: implicit cast from "int" to "float"
(23) : warning C7011: implicit cast from "int" to "float"
(31) : warning C7011: implicit cast from "float" to "vec4"
(32) : warning C7011: implicit cast from "vec4" to "float"
(37) : warning C7011: implicit cast from "int" to "float"
Linking osg::Program "" id=10 contextID=0
Program "" link succeded, infolog:
Fragment info
-------------
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(21) : warning C7011: implicit cast from "int" to "float"
(23) : warning C7011: implicit cast from "int" to "float"
(31) : warning C7011: implicit cast from "float" to "vec4"
(32) : warning C7011: implicit cast from "vec4" to "float"
(37) : warning C7011: implicit cast from "int" to "float"
Uniform "start_disparity" loc=0 size=1 type=int
Uniform "textureAggIn" loc=1 size=1 type=UNDEFINED
Uniform "textureDiff0" loc=2 size=1 type=UNDEFINED
Uniform "textureDiff1" loc=3 size=1 type=UNDEFINED
Uniform "textureDiff2" loc=4 size=1 type=UNDEFINED
Uniform "textureDiff3" loc=5 size=1 type=UNDEFINED
Uniform "window_size" loc=6 size=1 type=int
Compiling FRAGMENT source:
/* -*- Mode: C -*- */
uniform sampler2DRect textureIn;
uniform int min_disparity;
uniform int max_disparity;
void main(void)
{
float disp = texture2DRect( textureIn, gl_TexCoord[0].st ).g;
float sad = texture2DRect( textureIn, gl_TexCoord[0].st ).r;
if (sad > 0.7+100) {
gl_FragColor = vec4(1,0,0,1);
} else {
disp = (disp-min_disparity)/(float)(max_disparity-min_disparity);
gl_FragColor = vec4(disp,disp,disp,1);
}
}
FRAGMENT Shader "" infolog:
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(10) : warning C7011: implicit cast from "int" to "float"
(13) : warning C7011: implicit cast from "int" to "float"
(13) : warning C7503: OpenGL does not allow C-style casts
Linking osg::Program "" id=12 contextID=0
Program "" link succeded, infolog:
Fragment info
-------------
(2) : warning C7531: global type sampler2DRect requires "#extension
GL_ARB_texture_rectangle : enable" before use
(10) : warning C7011: implicit cast from "int" to "float"
(13) : warning C7011: implicit cast from "int" to "float"
(13) : warning C7503: OpenGL does not allow C-style casts
_______________________________________________
osg-users mailing list
[email protected]
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.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org