mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
5f30835eae
We now prepend a set of defines to any given GLSL shader so that we can define builtin uniforms/attributes within the "cogl" namespace that we can use to provide compatibility across a range of the earlier versions of GLSL. This updates test-cogl-shader-glsl.c and test-shader.c so they no longer needs to special case GLES vs GL when splicing together its shaders as well as the blur, colorize and desaturate effects. To get a feel for the new, portable uniform/attribute names here are the defines for OpenGL vertex shaders: #define cogl_position_in gl_Vertex #define cogl_color_in gl_Color #define cogl_tex_coord_in gl_MultiTexCoord0 #define cogl_tex_coord0_in gl_MultiTexCoord0 #define cogl_tex_coord1_in gl_MultiTexCoord1 #define cogl_tex_coord2_in gl_MultiTexCoord2 #define cogl_tex_coord3_in gl_MultiTexCoord3 #define cogl_tex_coord4_in gl_MultiTexCoord4 #define cogl_tex_coord5_in gl_MultiTexCoord5 #define cogl_tex_coord6_in gl_MultiTexCoord6 #define cogl_tex_coord7_in gl_MultiTexCoord7 #define cogl_normal_in gl_Normal #define cogl_position_out gl_Position #define cogl_point_size_out gl_PointSize #define cogl_color_out gl_FrontColor #define cogl_tex_coord_out gl_TexCoord #define cogl_modelview_matrix gl_ModelViewMatrix #define cogl_modelview_projection_matrix gl_ModelViewProjectionMatrix #define cogl_projection_matrix gl_ProjectionMatrix #define cogl_texture_matrix gl_TextureMatrix And for fragment shaders we have: #define cogl_color_in gl_Color #define cogl_tex_coord_in gl_TexCoord #define cogl_color_out gl_FragColor #define cogl_depth_out gl_FragDepth #define cogl_front_facing gl_FrontFacing |
||
---|---|---|
.. | ||
Makefile.am | ||
test-actor-clone.c | ||
test-actors.c | ||
test-animation.c | ||
test-animator.c | ||
test-behave.c | ||
test-bin-layout.c | ||
test-bind.c | ||
test-binding-pool.c | ||
test-box-layout.c | ||
test-cairo-flowers.c | ||
test-clip.c | ||
test-cogl-multitexture.c | ||
test-cogl-offscreen.c | ||
test-cogl-point-sprites.c | ||
test-cogl-primitives.c | ||
test-cogl-shader-arbfp.c | ||
test-cogl-shader-glsl.c | ||
test-cogl-tex-convert.c | ||
test-cogl-tex-foreign.c | ||
test-cogl-tex-getset.c | ||
test-cogl-tex-polygon.c | ||
test-cogl-tex-tile.c | ||
test-cogl-vertex-buffer.c | ||
test-constraints.c | ||
test-depth.c | ||
test-devices.c | ||
test-drag.c | ||
test-easing.c | ||
test-events.c | ||
test-fbo.c | ||
test-flow-layout.c | ||
test-fullscreen.c | ||
test-grab.c | ||
test-layout.c | ||
test-main.c | ||
test-model.c | ||
test-multistage.c | ||
test-offscreen.c | ||
test-paint-wrapper.c | ||
test-path-constraint.c | ||
test-pixmap.c | ||
test-project.c | ||
test-rotate.c | ||
test-scale.c | ||
test-script.c | ||
test-scrolling.c | ||
test-shader.c | ||
test-stage-read-pixels.c | ||
test-stage-sizing.c | ||
test-state-animator.c | ||
test-state.c | ||
test-table-layout.c | ||
test-text-field.c | ||
test-text.c | ||
test-texture-async.c | ||
test-texture-material.c | ||
test-texture-quality.c | ||
test-textures.c | ||
test-threads.c | ||
test-unproject.c | ||
test-viewport.c | ||
wrapper.sh.in |