Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - [OpenGL 2D] Match opengl world coord. to screen coord.

[OpenGL 2D] Match opengl world coord. to screen coord.

Quickly share your Android Code Snippets here...

[OpenGL 2D] Match opengl world coord. to screen coord.

Postby Skywhy » Sat Nov 07, 2009 1:00 pm

Does what it says on the tin.

Code: Select all
gl.glMatrixMode(GL10.GL_PROJECTION);
GLU.gluOrtho2D(gl, 0, _screenWidth, _screenHeight, 0);


Set the projection to match your screen width and height and voila, the origin of the world coordinates in OpenGL is now in the top left hand corner and the world coordinates are matched to you screen coordinates.

Enjoy.
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Top

Postby qlimax » Wed Dec 30, 2009 7:50 pm

thank you :!:

very usefull !
¯`·.¸¸.><((((º>¯`·.¸¸. ><((((º>
User avatar
qlimax
Master Developer
Master Developer
 
Posts: 271
Joined: Mon Aug 31, 2009 10:54 am
Location: Swiss

Postby Skywhy » Wed Dec 30, 2009 11:06 pm

You are most welcome, I am happy to help if I can.
Skywhy
Developer
Developer
 
Posts: 35
Joined: Tue Oct 20, 2009 7:55 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 2 guests