Open mouse0w0 opened 5 years ago
https://mouse0w0.github.io/2018/10/04/OpenGL-render-2D-graphics-in-a-region/
要实现该功能只需修改片元着色器,其核心代码如下: 1234567891011121314#version 330 core// ins and outs ...// uniforms...uniform vec4 region;void main() { if(gl_FragCoord.x < region.x || gl_FragCoord.x > region.z
https://mouse0w0.github.io/2018/10/04/OpenGL-render-2D-graphics-in-a-region/
要实现该功能只需修改片元着色器,其核心代码如下: 1234567891011121314#version 330 core// ins and outs ...// uniforms...uniform vec4 region;void main() { if(gl_FragCoord.x < region.x || gl_FragCoord.x > region.z