Opened 14 years ago
Last modified 8 years ago
#5720 closed defect
Opengl Texturing fails in 3.1.0 — at Initial Version
Reported by: | cdaragorn | Owned by: | |
---|---|---|---|
Component: | 3D support | Version: | VirtualBox 3.1.0 |
Keywords: | Textures | Cc: | |
Guest type: | other | Host type: | other |
Description
Calling glTexImage2d produces the following errors: OpenGL Warning: vboxCall failed with VBox status code -54 OpenGL Warning: SHCRGL_GUEST_FN_WRITE_READ (28017464) failed with ffffffdb ffffffea
An example of the code I'm using:
glBindTexture(GL_TEXTURE_2D, mTextures[0]); next = VideoLayer::getImage(concat.str().c_str()); concat.str(""); if (next == NULL) return false; GLint nOfColors = next->format->BytesPerPixel; GLenum tFormat; if (nOfColors == 4) { if (next->format->Rmask == 0x000000ff) tFormat = GL_RGBA; else tFormat = GL_BGRA; } else { cerr << "image is not truecolor...\n"; return false; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST_MIPMAP_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); cerr << "reading texture" << endl; glTexImage2D(GL_TEXTURE_2D, 0, nOfColors, next->w, next->h, 0, tFormat, GL_UNSIGNED_BYTE, next->pixels); cerr << "read" << endl; SDL_FreeSurface(next); glGenerateMipmapEXT(GL_TEXTURE_2D);
Host System: Windows 7 64-bit Guest System: Ubuntu 9.10 64-bit
This code works perfectly both under the Windows host and under the same Ubuntu guest running Vbox 3.0.12. The program continues to run past these errors, but all textures appear white. All other opengl functions seem to work fine despite the errors with texturing.
Vbox log file