Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: xernobyl on January 14, 2007

Title: OpenGL: Screen distortion effect (NOP problem?)
Post by: xernobyl on January 14, 2007
I am trying do do some kind of screeen distortion effect passing a non-power-of-two texture to a texture, using OpenGL, but everything gets distorted and really really slow when I try using the texture. I am sure the texture is captured ok.
Ideas?

To give a better idea of what I want: I want to make some screen distortion effects like in Contamination of the present governmental system by matt current.
http://www.pouet.net/prod.php?which=18353

Edit: Problem solved.

It took a while to find that you can't warp non power of two textures... :(
Title: Re: OpenGL: Screen distortion effect (NOP problem?)
Post by: GrahamK on January 14, 2007
Yeah, openGL doesn't like things that are not powers of two, some drivers don't even like when the texture isn't square as well.

If I'm doing that sort of thing I use the next size up in powers of 2, and use UV values to just show the area I want.
Title: Re: OpenGL: Screen distortion effect (NOP problem?)
Post by: xernobyl on January 17, 2007
That NOP in the title is suposed to be POT... Power-Of-Two...
It's really strange that I can't warp the texture because in the OpenGL documentation it's stated that you can do whatever you can do with POT textures... anyway I just want to make some fullscreen feedback effects (media player visualization style) and I don't need anything more.
Title: Re: OpenGL: Screen distortion effect (NOP problem?)
Post by: stormbringer on December 03, 2007
the OpenGL documentation is only telling you half of the truth.. you have to use shaders to make it possible. The original OpenGL pipeline is less and less maintained by manufacturers, especially for the new extensions like non-power of 2 textures.... which somehow makes sense....