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

使用 createTexture2D format gl.LUMINANCE 问题 #188

Closed
lvisei opened this issue May 16, 2024 · 1 comment
Closed

使用 createTexture2D format gl.LUMINANCE 问题 #188

lvisei opened this issue May 16, 2024 · 1 comment

Comments

@lvisei
Copy link
Member

lvisei commented May 16, 2024

WebGL1 使用 gl.LUMINANCE 报错,from https://github.com/antvis/L7/blob/beta/packages/layers/src/raster/models/raster.ts#L97

createTexture2D({
    data: new Float32Array(data),
    width,
    height,
    /**
     * WebGL1 allow the combination of gl.LUMINANCE & gl.FLOAT with OES_texture_float
     */
    format: queryVerdorInfo() === 'WebGL1' ? gl.LUMINANCE : gl.RED,
    type: gl.FLOAT,
    alignment: 1,
 });
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Problem using createTexture2D format gl.LUMINANCE

@xiaoiver xiaoiver closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants