Skip to main content
GameDev.net gamedev.net
🔒 Locked

glDeleteTextures crashes in Linux

Started by MatrixCubed Dec 3, 2006 at 8:44 PM 1 replies 1.4k views
Original Post
MatrixCubed
MatrixCubed
Hi all, I've written a fullscreen/windowed mode toggle functionality for my game engine, and the code works great in Windows. However, the same code crashes under Linux. I've tracked the crash down to glDeleteTextures. The code is pretty simple, as follows:

    if (glIsTexture(m_iglTexture) == GL_TRUE)
    {
        glDeleteTextures(1, &m_iglTexture); // crashes here
    }

I'm really not sure what to do at this point; I need some way to reload invalidated textures, and unloading textures/destroying/recreating app window/reloading textures seems the cleanest way to accomplish this. Any suggestions would be appreciated.
deathkrush
deathkrush
If the OpenGL code works on Windows but crashes on Linux that probably means that there is a pointer bug somewhere. Because of the crappy way Windows handles memory you may be lucky (or unlucky) and never notice the bug, however Linux has more robust memory protection and it crashes your app whenever it misbehaves. Try using glGetError and watching the error flag when you step through the code in the debugger.
deathkrushPS3/Xbox360 Graphics Programmer, Mass Media.Completed Projects: Stuntman Ignition (PS3), Saints Row 2 (PS3), Darksiders(PS3, 360)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.