if( this->UsePointSprites )
this->InitPointSprites( ren, act );
+ /*
+ cout << "XSIZE : " << ren->GetRenderWindow()->GetSize()[0] << endl;
+ cout << "YSIZE : " << ren->GetRenderWindow()->GetSize()[1] << endl;
+
+ float p1[3], p2[3];
+
+ ren->SetViewPoint( 0.0, 0.0, 0.0 );
+ ren->ViewToDisplay();
+ ren->GetDisplayPoint( p1 );
+
+ ren->SetViewPoint( 1.0, 1.0, 1.0 );
+ ren->ViewToDisplay();
+ ren->GetDisplayPoint( p2 );
+
+ cout << p1[0] << " " << p1[1] << " " << p1[2] << endl;
+ cout << p2[0] << " " << p2[1] << " " << p2[2] << endl;
+
+ float d = pow( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ), 0.5 );
+ cout << "ZOOM : " << d / pow( 2, 0.5 ) << endl;
+ */
glPointSize( this->DefaultPointSize );
aVertex[i].vy = p->GetPoint( pts[0] )[1];
aVertex[i].vz = p->GetPoint( pts[0] )[2];
+ float red, green, blue;
if( colors && this->PointSpriteResults )
{
unsigned char *col = colors->GetPointer(pts[0]<< 2);
- aVertex[i].r = ( ( int )col[0] ) / 255.0;
- aVertex[i].g = ( ( int )col[1] ) / 255.0;
- aVertex[i].b = ( ( int )col[2] ) / 255.0;
+ red = ( ( int )col[0] ) / 255.0;
+ green = ( ( int )col[1] ) / 255.0;
+ blue = ( ( int )col[2] ) / 255.0;
}
else
{
- aVertex[i].r = aPropertyColorRed;
- aVertex[i].g = aPropertyColorGreen;
- aVertex[i].b = aPropertyColorBlue;
+ red = aPropertyColorRed;
+ green = aPropertyColorGreen;
+ blue = aPropertyColorBlue;
}
- aVertex[i].hue = ComputeHue( ( int )( aVertex[i].r * 255 ),
- ( int )( aVertex[i].g * 255 ),
- ( int )( aVertex[i].b * 255 ) );
+ aVertex[i].r = red;
+ aVertex[i].g = green;
+ aVertex[i].b = blue;
+
+ aVertex[i].hue = ComputeHue( ( int )( red * 255 ), ( int )( green * 255 ), ( int )( blue * 255 ) );
}
GLuint aBufferObjectID = 0;