mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
cb178b7a3a
Previously we would only add the #version pragma to shaders when point sprite texture coordinates are enabled for a layer so that we can access the gl_PointCoord builtin. However I don't think there's any good reason not to just always request GLSL version 1.2 if it's available. That way applications can always use gl_PointCoord without having to enable point sprite texture coordinates. This adds a glsl_version_to_use member to CoglContext which is used to generate the #version pragma as part of the shader boilerplate. On desktop GL this is set to 120 if version 1.2 is available, otherwise it is left at 110. On GLES it is always left as 100. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit e4dfe8b07e8af111ecbcb0da20ff2a2875a2b5d0) Conflicts: cogl/driver/gl/gl/cogl-driver-gl.c
36 lines
1.4 KiB
C
36 lines
1.4 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2012 Intel Corporation.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef _COGL_GLSL_SHADER_PRIVATE_H_
|
|
#define _COGL_GLSL_SHADER_PRIVATE_H_
|
|
|
|
void
|
|
_cogl_glsl_shader_set_source_with_boilerplate (CoglContext *ctx,
|
|
GLuint shader_gl_handle,
|
|
GLenum shader_gl_type,
|
|
CoglPipeline *pipeline,
|
|
GLsizei count_in,
|
|
const char **strings_in,
|
|
const GLint *lengths_in);
|
|
|
|
#endif /* _COGL_GLSL_SHADER_PRIVATE_H_ */
|