[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



On Jan 31, 1:08 am, Ian Mallett <geometr...@xxxxxxxxx> 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 getting a correct binding to the shader's variable
> is that the shader was not bound at the time you tried to get it.  So, try
> adding a glUseProgram(program) between lines 115 and 116.
Ian, you were right, sorry for that. I did according you instruction.
But still this doesn't resolve my problem (i moved
glGetUniformLocation call after glUseProgram call inside main loop)
Here is full code:
http://bpaste.net/show/13362/