Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

How can I convert device cordinate to vertex point. how can I specify the point size in terms of pixels.

You might want to look into setting up an orthographic model view coordinate system. Something like this:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glOrthof(0, nWidth, 0, nHeight, 0, 1.0f);
This should allow you to render using device coordinates.
NOTE: Be careful not to hardcode device sizes because your application will not render correctly on devices with different resolutions.

You might want to look into setting up an orthographic model view coordinate system. Something like this:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glOrthof(0, nWidth, 0, nHeight, 0, 1.0f);
This should allow you to render using device coordinates.
NOTE: Be careful not to hardcode device sizes because your application will not render correctly on devices with different resolutions.

Thanks dude :)

Thanks dude :)