[fixed]OpenGL- loading 3d model problem
[fixed]OpenGL- loading 3d model problem
Note : The following bug occurs only in OpenGL Mode. DirectX9 mode works fine.
I have noticed that my program freezes on loading a 3d model. I have checked two formats: 3ds and b3d and in both cases the program simply freezes after it says 'Loaded mesh: 3ds.3ds' (Note: it freezes/hangs. it does not crash.)
I tried to trace the problem and it seems that it has started occurring only in Rev 1329 and later.
To reproduce this bug, you can simply open the MeshViewer (Tutorial 9), and try to load a 3d model in OpenGL Mode. And you will notice that the program will hang/freeze.
I have noticed that my program freezes on loading a 3d model. I have checked two formats: 3ds and b3d and in both cases the program simply freezes after it says 'Loaded mesh: 3ds.3ds' (Note: it freezes/hangs. it does not crash.)
I tried to trace the problem and it seems that it has started occurring only in Rev 1329 and later.
To reproduce this bug, you can simply open the MeshViewer (Tutorial 9), and try to load a 3d model in OpenGL Mode. And you will notice that the program will hang/freeze.
actually this may be a bug with your display driver (make sure the program is hanging when it's loading the model, not displaying the scene). My laptop hangs for about 25 seconds every time drawing is called (when it's being run in OpenGL...works fine in DirectX >.>); for me, this appears to be a video card driver bug, and updating the driver did not solve it, so at the moment I'm developing using DirectX instead of OpenGL
So, ya...that might be relevant :\
-wyrmmage
So, ya...that might be relevant :\
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
If it is a bug with my display driver, then I am wondering why it is working perfectly with revisions 1328 and earlier revisions. It loads perfectly with the earlier versions. Why only after Rev1329 this problem is occurring? And it is freezing for indefinite time. I tried waiting for over 20 minutes but still the mesh viewer (and my program as well) is frozen.
I tried on three different systems, but this problem is there on all of them. But yes, all of them are using ATI Radeon cards. But I couldn't possibly think it is a bug with the graphics card, because of the fact that the mesh viewer (and my program as well) works properly (i.e. in OpenGL mode) when compiled with rev 1328 and earlier.
I tried on three different systems, but this problem is there on all of them. But yes, all of them are using ATI Radeon cards. But I couldn't possibly think it is a bug with the graphics card, because of the fact that the mesh viewer (and my program as well) works properly (i.e. in OpenGL mode) when compiled with rev 1328 and earlier.
if you have a non pow 2 texture, in most recent OpenGL build (no idea at all when it started) and a pretty old video card or old drivers, the app can take incredibly long time to process the texture. I have no idea what is your setting, but when doing a draw2dimage, with aforementioned conditions, it would take my old system from 30 to 60+ ms per image drawn, stalling at the rectangle creation. Thus, if your model is getting created, it might be that each and every triangle strip takes that huge amounts of time. Try drawing your model's texture with draw2dimage if you think that might be the case. If it lags like... you'll know what to follow. If not, well, gl
The graphics card that had the problem for me was an ATI Radeon Express 1100 (it's a laptop card), so the problems very well may be related.
Dorth, I just realized that some of my textures are non-power of two textures, so I'm definitely going to resize them and see if that fixes the problem...thanks for the heads up!
*UPDATE* just tested it out after resizing all my textures to a power of two, and...it works! Dorth, you rock! ^_^
-wyrmmage
Dorth, I just realized that some of my textures are non-power of two textures, so I'm definitely going to resize them and see if that fixes the problem...thanks for the heads up!
*UPDATE* just tested it out after resizing all my textures to a power of two, and...it works! Dorth, you rock! ^_^
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
OpenGL doesn't tell when it falls back to SW rendering. So it's impossible to test for such things. However, I've checked NVidia's driver lists and they tell that none of their drivers does fall back to SW rendering for NPOT. either it's supported (and then in HW) or not at all. Don't know for sure for ATI, but it should be similar. The NPOT rendering should be only slightly slower, if at all.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Well, the only change which could be related to this problem is that I added another check for the OpenGL version. In case this is 2.0 or higher, the NPOT support is enabled, i.e. textures are not resized anymore, but kept in their native sizes. In case ATI really has a problem here it could be that some weird things are going on. Could you please post the console log of your app upon startup?