openGL之API学习(九十八)glGetProgramInfoLog

本文介绍OpenGL的glGetProgramInfoLog函数,用于获取着色器程序的对象日志信息。通过指定程序对象ID,设置最大长度,获取并返回日志长度及详细信息。
摘要由CSDN通过智能技术生成

返回着色器程序的日志信息。

void glGetProgramInfoLog(     GLuint program,
      GLsizei maxLength,
      GLsizei *length,
      GLchar *infoLog);

program

    Specifies the program object whose information log is to be queried.

指定着色器程序对象标识符
maxLength

    Specifies the size of the character buffer for storing the returned information log.

指定日志信息的长度,由glGetProgramiv来获取

length

    Returns the length of the string returned in infoLog (excluding the null terminator).

获取实际返回的日志信息长度。
infoLog

    Specifies an array of characters that is used to return the information log.

获取日志信息。

osg/GLExtensions.cpp
bool GLExtensions::getProgramInfoLog( GLuint program, std::string& result ) const
{
    GLsizei bufLen = 0;        // length of buffer to allocate
    GLsizei strLen = 0;        // strlen GL actually wrote to buffer

    glGetProg
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值