On Sun, Jan 30, 2011 at 1:25 PM, amdlintuxo <[email protected]> wrote:

> 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.

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.

> By the way i saw many of you works Ian. The GPU particle system (from
> glLib) has amazed me so much as well as the glLib itself, but code is
> still complicated for me due to my small experience in programming.
> Thanks for support!
>
Thanks :-)

Ian

Reply via email to