Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
65d134a7
Commit
65d134a7
authored
Jul 26, 1995
by
Ken Martin
Browse files
modified pixel data storage order
parent
80361064
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/GlrRenW.cc
View file @
65d134a7
...
...
@@ -733,7 +733,7 @@ unsigned char *vtkGlrRenderWindow::GetPixelData(int x1, int y1, int x2, int y2,
readsource
(
SRC_BACK
);
}
p_data
=
data
;
for
(
yloop
=
y_
hi
;
yloop
>
=
y_
low
;
yloop
--
)
for
(
yloop
=
y_
low
;
yloop
<
=
y_
hi
;
yloop
++
)
{
// read in a row of pixels
lrectread
(
x_low
,
yloop
,
x_hi
,
yloop
,
buffer
);
...
...
@@ -803,7 +803,7 @@ void vtkGlrRenderWindow::SetPixelData(int x1, int y1, int x2, int y2,
/* now write the binary info one row at a time */
p_data
=
data
;
for
(
yloop
=
y_
hi
;
yloop
>
=
y_
low
;
yloop
--
)
for
(
yloop
=
y_
low
;
yloop
<
=
y_
hi
;
yloop
++
)
{
for
(
xloop
=
0
;
xloop
<=
(
abs
(
x2
-
x1
));
xloop
++
)
{
...
...
src/OglrRenW.cc
View file @
65d134a7
...
...
@@ -661,10 +661,11 @@ unsigned char *vtkOglrRenderWindow::GetPixelData(int x1, int y1, int x2, int y2,
glReadBuffer
(
GL_BACK
);
}
p_data
=
data
;
for
(
yloop
=
y_
hi
;
yloop
>
=
y_
low
;
yloop
--
)
for
(
yloop
=
y_
low
;
yloop
<
=
y_
hi
;
yloop
++
)
{
// read in a row of pixels
glReadPixels
(
x_low
,
yloop
,(
x_hi
-
x_low
+
1
),
1
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
buffer
);
glReadPixels
(
x_low
,
yloop
,(
x_hi
-
x_low
+
1
),
1
,
GL_RGBA
,
GL_UNSIGNED_BYTE
,
buffer
);
for
(
xloop
=
0
;
xloop
<=
(
abs
(
x2
-
x1
));
xloop
++
)
{
*
p_data
=
(
buffer
[
xloop
]
&
(
0xff000000
))
>>
24
;
p_data
++
;
...
...
@@ -725,7 +726,7 @@ void vtkOglrRenderWindow::SetPixelData(int x1, int y1, int x2, int y2,
// now write the binary info one row at a time
p_data
=
data
;
for
(
yloop
=
y_
hi
;
yloop
>
=
y_
low
;
yloop
--
)
for
(
yloop
=
y_
low
;
yloop
<
=
y_
hi
;
yloop
++
)
{
for
(
xloop
=
0
;
xloop
<=
(
abs
(
x2
-
x1
));
xloop
++
)
{
...
...
src/SbrRenW.cc
View file @
65d134a7
...
...
@@ -1059,7 +1059,8 @@ int front)
/* now read the binary info one row at a time */
p_data
=
data
;
for
(
yloop
=
y_low
;
yloop
<=
y_hi
;
yloop
++
)
for
(
yloop
=
(
this
->
Size
[
1
]
-
y_hi
-
1
);
yloop
<=
(
this
->
Size
[
1
]
-
y_low
-
1
);
yloop
++
)
{
if
(
this
->
NumPlanes
==
24
)
{
...
...
@@ -1235,7 +1236,8 @@ void vtkSbrRenderWindow::SetPixelData(int x1, int y1, int x2, int y2,
/* now write the binary info one row at a time */
p_data
=
data
;
for
(
yloop
=
y_low
;
yloop
<=
y_hi
;
yloop
++
)
for
(
yloop
=
(
this
->
Size
[
1
]
-
y_hi
-
1
);
yloop
<=
(
this
->
Size
[
1
]
-
y_low
-
1
);
yloop
++
)
{
if
(
this
->
NumPlanes
==
24
)
{
...
...
src/XglrRenW.cc
View file @
65d134a7
...
...
@@ -853,7 +853,8 @@ unsigned char *vtkXglrRenderWindow::GetPixelData(int x1, int y1,
/* now write the binary info one row at a time */
p_data
=
data
;
for
(
yloop
=
y_low
;
yloop
<=
y_hi
;
yloop
++
)
for
(
yloop
=
(
this
->
Size
[
1
]
-
y_hi
-
1
);
yloop
<=
(
this
->
Size
[
1
]
-
y_low
-
1
);
yloop
++
)
{
for
(
xloop
=
0
;
xloop
<=
(
abs
(
x2
-
x1
));
xloop
++
)
{
...
...
@@ -922,7 +923,8 @@ void vtkXglrRenderWindow::SetPixelData(int x1, int y1, int x2, int y2,
// now write the binary info one row at a time
p_data
=
data
;
for
(
yloop
=
y_low
;
yloop
<=
y_hi
;
yloop
++
)
for
(
yloop
=
(
this
->
Size
[
1
]
-
y_hi
-
1
);
yloop
<=
(
this
->
Size
[
1
]
-
y_low
-
1
);
yloop
++
)
{
pos
.
y
=
yloop
;
for
(
xloop
=
0
;
xloop
<=
(
abs
(
x2
-
x1
));
xloop
++
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment