agalushka / panoramagl

Automatically exported from code.google.com/p/panoramagl
0 stars 0 forks source link

about PanoramaGL 64-bit adapt #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
thank you for you open source this library at first,i’m a app developer for 
five years,i don’t use OpenGL, i have many projects using this 360 
library,see many replaceable librarys ,but no one better than yours library

now,all project will add 64-bit support, because Apple requires a 64-bit can 
upload appstore, PanoramaGL  Hotspot ”didClickHotspot” will not respond 
click,how to fix it  or give me some directions

Original issue reported on code.google.com by shaojian...@gmail.com on 13 Aug 2015 at 6:35

GoogleCodeExporter commented 8 years ago
it seems happen here ,it return wrong rayVectors
PLRenderer.h
-(void)createRayWithScreenPoint:(CGPoint)point ray:(PLVector3 **)rayVectors
{
    PLPosition pos;

    glGetIntegerv(GL_VIEWPORT, viewport);   
    glGetFloatv(GL_MODELVIEW_MATRIX, mvmatrix);
    glGetFloatv(GL_PROJECTION_MATRIX, projmatrix);

    float y = (float)viewport[3] - point.y;

    gluUnProject(point.x, y, 0.0f, mvmatrix, projmatrix, viewport, &pos.x, &pos.y, &pos.z);
    [rayVectors[0] setValuesWithPosition:pos];
    gluUnProject(point.x, y, 1.0f, mvmatrix, projmatrix, viewport, &pos.x, &pos.y, &pos.z);
    [rayVectors[1] setValuesWithPosition:pos];

}

Original comment by shaojian...@gmail.com on 13 Aug 2015 at 7:34

GoogleCodeExporter commented 8 years ago
i have fixed it

just replace "PLVertex"  CGFloat to  GLfloat
struct PLVertex 
{
   GLfloat x, y, z;
};

my blog

http://www.skyfox.org/ios-panoramagl-360-arm64-hotspot.html

Original comment by shaojian...@gmail.com on 13 Aug 2015 at 8:31