Example #1
0
void
cogl_program_uniform_int (int  uniform_no,
			  gint   size,
			  gint   count,
			  const GLint *value)
{
  cogl_program_uniform_x (uniform_no, size, count, COGL_BOXED_INT,
			  sizeof (gint) * size, value);
}
Example #2
0
void
cogl_program_set_uniform_1i (CoglHandle handle,
                             int uniform_location,
                             int value)
{
  cogl_program_uniform_x (handle,
                          uniform_location, 1, 1, COGL_BOXED_INT,
                          sizeof (int), &value, FALSE);
}
Example #3
0
void
cogl_program_uniform_float (int  uniform_no,
                            gint     size,
                            gint     count,
                            const GLfloat *value)
{
  cogl_program_uniform_x (uniform_no, size, count, COGL_BOXED_FLOAT,
			  sizeof (float) * size, value);
}
Example #4
0
void
cogl_program_uniform_1i (int uniform_no,
                         int value)
{
  _COGL_GET_CONTEXT (ctx, NO_RETVAL);
  cogl_program_uniform_x (ctx->current_program,
                          uniform_no, 1, 1, COGL_BOXED_INT,
                          sizeof (int), &value, FALSE);
}
Example #5
0
void
cogl_program_set_uniform_1f (CoglHandle handle,
                             int uniform_location,
                             float value)
{
  cogl_program_uniform_x (handle,
                          uniform_location, 1, 1, COGL_BOXED_FLOAT,
                          sizeof (float), &value, FALSE);
}
Example #6
0
void
cogl_program_uniform_int (int uniform_no,
                          int size,
                          int count,
                          const GLint *value)
{
  _COGL_GET_CONTEXT (ctx, NO_RETVAL);
  cogl_program_uniform_x (ctx->current_program,
                          uniform_no, size, count, COGL_BOXED_INT,
                          sizeof (int) * size, value, FALSE);
}
Example #7
0
void
cogl_program_set_uniform_int (CoglHandle handle,
                              int uniform_location,
                              int n_components,
                              int count,
                              const int *value)
{
  cogl_program_uniform_x (handle,
                          uniform_location, n_components, count,
                          COGL_BOXED_INT,
                          sizeof (int) * n_components, value, FALSE);
}
Example #8
0
void
cogl_program_set_uniform_matrix (CoglHandle handle,
                                 int uniform_location,
                                 int dimensions,
                                 int count,
                                 gboolean transpose,
                                 const float *value)
{
  g_return_if_fail (cogl_is_program (handle));

  cogl_program_uniform_x (handle,
                          uniform_location, dimensions, count,
                          COGL_BOXED_MATRIX,
                          sizeof (float) * dimensions * dimensions,
                          value,
                          transpose);
}
Example #9
0
void
cogl_program_uniform_matrix (int   uniform_no,
                             gint      size,
                             gint      count,
                             gboolean  transpose,
                             const GLfloat  *value)
{
  CoglBoxedValue *bv;

  _COGL_GET_CONTEXT (ctx, NO_RETVAL);

  bv = ctx->gles2.custom_uniforms + uniform_no;

  cogl_program_uniform_x (uniform_no, size, count, COGL_BOXED_MATRIX,
			  sizeof (float) * size * size, value);

  bv->transpose = transpose;
}