We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › GL Coordinate System..
Page Index Toggle Pages: 1
GL Coordinate System.. (Read 472 times)
GL Coordinate System..
Mar 30th, 2009, 8:31pm
 
Hey,

So I'm working on a project that is using the Cartesian coordinate system ( I think that is what it is called ).

glTransformf(1.0f, 1.0f, 1.0f);
glVertex2df( 1.0f, 1.0f );


I'm not used to this at all, I'm used to the more familiar pixel based positioning of Actionscript and Processing..

glTransformf( 255.0f, 787.0f, 0.0f);
glVertex2df( 500.0f, 432.0f);


The problem is that the project needs to be in this mode and it's written in c. I'm doing rapid prototyping in processing for visual effects. Is there a way to change the Coordinate System so that I can code in this way rather than in pixels? Or even better.. is it possible to change the coord system on the fly at the point of where I want it to draw? Then change it back afterwards?

Suggestions?
Grin
Chris
Re: GL Coordinate System..
Reply #1 - Mar 31st, 2009, 12:44am
 
I may be wrong but does'nt this sound just like a global scale ? adding something like scale(1.0f/(float)width, 1.0f/(float)height, 1.0f) ?
Sorry if I misunderstood the question.
Page Index Toggle Pages: 1