Texture here, oh it's gone, Ahh it's back again.
Blitz3D Forums/Blitz3D Programming/Texture here, oh it's gone, Ahh it's back again.
| ||
Hi guys, I have this problem were I run my game and a texture sometimes isn't drawn. Then I re run and it's back. It seems to be random if it appears or not. I don't seem to be out of memory or anything. Tried availvidmem but stays the same. So anyone else had this problem, any ideas what may be causing this? It's basically a cube with a texture. No other textures are affected. Cheers. |
| ||
Hi, If you are using writepixel, you might want to check if you aren't writing pixels outside the texture or imagebuffer. Remember that an image goes from 0..ImageWidth()-1. If you write outside the edge of the image all sorts of weird stuff can happen, I've had meshes deforming because of that :) Took quite a while to figure out... Hope this helps, Fredborg |
| ||
Fredborg, no not doing a writepixel. My frame drawing is very conventional. Draw everything 3D to backbuffer, Updateworld, Renderworld, 2D stuff, flip. Textures are stored in vidmemory right? Or normal RAM? Damn I should know this stuff. Could I be overloading something as it's only started to happen recently. Is there some kind of texture limit? |
| ||
No, there is no other texture limit than what your gfx card can handle, and if there is still videomemory then that can't be it (I think :). Are you loading the texture manually? If so then search your code, to see if you accidentally have the same variable name somewhere else...Otherwise, I think some code showing is in it's place ;) [Edit]You can check in the debugger, what the texture handle is by the way...That might give you a clue...Or write a function that checks if the texture handle has changed and then put it in your main loop, so that it's called every frame...[/Edit] PS: ZPlane looks nice...But the company link on your site seems to be empty. Fredborg |
| ||
I had this happen occasionally, but it hasn't happened for ages... I could swear I was doing everything right, but no texture... then I reboot and run the same code again, everything's fine. I never sussed out why, but as I say it was a rare occurance, and it hasn't happened for ages. Are you using the latest Blitz BTW? |
| ||
Is there any possibility that vidram could be getting fragmented? (I don't know how that stuff works...) If it works only after a reboot/reset : Are you perhaps running some software that could be destabilising DirectX or Windows itself? |
| ||
Using 1.83 Anthony. This does sound like a gfx card driver problem and not a B3D problem. I had another problem with the latest nvdia drivers causing slowdown, so I downgraded the drivers. BTW, I don't need to reboot to get the problem. Just restart the game from within B3D. It is quite a large texture. Anyway thanks all and I'll have a play with my nvidia drivers cause I'm sure I havn't broken anything. |
| ||
why dont you try to split the texture up into peices and then adjust the texture coords aproprietly, see if that helps, what gfx card are you using |
| ||
Well, it turned out to be the nvidia drivers. I'm using a geforce 3. To be honest this is really bad news. The latest 43.45 cause my game to slow down. 40.71 cause this texture problem. The lastest Natrox drivers don't even work with my game at all. So I'm back to 30.82 now. Think I'm gonna have to get Blitz+ and try and write a nice gfx config app. Quite a few games seem to have this sort of think. Once again, thanks for all the comments. |
| ||
So the latest Nvidia drivers don't only break 2D? Nasty, nasty piece of work... |