Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow float values for dash parameter #1249

Merged
merged 3 commits into from
Jan 27, 2017
Merged

Allow float values for dash parameter #1249

merged 3 commits into from
Jan 27, 2017

Conversation

tallytalwar
Copy link
Member

  • Parse float values
  • Scale dash values with a fixed scale factor "20" (In accordance with JS) before filling the dash
    texture
  • Make sure to adjust texture coordinate to account for the texture data
  • fixes Allow fractional dashed line patterns #951

- Parse float values
- Scale dash values with a fixed scale factor "20" (In accordance with JS) before filling the dash
texture
- Make sure to adjust texture coordinate to account for the texture data
- fixes #951
m_shaderProgram->addSourceBlock("defines", "#define TANGRAM_DASHLINE_TEX_SCALE " +
std::to_string(dash_scale) + "\n", false);
} else {
m_shaderProgram->addSourceBlock("defines", "#define TANGRAM_DASHLINE_TEX_SCALE 1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this case? The way this is used in the shader I think this could cause a float-int mismatch error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Not outdated, despite what github says

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had not!. Good one. Thanks @karimnaaji .

@karimnaaji karimnaaji merged commit 198dc21 into master Jan 27, 2017
@karimnaaji karimnaaji deleted the fix-951 branch January 27, 2017 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow fractional dashed line patterns
3 participants