Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 113005 Details for
Bug 170490
media-libs/mesa-6.5.1-r1 (?) - Call to gluBuild2DMipmaps causes segmentation fault
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
the mentioned attachment: sample file which segfaults as described
segfault.c (text/plain), 1.10 KB, created by
Brandon Mintern
on 2007-03-11 21:02:53 UTC
(
hide
)
Description:
the mentioned attachment: sample file which segfaults as described
Filename:
MIME Type:
Creator:
Brandon Mintern
Created:
2007-03-11 21:02:53 UTC
Size:
1.10 KB
patch
obsolete
>#include <GL/glut.h> >#include <stdlib.h> > >unsigned char *some_texture (int width, int height) { > unsigned char *buffer; > int y; > width = 256; > height = 256; > buffer = (unsigned char*) malloc(width * height * 3); > for (y = height-1; y>=0; y--) { > unsigned int x; > for (x=0; x<width; x++) { > unsigned int pos; > pos = width*y+x*3; > /* Just create a solid green buffer */ > buffer[pos] = 0; > buffer[pos+1] = 255; > buffer[pos+2] = 0; > } > } > return buffer; >} > >/******************************************************************************/ > >int main () { > unsigned char *buffer; > int width, height; > width = 256; > height = 256; > GLuint texture; > glGenTextures(1, &texture); > glBindTexture(GL_TEXTURE_2D, texture); > glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); > glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); > buffer = some_texture(width, height); > /* Segfault on this command) */ > gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, width, height, > GL_RGB, GL_UNSIGNED_BYTE, buffer); > free(buffer); > return texture; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 170490
: 113005 |
113010