Question regarding coodinates...

49 views
Skip to first unread message

Schreda

unread,
Nov 18, 2012, 3:26:03 PM11/18/12
to isg...@googlegroups.com
Dear All, 

well Im quite new to ISGL3d but I have already some expierence in 2d game dev and objective c Cocoa and so on... 
Here is my question. Normally the pixel are different between Retina and "normal" apple displays for mobile devices... So how you guys handle it in 3d programming...

I mean e.g. if I have a 2d game I always need to calculate my coordinate values with some factor mulitplyed factor so that the graphics will be shown on the correct position...
I tried today some sample but discovered that the position of the Meshobjects are on all devices same ... can you please tell me how you handle it... are you given fixed values 
to coordinates ? I checked also the sizes via the ISGL3dDirector but they are same so I felt little strange and thats why I want to ask you 


    CGSize size =  [[Isgl3dDirector sharedInstance] windowSize];

    CGSize sizePix =  [[Isgl3dDirector sharedInstance] windowSizeInPixels];

    

    NSLog(@"SizeWidth %f  heigt %f",size.width, size.height);

    NSLog(@"SizeWidth %f  heigt %f",sizePix.width, sizePix.height);


Result was same on all devices... 


thanks a lot already

dwaring

unread,
Nov 30, 2012, 9:09:43 PM11/30/12
to isg...@googlegroups.com
I am not sure just what is going on underneath but I think that OpenGL is handling it. I do know that if you use the enableRentinaDisplay flag in  Isgl3dDirector IT DOES NOT WORK. You should be aware there does not seem to be any ongoing support for Isgl3d, but v 1.2.3 is working well for my needs. 

geoffr...@gmail.com

unread,
Feb 23, 2013, 11:02:07 AM2/23/13
to isg...@googlegroups.com
It shouldn't be necessary to do this.  The framework should work with retina or without retina without you having to change your code.

IMO, this is the culprit:  (version 1.2.3)

in Isgl3dDirector.m, at line 536:

[self setContentScaleFactor:2.0f];


If you change the 2.0f to 1.0f, the program will work on non-retina or retina without code changes on your part.  (At least on the iPhone, I haven't tested on the iPad.)

After working with isgl3d for a while, it has become apparent that it is not supported.  If you wish to do extensive 3D development, it might be wise to find an alternative that is supported.  
Reply all
Reply to author
Forward
0 new messages