PDA

View Full Version : fixed size texture mapping



Zork
11-10-2002, 03:59 AM
Hi!
I have a 320X240 full screen and a bitmap of 16X16 size.I want to texture map the bitmap on a quad so that it fills exactly 16X16 pixels but I don't know how to make a 16x16 quad.I know to make vertex only vith vertex{2,3}{v}{sidf}.Is there a way to work around?
Thanks to the people who have helped me!

Anitox
11-10-2002, 06:30 AM
You can switch to orthographic viewing, then use glVertex2i() to draw your quads.


Anitox

Zork
11-10-2002, 10:44 AM
Can you be more concrete please?I need an example.

Zork
11-10-2002, 10:45 AM
Can you be more concrete please?I need an example.

mm_freak
11-10-2002, 11:19 AM
An OpenGL application should _never_ try to refer to certain pixels on the screen and there isn't really a way to do so. You can, as Anitox said, use orthographic projection, but OpenGL is entirely resolution-independent. Have a look at glDrawPixels() and glBitmap(), maybe they solve your problem.

[This message has been edited by mm_freak (edited 11-10-2002).]