Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Support "#pragma mapbox:" commands in the shaders - #5174

Merged
brunoabinader merged 1 commit into
masterfrom
brunoabinader-uniform-pragmas
Jun 2, 2016
Merged

brunoabinader merged 1 commit into
masterfrom
brunoabinader-uniform-pragmas

Conversation

@brunoabinader

@brunoabinader brunoabinader commented Jun 2, 2016 •

Copy link
Copy Markdown
Contributor

GL JS has introduced some simple #pragma statements in the shaders in order to reduce data-driven styling boilerplate.

Supporting these #pragma statements in GL Native will reduce the need for #ifdef statements in the shaders and lay some foundation for data-driven styling in GL Native.

  • #pragma mapbox: define foo lowp statements: define a uniform variable u_foo with the specified precision
  • #pragma mapbox: initialize foo lowp statements: alias the uniform variable from u_foo to foo

ref mapbox/mapbox-gl-js#2585

cc @jfirebaugh @1ec5 @mourner

@jfirebaugh

Copy link
Copy Markdown
Contributor

@brunoabinader Want to grab this?

@brunoabinader

Copy link
Copy Markdown
Contributor

@jfirebaugh sure 👍

@brunoabinader
brunoabinader force-pushed the brunoabinader-uniform-pragmas branch from 0677718 to af65da1 Compare June 2, 2016 12:44
@brunoabinader

Copy link
Copy Markdown
Contributor

Shader PR: mapbox/mapbox-gl-shaders#6
Part of mapbox/mapbox-gl-shaders#1.

@brunoabinader
brunoabinader merged commit af65da1 into master Jun 2, 2016
@brunoabinader
brunoabinader deleted the brunoabinader-uniform-pragmas branch June 2, 2016 13:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants