diff --git a/src/render/draw_symbol.js b/src/render/draw_symbol.js index 4a83ed51ae0..eedc0ab4e3c 100644 --- a/src/render/draw_symbol.js +++ b/src/render/draw_symbol.js @@ -21,7 +21,7 @@ import {evaluateVariableOffset} from '../symbol/symbol_layout'; import { symbolIconUniformValues, symbolSDFUniformValues, - symbolUniformValues + symbolTextAndIconUniformValues } from './program/symbol_program'; import type Painter from './painter'; @@ -213,7 +213,7 @@ function updateVariableAnchorsForBucket(bucket, rotateWithMap, pitchWithMap, var function getSymbolProgramName(isSDF: boolean, isText: boolean, bucket: SymbolBucket) { if (bucket.iconsInText && isText) { - return 'symbol'; + return 'symbolTextAndIcon'; } else if (isSDF) { return 'symbolSDF'; } else { @@ -314,7 +314,7 @@ function drawLayerSymbols(painter, sourceCache, layer, coords, isText, translate size, rotateInShader, pitchWithMap, painter, matrix, uLabelPlaneMatrix, uglCoordMatrix, isText, texSize, true); } else { - uniformValues = symbolUniformValues(sizeData.kind, + uniformValues = symbolTextAndIconUniformValues(sizeData.kind, size, rotateInShader, pitchWithMap, painter, matrix, uLabelPlaneMatrix, uglCoordMatrix, texSize, texSizeIcon); } diff --git a/src/render/program/program_uniforms.js b/src/render/program/program_uniforms.js index 80163b690cd..9ccc73bfd64 100644 --- a/src/render/program/program_uniforms.js +++ b/src/render/program/program_uniforms.js @@ -10,7 +10,7 @@ import {heatmapUniforms, heatmapTextureUniforms} from './heatmap_program'; import {hillshadeUniforms, hillshadePrepareUniforms} from './hillshade_program'; import {lineUniforms, lineGradientUniforms, linePatternUniforms, lineSDFUniforms} from './line_program'; import {rasterUniforms} from './raster_program'; -import {symbolIconUniforms, symbolSDFUniforms, symbolUniforms} from './symbol_program'; +import {symbolIconUniforms, symbolSDFUniforms, symbolTextAndIconUniforms} from './symbol_program'; import {backgroundUniforms, backgroundPatternUniforms} from './background_program'; export const programUniforms = { @@ -36,7 +36,7 @@ export const programUniforms = { raster: rasterUniforms, symbolIcon: symbolIconUniforms, symbolSDF: symbolSDFUniforms, - symbol: symbolUniforms, + symbolTextAndIcon: symbolTextAndIconUniforms, background: backgroundUniforms, backgroundPattern: backgroundPatternUniforms }; diff --git a/src/render/program/symbol_program.js b/src/render/program/symbol_program.js index 7618c38c672..cc25099eb80 100644 --- a/src/render/program/symbol_program.js +++ b/src/render/program/symbol_program.js @@ -54,7 +54,7 @@ export type SymbolSDFUniformsType = {| 'u_is_halo': Uniform1f |}; -export type SymbolUniformsType = {| +export type symbolTextAndIconUniformsType = {| 'u_is_size_zoom_constant': Uniform1i, 'u_is_size_feature_constant': Uniform1i, 'u_size_t': Uniform1f, @@ -118,7 +118,7 @@ const symbolSDFUniforms = (context: Context, locations: UniformLocations): Symbo 'u_is_halo': new Uniform1f(context, locations.u_is_halo) }); -const symbolUniforms = (context: Context, locations: UniformLocations): SymbolUniformsType => ({ +const symbolTextAndIconUniforms = (context: Context, locations: UniformLocations): symbolTextAndIconUniformsType => ({ 'u_is_size_zoom_constant': new Uniform1i(context, locations.u_is_size_zoom_constant), 'u_is_size_feature_constant': new Uniform1i(context, locations.u_is_size_feature_constant), 'u_size_t': new Uniform1f(context, locations.u_size_t), @@ -199,7 +199,7 @@ const symbolSDFUniformValues = ( }); }; -const symbolUniformValues = ( +const symbolTextAndIconUniformValues = ( functionType: string, size: ?{uSizeT: number, uSize: number}, rotateInShader: boolean, @@ -221,4 +221,4 @@ const symbolUniformValues = ( return uniforms; }; -export {symbolIconUniforms, symbolSDFUniforms, symbolIconUniformValues, symbolSDFUniformValues, symbolUniformValues, symbolUniforms}; +export {symbolIconUniforms, symbolSDFUniforms, symbolIconUniformValues, symbolSDFUniformValues, symbolTextAndIconUniformValues, symbolTextAndIconUniforms}; diff --git a/src/shaders/shaders.js b/src/shaders/shaders.js index f5668254808..221728dfddd 100644 --- a/src/shaders/shaders.js +++ b/src/shaders/shaders.js @@ -52,8 +52,8 @@ import symbolIconFrag from './symbol_icon.fragment.glsl'; import symbolIconVert from './symbol_icon.vertex.glsl'; import symbolSDFFrag from './symbol_sdf.fragment.glsl'; import symbolSDFVert from './symbol_sdf.vertex.glsl'; -import symbolFrag from './symbol.fragment.glsl'; -import symbolVert from './symbol.vertex.glsl'; +import symbolTextAndIconFrag from './symbol_text_and_icon.fragment.glsl'; +import symbolTextAndIconVert from './symbol_text_and_icon.vertex.glsl'; export const prelude = compile(preludeFrag, preludeVert); export const background = compile(backgroundFrag, backgroundVert); @@ -80,7 +80,7 @@ export const lineSDF = compile(lineSDFFrag, lineSDFVert); export const raster = compile(rasterFrag, rasterVert); export const symbolIcon = compile(symbolIconFrag, symbolIconVert); export const symbolSDF = compile(symbolSDFFrag, symbolSDFVert); -export const symbol = compile(symbolFrag, symbolVert); +export const symbolTextAndIcon = compile(symbolTextAndIconFrag, symbolTextAndIconVert); // Expand #pragmas to #ifdefs. diff --git a/src/shaders/symbol.fragment.glsl b/src/shaders/symbol_text_and_icon.fragment.glsl similarity index 100% rename from src/shaders/symbol.fragment.glsl rename to src/shaders/symbol_text_and_icon.fragment.glsl diff --git a/src/shaders/symbol.vertex.glsl b/src/shaders/symbol_text_and_icon.vertex.glsl similarity index 100% rename from src/shaders/symbol.vertex.glsl rename to src/shaders/symbol_text_and_icon.vertex.glsl