Inventory items shows wrong on cards without FBO support

Bug #178475 reported by Alexey Torkhov
2
Affects Status Importance Assigned to Milestone
Ember
Fix Released
High
Erik Ogenvik

Bug Description

With graphics cards without Frame Buffer Object support (such as GeForce MX400) items shows wrongly.
The reason is that if there's no support for FBO (such as PBuffer or Copy) the blitting of the rendered texture onto the icon texture can't occur on the GPU (which FBO allows) but have to be done in code. However, rendering happens asynchronous, so if the copying of the render buffer occurs right after the model has been rendered, the graphics card will probably not have had time to actually perform the queued render ops.
The solution is to design a delayed rendering mechanism, where we first issue the commands to render the model, then wait a couple of frames to guarantee that it will be rendered, and finally blit the rendered texture. This will make the icon rendering a bit more complex, but is required. For cards with FBO support we can however retain the current simple blit op (which also is much faster).

Revision history for this message
Alexey Torkhov (atorkhov) wrote :
Revision history for this message
Erik Ogenvik (erik-ogenvik) wrote :

I've seen this myself and I think the same issue appears even with Cg shaders active. For some reason there's problems with all kinds of icons where a shader is involved. However, there's also a second bug in that there's supposed to be prerendered icons shown for these entities but apparently my script which creates the media package doesn't correctly copy over the icons. I'll fix that in upcoming releases, and will put the current missing icons on wfut so that you'll get them when you start up Ember now.

Changed in ember:
importance: Undecided → High
milestone: none → 0.5.2
status: New → Confirmed
Revision history for this message
Erik Ogenvik (erik-ogenvik) wrote :
Download full text (5.5 KiB)

A related issue is that the inventory (and all other rendered textures, such as the status view in the upper left) gets corrupted when Ogre tries to recreate the textures after switching from full screen mode to the desktop and back again. The log says:
[19:59:12] INFO (Ogre) !!! Direct3D Device Lost!
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
ModelEdit/Image_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
ModelEdit/Image_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
ModelEdit/SubMeshPreviewImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
ModelEdit/SubMeshPreviewImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
MakeEntity/ModelPreviewImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
MakeEntity/ModelPreviewImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
Inventory/DollImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
Inventory/DollImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
Status_avatar/RenderImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
Status_avatar/RenderImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
Server/CreateCharacterPanel/Image_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
Server/CreateCharacterPanel/Image_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
ModelEdit/MeshPreviewImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
ModelEdit/MeshPreviewImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
Status_npc/RenderImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
Status_npc/RenderImage_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture: iconImageStore_0
[19:59:12] INFO (Ogre) Released D3D9 default pool texture: iconImageStore_0
[19:59:12] INFO (Ogre) Releasing D3D9 default pool texture:
IconManager_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Released D3D9 default pool texture:
IconManager_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) D3D9TextureManager released:
[19:59:12] INFO (Ogre) 10 unmanaged textures
[19:59:12] INFO (Ogre) D3D9HardwareBufferManager released:
[19:59:12] INFO (Ogre) 36 unmanaged vertex buffers
[19:59:12] INFO (Ogre) 0 unmanaged index buffers
[19:59:12] INFO (Ogre) Reset device ok w:1024 h:768
[19:59:12] INFO (Ogre) Recreating D3D9 default pool texture:
ModelEdit/Image_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Recreated D3D9 default pool texture:
ModelEdit/Image_SimpleRenderContextRenderTexture
[19:59:12] INFO (Ogre) Recreating D3D9 default pool texture:
ModelEdit/SubMeshPreviewImage_SimpleRenderContextRenderTe...

Read more...

Changed in ember:
assignee: nobody → erik-hjortsberg
description: updated
Changed in ember:
status: Confirmed → Fix Committed
Changed in ember:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.