• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows CreateTexture2D failed

T

TomatoFantasyStudio

Guest
Hello!
I stared to get this error every time when I complile and run the game.

Win32 function failed: HRESULT: 0x8007000e
Call: GR_D3D_Device->CreateTexture2D at line 423 in file \TexturesM.cpp


It happens after I added some additional animations and objects. Not so big ones.
I saw a similar thread here https://forum.yoyogames.com/index.php?threads/error-win32-createtexture2d-failed.41201/ But didn't get answer for myself :)
For info: I have Intel HD Graphics graphic card. It's a bit weak.

Can you help how can I fight with this problem?
 

Ricardo

Member
There are a lot of textures. You want to know about biggest one or all in sum?
With texture page size he's asking about your project settings. Click Options -> Windows (or the target you're using) -> Graphics -> Texture Page size. I think the default value is 2048X2048, so you can have issues when trying to use images bigger than that (although GMS should scale down the sprites that doesn't fit, not crash).
About your Intel GPU, what model exactly do you have? I had myself weird issues with old Intel chips (Specially Intel HD 3000 and 4000) that we solved with a driver update (yes, Intel HD drivers can be updated, even so for some unknown reason Windows Update doesn't use to point it out).
 
T

TomatoFantasyStudio

Guest
With texture page size he's asking about your project settings. Click Options -> Windows (or the target you're using) -> Graphics -> Texture Page size. I think the default value is 2048X2048, so you can have issues when trying to use images bigger than that (although GMS should scale down the sprites that doesn't fit, not crash).
About your Intel GPU, what model exactly do you have? I had myself weird issues with old Intel chips (Specially Intel HD 3000 and 4000) that we solved with a driver update (yes, Intel HD drivers can be updated, even so for some unknown reason Windows Update doesn't use to point it out).
Thanks for answer!
What do you think. If I'll multiplied Texture Page size by two is this critical for performance?
So my texture page size is 2048x2048.
 
Last edited by a moderator:

Ricardo

Member
Thanks for answer!
What do you think. If I'll multiplied Texture Page size by two is this critical for performance?
So my texture page size is 2048x2048.
It depends of the target platform. I'd say that 2048x2048 textures are supported for any modern device and is a good size even for mobile gadgets. So, if you're looking for compatibility, that's definitely an excellent texture page size to stick with.
4096x4096 textures isn't anymore a big deal for most modern GPUs, but it might impact performance in old hardware depending on the number of texture swaps you're using per frame or even doesn't run in very old GPUs.

Other thing to have in mind is VRAM (video memory). Game Maker uses RGBA, meaning that texture pages takes up width * height * 4 bytes of memory. So, a single 2048x2048 texture page will need about 16.77 MB of VRAM, and a 4096x4096 page will take 67.10 MB of VRAM; which is a lot more, specially in mobile if you need to allocate several texture pages at once.

Maybe you could share more info about how your project looks like? So it'll be easier to give you better advice.
 
T

TomatoFantasyStudio

Guest
I have found a strange solution. Problem was in small video RAM. I prefetch all animations in begining of the level. But after I separed loading animations in 2 parts - one just when level is created and other - a few seconds after level loading, error went away.
That's strange... I load exactly the same thing, but separated into two parts and after a couple of seconds.
 
Top