[solved] GL texture creation failed for font

When I run a self-created p3d file (I haven’t tried p3d files made by others), every text character is replaced by a rectangle, and I get a lot of these errors:

When I run the samples natively I don’t get this error, and the text characters are fine.

I used this command to make the p3d file:

packp3d -o built/ralph.p3d -p C:\Panda3D-1.7.0\python\Lib -m Tut-Roaming-Ralph.py -d Roaming-Ralph -r morepy -n ogg

This means that the texture image that is used for the font is not loading. (GL error 1280 is just a generic error message.) It’s not obvious why this wouldn’t work from a p3d file. Are other textures in your p3d file not loading as well–are all your models just plain white? Or are some of them working?

When you run from a p3d file, it doesn’t read your default Config.prc file. Is it possible there’s something in your personal Config.prc file that you need to have there in order to work around a driver bug, that it’s not picking up?

David

When the application starts all textures are white, but a moment later all textures are colored (and they stay colored). I hadn’t noticed that before.

Also I just noticed that there are similar errors (like the font error in the first post) for all textures, but these errors are displayed only once, at the start of the application.

Afaik, I don’t use a Config.prc file.

Hmm, it’s pretty baffling.

Can you post the entire log output from your p3d session?

David

C:\Panda3D-1.7.0\samples>panda3d built\ralph.p3d
DirectStart: Starting the game.
:display: loading display module: libpandagl.dll
:display: loading display module: libpandadx9.dll
:display(warning): Unable to load: Module not found
:display: loading display module: libpandadx8.dll
:display: loading display module: libtinydisplay.dll
Known pipe types:
  wglGraphicsPipe
  wdxGraphicsPipe8
  TinyWinGraphicsPipe
  TinyOffscreenGraphicsPipe
(all display modules loaded.)
:display:windisplay: OS version: 5.1.2.2600
:display:windisplay:   Service Pack 3
:display:windisplay: max Mhz 1600000000, current Mhz 800000000
:ShowBase: Default graphics pipe is wglGraphicsPipe (OpenGL).
:display:gsg:glgsg(warning): glDrawRangeElements advertised as supported by Open
GL runtime, but could not get pointers to extension functions.
:display:gsg:glgsg(warning): 3-D textures advertised as supported by OpenGL runt
ime, but could not get pointers to extension functions.
:display:gsg:glgsg(warning): BlendEquation advertised as supported by OpenGL run
time, but could not get pointers to extension function.
:display:gsg:glgsg(warning): BlendColor advertised as supported by OpenGL runtim
e, but could not get pointers to extension function.
:display: Unable to set window properties: !undecorated
:ShowBase: Successfully opened window of type wglGraphicsWindow (OpenGL)
:audio: NullAudioManager
:audio: NullAudioManager
:ShowBase: __dev__ == 0
:pnmtext: Loaded font Perspective Sans Regular
:loader: Reading /mf/models/world.bam
:gobj: Loading texture /mf/models/ground.jpg
:gobj: Loading texture /mf/models/tree.jpg
:gobj: Loading texture /mf/models/rock03.jpg
:gobj: Loading texture /mf/models/hedge.jpg
:loader: Reading /mf/models/ralph.bam
:gobj: Loading texture /mf/models/ralph.jpg
:ShowBase: Got window event: origin=(-1, -1) size=(640, 480) title="Panda" !unde
corated !fullscreen foreground !minimized open !cursor_hidden absolute
:display:gsg:glgsg(error): GL texture creation failed for ground : GL error 1280

:display:gsg:glgsg(error): Could not load ground
:display:gsg:glgsg(error): GL texture creation failed for rock03 : GL error 1280

:display:gsg:glgsg(error): Could not load rock03
:display:gsg:glgsg(error): GL texture creation failed for ralph : GL error 1280
:display:gsg:glgsg(error): Could not load ralph
:display:gsg:glgsg(error): GL texture creation failed for Perspective Sans Regul
ar_0 : GL error 1280
:display:gsg:glgsg(error): Could not load Perspective Sans Regular_0
:ShowBase: Got window event: origin=(93, 181) size=(640, 480) title="Panda" !und
ecorated !fullscreen foreground !minimized open !cursor_hidden absolute
:display:gsg:glgsg(error): GL texture creation failed for rock03 : GL error 1280

:display:gsg:glgsg(error): Could not load rock03
:display:gsg:glgsg(error): GL texture creation failed for Perspective Sans Regul
ar_0 : GL error 1280
:display:gsg:glgsg(error): Could not load Perspective Sans Regular_0
:display:gsg:glgsg(error): GL texture creation failed for Perspective Sans Regul
ar_0 : GL error 1280
:display:gsg:glgsg(error): Could not load Perspective Sans Regular_0
:ShowBase: Got window event: origin=(93, 181) size=(640, 480) title="Panda" !und
ecorated !fullscreen !foreground !minimized open !cursor_hidden absolute
:display:gsg:glgsg(error): GL texture creation failed for Perspective Sans Regul
ar_0 : GL error 1280
:display:gsg:glgsg(error): Could not load Perspective Sans Regular_0
:display:gsg:glgsg(error): GL texture creation failed for Perspective Sans Regul
ar_0 : GL error 1280
:display:gsg:glgsg(error): Could not load Perspective Sans Regular_0
:display:gsg:glgsg(error): GL texture creation failed for Perspective Sans Regul
ar_0 : GL error 1280
:display:gsg:glgsg(error): Could not load Perspective Sans Regular_0
:display: Closing wglGraphicsWindow
:ShowBase: Got window event: origin=(93, 181) size=(640, 480) title="Panda" !und
ecorated !fullscreen !foreground !minimized !open !cursor_hidden absolute
:ShowBase: User closed main window.
:ShowBase: Exiting ShowBase.
:TaskManager: TaskManager.destroy()

Hmm, these messages are interesting:

:display:gsg:glgsg(warning): glDrawRangeElements advertised as supported by Open
GL runtime, but could not get pointers to extension functions.
:display:gsg:glgsg(warning): 3-D textures advertised as supported by OpenGL runt
ime, but could not get pointers to extension functions.
:display:gsg:glgsg(warning): BlendEquation advertised as supported by OpenGL run
time, but could not get pointers to extension function.
:display:gsg:glgsg(warning): BlendColor advertised as supported by OpenGL runtim
e, but could not get pointers to extension function.

What does the log look like when you run the application natively? Does it contain those warnings too?

David

Yes, I get the same warning messages.

After those warnings, I got error messages:

And I get more errors messages after that for the same file, but on lines 8843 and 8146.

I’m sorry for not having noticed these messages before.

Ah, this makes more sense. Yes, I see what’s happening now: something in your graphics driver is fubar and is generating these error messages at startup, but due to a bug in Panda when the code is compiled with full optimizations enabled, these startup error messages are not detected immediately, but are instead detected when the next texture is loaded (and it is then misunderstood to indicate a failure to load the texture).

I can fix that bug, so that in the future this will work correctly for you. However, there really is something wrong with your graphics driver, which you might consider attempting to fix by downloading a new graphics driver from your graphics card manufacturer.

David

I installed an updated driver. The text characters display nicely now.

Thanks again!