Commit Graph

5 Commits

Author SHA1 Message Date
Robert Bragg
63fd426b4b cogl-shader: get_info_log should always use strdup
In the case where there is no error log for arbfp we were returning a
"" string literal. The other paths were using g_strdup to return a
string that could be freed with g_free. This makes the arbfp path return
g_strdup ("") instead.
2010-08-12 16:50:47 +01:00
Robert Bragg
a0247f294d cogl-shader: correctly #ifdef guard an if else block
There are quite a few if {} else {} blocks for dealing with arbfp else
glsl and the first block is guarded with #ifdef HAVE_COGL_GL. In this
case though the #endif was before the else so it wouldn't compile for
gles.
2010-08-12 16:50:47 +01:00
Emmanuele Bassi
242afd96eb Silence a compiler warning 2010-08-09 19:38:23 +01:00
Robert Bragg
65196a4a9b cogl: Allow setting ARBfp source on a CoglShader
This makes CoglProgram/Shader automatically detect when the user has
given an ARBfp program by checking for "!!ARBfp1.0" at the beginning of
the user's source.

ARBfp local parameters can be set with cogl_program_uniform_float
assuming you pass a @size of 4 (all ARBfp program.local parameters
are vectors of 4 floats).

This doesn't expose ARBfp environment parameters or double precision
local parameters.
2010-08-09 17:27:02 +01:00
Robert Bragg
7705469d2b cogl-shader: unifies the driver/{gl,gles} shader files
The per driver implementations of cogl-shader.c had become almost
identical we now have a single cogl/cogl-shader.c instead.
2010-08-03 12:41:37 +01:00