LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA,
LUMINANCE_ALPHA8 = GL_LUMINANCE8_ALPHA8,
LUMINANCE_ALPHA16F = GL_LUMINANCE_ALPHA16F_ARB,
- LUMINANCE_ALPHA32F = GL_LUMINANCE_ALPHA32F_ARB,
+ LUMINANCE_ALPHA32F = GL_LUMINANCE_ALPHA32F_ARB
};
void operator>>(const LexicalConverter &, PixelFormat &);
{
GLsizei len = 0;
glGetObjectParameterivARB(id, GL_OBJECT_INFO_LOG_LENGTH_ARB, &len);
- char log[len+1];
- glGetInfoLogARB(id, len+1, &len, log);
- return string(log, len);
+ char *buf = new char[len+1];
+ glGetInfoLogARB(id, len+1, &len, buf);
+ string log(buf, len);
+ delete[] buf;
+ return log;
}
void Program::bind() const
{
GLsizei len = 0;
glGetObjectParameterivARB(id, GL_OBJECT_INFO_LOG_LENGTH_ARB, &len);
- char log[len+1];
- glGetInfoLogARB(id, len+1, &len, log);
- return string(log, len);
+ char *buf = new char[len+1];
+ glGetInfoLogARB(id, len+1, &len, buf);
+ string log(buf, len);
+ delete[] buf;
+ return log;
}
} // namespace GL
depth_buf.bind_to(unit);
float diam = radius*2;
- float s_eq[4] = { matrix[0]/diam, matrix[4]/diam, matrix[8]/diam, matrix[12]/diam+0.5 };
- float t_eq[4] = { matrix[1]/diam, matrix[5]/diam, matrix[9]/diam, matrix[13]/diam+0.5 };
- float r_eq[4] = { -matrix[2]/diam, -matrix[6]/diam, -matrix[10]/diam, 0.5-matrix[14]/diam-4.0/size };
+ float s_eq[4] = { matrix[0]/diam, matrix[4]/diam, matrix[8]/diam, matrix[12]/diam+0.5f };
+ float t_eq[4] = { matrix[1]/diam, matrix[5]/diam, matrix[9]/diam, matrix[13]/diam+0.5f };
+ float r_eq[4] = { -matrix[2]/diam, -matrix[6]/diam, -matrix[10]/diam, 0.5f-matrix[14]/diam-4.0f/size };
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGenfv(GL_S, GL_EYE_PLANE, s_eq);
enable(GL_TEXTURE_GEN_S);