gl debugging help requested
Tom "spot" Callaway
tcallawa at redhat.com
Fri Jun 29 13:34:21 UTC 2007
On Fri, 2007-06-29 at 10:14 +0200, Hans de Goede wrote:
> I've seen many glGenTextures crashes in games I've packaged, esp. on 64 bit.
> Usually the problem is that glGenTextures gets called before a glContext has
> been created. All proprietary GL implementations are fine with this, but Mesa
> will crash, esp on 64 bit (but I've seen this on 32 bit too).
>
> Let me know if you need more help.
The code in question looks like this:
unsigned char* data = read_png_file (m_file_name);
GLuint texture_id;
glGenTextures (1, &texture_id);
glBindTexture (GL_TEXTURE_2D, texture_id);
set_gl_parameters (data, smooth, mip_map, texture_wrap);
m_texture_name = texture_id;
delete [] data;
ms_image_cache [m_file_name] =
Cached_Image (m_texture_name, m_width_pixels, m_height_pixels);
All of the reference code I could find on google seemed to be similar,
declare the GLuint variable, then initialize it with glGenTextures.
Is there something obviously wrong here?
Any help is appreciated,
~spot
More information about the fedora-devel-list
mailing list