jevisHans
V2EX  ›  Android

请教一个 android opengl es2.0 的一个问题

  •  
  •   jevisHans · Aug 24, 2020 · 12040 views
    This topic created in 2088 days ago, the information mentioned may be changed or developed.
    是这样的,我从相机获取到的预览数据是 1440x1080 的数据,在 glSurfaceView 中 draw 的时候使用 GLES20.glBindTexture 绑定的 texture id 来进行绘画,之后显示在手机屏幕 1080x2665 分辨率的时候是一个变形的图像,所以想请教怎么处理呢
    3 replies    2020-08-24 12:43:03 +08:00
    lamy
        1
    lamy  
       Aug 24, 2020 via Android
    改顶点坐标,或者设置 viewpoint
    across
        2
    across  
       Aug 24, 2020
    手动差值转图像大小(如果太闲)。
    RenderTarget 转绘制一遍(如果有实时要求)。
    glSurfaceView 不能改 size 么,根据 ratio 设置好缩放比····
    guchengyehai1
        3
    guchengyehai1  
       Aug 24, 2020 via Android
    相机预览数据会根据顶点坐标 uv 渲染,顶点坐标是两三角形,你尝试改改 MVP 矩阵
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3218 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 14:36 · PVG 22:36 · LAX 07:36 · JFK 10:36
    ♥ Do have faith in what you're doing.