PDA

View Full Version : NPOT with GL_TEXTURE _RECTANGLE_ARB



maxphil
02-01-2007, 03:16 AM
Hi,

I'm trying to load a "npot" bitmap into a GL_TEXTURE_RECTANGLE_ARB texture, but clearly i'm missing something becouse the drawing is all wierd (it works fine with "pot" images).

Can somebody help me?

*MSV 2003 project
http://www.inf.ufsc.br/~vilsonhj/tex_arb.rar

With images like 360x240 and 1024x768 the program displays it FINE.

However, with an image of 407x369 check it out:
http://www.geocities.com/karl_phillip/npot.JPG

[]'s

Komat
02-01-2007, 03:44 AM
You need to disable alignment of rows of source data using glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ) ;

maxphil
02-01-2007, 04:00 AM
Man .. I wasted a hole day trying to figure it out, heheh!

Thank you so much, it solved my problem! ;D

I'm rating you up.

[]'s