Commit 65d134a7 authored by Ken Martin's avatar Ken Martin
Browse files

modified pixel data storage order

parent 80361064
......@@ -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++)
{
......
......@@ -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++)
{
......
......@@ -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)
{
......
......@@ -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++)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment