|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| Hello all, I'm trying to use GetTexImage together with a PBO: without success. I am not able to out what I am doing wrong. Whenever I bind the buffer and then call GetTexImage my app crashes with EXC_BAD_ACCESS on glgVectorCopy. Calling GetTexImage without a bound PBO works fine, but slow. I've tried this on 3 different Intel macs - all fail. The code: #define BUFFER_OFFSET(i) ((char *)NULL + (i)) ... GLuint _Tex; GLuint _downloadPBO; glGenTextures(1, & _Tex); glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _Tex); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, _width, _height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0); glGenBuffers(1 , & _downloadPBO); glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, _downloadPBO); glBufferData(GL_PIXEL_PACK_BUFFER_ARB, _width * _height * 4, NULL, GL_STREAM_READ); glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0); ... I upload the texture data using another PBO => this is working fine!. ... glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, _downloadPBO); glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _Tex); glGetTexImage(GL_TEXTURE_RECTANGLE_ARB, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, BUFFER_OFFSET(0)); <= this crashes! glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0); glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 0); Any help is welcome :) Mark |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.