[pygame] Re: (pyopengl) GLSL fragment shader with arrays uniform cause sporadic screen blinking

2011-02-12 Thread amdlintuxo
On 12 фев, 00:43, Devon Scott-Tunkin wrote: > You may want to check > outhttp://www.opengl.org/wiki/GLSL_Uniform#Implementation_limits. You can > check the uniform limits of your video card with > glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, yourReturnVar) Thanks for reference! Good point wh

[pygame] Re: (pyopengl) GLSL fragment shader with arrays uniform cause sporadic screen blinking

2011-02-11 Thread amdlintuxo
Shader now is more compact. The program below is working fine with radeon 5550 The program generate different GLSL Shockwave effect by randomizing shader inputs. http://bpaste.net/show/13632/ All thanks for support!

[pygame] Re: (pyopengl) GLSL fragment shader with arrays uniform cause sporadic screen blinking

2011-02-11 Thread amdlintuxo
THE PROBLEM IS SOLVED by decreasing array elements at stage of declaration in shader from 100 down to 20. > On Feb 12, 1:09 am, Devon Scott-Tunkin wrote: > Thehttp://bpaste.net/show/13617/is not the same because the glsl compiler > will usually compile out (make inactive) all of your uniforms si

[pygame] Re: (pyopengl) GLSL fragment shader with arrays uniform cause sporadic screen blinking

2011-02-11 Thread amdlintuxo
> > claudio > > after resampling to power of two (512 x 512) it passes that point, but seems > that this test machine (vga = intel 945g ) don't supports the funcionality: Hi Claudio. You are right it requires OpenGl 2.0 HW support, sorry that i forgot to mention this in the fist topic. Probably it

[pygame] Re: (pyopengl) GLSL fragment shader with arrays uniform cause sporadic screen blinking

2011-02-11 Thread amdlintuxo
On Feb 11, 10:37 pm, amdlintuxo wrote: > Hi all. > > The strange is: > The problem occurs with shaderhttp://bpaste.net/show/13616/ > even if i pass empty arrays into it (imax = 0), so actually shader > should do any distortion work. Sorry, misstype = The strange is: = The p

[pygame] (pyopengl) GLSL fragment shader with arrays uniform cause sporadic screen blinking

2011-02-11 Thread amdlintuxo
Hi all. Strange sporadic screen blinking when using array uniform variables in fragment shader. Unfortunately i have only one HW config to test this(maybe the problem is in my HW) The strange is: The problem occurs with shader http://bpaste.net/show/13616/ even if i pass empty arrays into it (ima

[pygame] Re: 2D Shockwave Post Processing Filter (GLSL)

2011-02-08 Thread amdlintuxo
Hi all. Seems to be working fine now! My two mistakes were: 1) in shader the "time" variable must get game time(loop time), and i was sending the constant value which is wrong. 2) in shader the "center" variable must get the texture coordinate [0,1], and i was sending the pixels sizes. Working dirt

[pygame] 2D Shockwave Post Processing Filter (GLSL)

2011-02-07 Thread amdlintuxo
Hi all. I am trying to implement the 2D Shockwave Post Processing Filter (GLSL) using pyopengl. The effect(shader) are available here http://www.geeks3d.com/20091116/shader-library-2d-shockwave-post-processing-filter-glsl/ As far as i understood this shader is kind of post-process, so in order to

[pygame] Re: [pyopengl] glActiveTexture(GL_TEXTURE1) cause failure in my code, can't get the reason why

2011-02-05 Thread amdlintuxo
On Feb 5, 7:39 pm, Ian Mallett wrote: > Hi, > > Have a look at the output; the minus one indicates an invalid index, invalid > because the variable it points to does not exist in the shader.  Although it > doesn't on my machine, perhaps trying to pass the uniform to it causes some > error. > > The

[pygame] Re: [pyopengl] glActiveTexture(GL_TEXTURE1) cause failure in my code, can't get the reason why

2011-02-05 Thread amdlintuxo
Sorry, problem was solved by excluding GLUT and it's call. Cheers, Alex

[pygame] [pyopengl] glActiveTexture(GL_TEXTURE1) cause failure in my code, can't get the reason why

2011-02-05 Thread amdlintuxo
Hi all. I was trying to play with GLSL multi-texturing and as usual the problems don't want stay far away from me. Now i get problem with Texture units. glActiveTexture(GL_TEXTURE1) cause failure, i can't get the reason why. If i use only glActiveTexture(GL_TEXTURE0) then it's is OK, but in this

[pygame] Re: Data transferring from main python program to GLSL shader not happens in my case

2011-01-31 Thread amdlintuxo
Hi Ian. Thanks a lot for support, your inputs has resolved the problem! Uniform variables are working as expected. Now i may continue study shaders. Cheers, Alex

[pygame] Re: Data transferring from main python program to GLSL shader not happens in my case

2011-01-30 Thread amdlintuxo
On Jan 31, 1:08 am, Ian Mallett wrote: > No, it wasn't.  In your first code (http://bpaste.net/show/13357/), line > 116, you call glGetUniformLocation, but glUseProgram was not called at that > time.  I see that you're calling it in your main loop, which is good, but > the reason why you're not ge

[pygame] Re: Data transferring from main python program to GLSL shader not happens in my case

2011-01-30 Thread amdlintuxo
Hi Ian. > Your problem is that the shader is not bound (use something like > glUseProgram(blah)) when you try to get the variable. In all codes the command glUseProgram(program) was used. Without this command the python interpreter break the script running at command gl.glUniform3f Just thinking c

[pygame] Re: Data transferring from main python program to GLSL shader not happens in my case

2011-01-30 Thread amdlintuxo
Again me. I adapted the tuto http://www.pygame.org/wiki/GLSLExample close to my problem (just adding uniform variable into the shader and in python program few string to establish connection shader uniform variable and python program) The code http://bpaste.net/show/13357/ return blank screen gl.

[pygame] Data transferring from main python program to GLSL shader not happens in my case

2011-01-30 Thread amdlintuxo
Greetings all. Yesterday i am starting to probe how shaders works. I have aim to write shockwave effect using shader. I was using both tutorials to understand how it works: 1) http://www.pygame.org/wiki/GLSL_ARB_Example?parent=GLSLExample 2) http://pyopengl.sourceforge.net/context/tutorials/shader