首页 > 其他分享 >OpenGlobe之ShaderObjectGL3x

OpenGlobe之ShaderObjectGL3x

时间:2023-10-30 12:01:15浏览次数:38  
标签:编译 ShaderObjectGL3x sources shaderObject GL OpenGlobe

该类只有一个私有成员变量_shaderObject

private int _shaderObject;

这是用来存放地址?

初始化:

_shaderObject = GL.CreateShader(shaderType);

接着,为_shaderObject添加shader源文件:

GL.ShaderSource(_shaderObject, sources.Length, sources, lengthPointer);

接着,为_shaderObject编译

GL.CompileShader(_shaderObject);

最后,获取_shaderObject编译状态

GL.GetShader(_shaderObject, ShaderParameter.CompileStatus, out compileStatus);

https://learn.microsoft.com/zh-cn/dotnet/api/opentk.graphics.es30.gl.createshader?view=xamarin-ios-sdk-12

标签:编译,ShaderObjectGL3x,sources,shaderObject,GL,OpenGlobe
From: https://www.cnblogs.com/2008nmj/p/17797460.html

相关文章

  • OpenGlobe
    Note:OpenGlobeisgreatforlearningalongwithourbook,3DEngineDesignforVirtualGlobes.Butforaproductionquality,opensource,virtualglobebythe......