Draw 2D Mesh Grid using GLSL in 3D space

后端 未结 2 1935
轮回少年
轮回少年 2021-01-07 03:57

I\'m hoping to draw a 2D Grid within a finite space on the X axis using OpengGL 4.0.

I wish to use GLSL using vert/frag shaders etc for rending the light (making the

2条回答
  •  生来不讨喜
    2021-01-07 04:20

    GLSL is not meant for doing things like that. GLSL is meant for writing shaders which:

    • tesselate simple geometries into slightly more complex ones
    • transform simple primitives in abstract space into clip space
    • control the fragment rasterization process

    GLSL isn't intended to be used for actually making draw calls. Yes, you can use shaders for procedural geometry generation, but you always start off with geometry and draw calls made on the client side.

提交回复
热议问题