缩略语 必须在第2.2条与开放式利比里亚经济体系中开展工作:
// Create a frame buffer
glGenFramebuffers( 1, &(frame_buffer ) );
// Generate a texture to hold the colour buffer
glGenTextures(1, &(colour_texture) );
glBindTexture(GL_TEXTURE_2D, colour_texture);
// Width and height do not have to be a power of two
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
pixelWidth, pixelHeight,
0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// Probably just paranoia
glBindTexture(GL_TEXTURE_2D, 0);
// Create a texture to hold the depth buffer
glGenTextures(1, &(depth_texture) );
glBindTexture(GL_TEXTURE_2D, depth_texture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT,
pixelWidth, pixelHeight,
0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glBindTexture(GL_TEXTURE_2D, 0);
glBindFramebuffer(GL_FRAMEBUFFER, frame_buffer);
// Associate the textures with the FBO.
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, colour_texture, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_TEXTURE_2D, depth_texture, 0);
// Check FBO status.
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if ( status == GL_FRAMEBUFFER_COMPLETE )
{
// Success
}
很现实的是,遵循公开的GLES2手册,并按正确顺序做一切。
将这一点与开放式信用证ES1.1合并起来,将紧急救援行动并入必要的职能电话,并将自缓冲物体设计以来的固定装置再使用。 任何在框架中加上深度案文的企图都导致缓冲区内的一个不完整的缓冲物体。
因此,在我得出结论时,这并不与开放的欧安论坛ES1.1合作,但显然与ES2.2合作。
如果任何人都找到了ES1.1的解决办法,那将令人感兴趣。