Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (dr_panther, Quad, AndrewAMD, 7th_zorro), 945 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Can't create DirectX texture: ... #330441
06/27/10 17:39
06/27/10 17:39
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Hiya Guys,

I've got another problem. I am getting the Engine Error:
"Can't create DirectX texture: schwert_off".

The manual says: "The texture format is invalid or unsupported
by DirectX or by your video card."
BUT if I change the texture to any other working, I get the
same error(it is a part of my inventory system, so if I copy
another bmap and rename it, the error also appears).

The problem is: it appears random, but always on the same object.

The bmap is defined as the following:
Code:
BMAP* schwert_off = "schwert_off.png";
BMAP* schwert_on = "schwert_on.png";



All the panels in the following piece are already shown on the
screen, but with a different/no bmap. It just changes the bmaps.
Code:
for(i = 0; i < 8; i++)
	{
		proc_mode = PROC_EARLY;
		switch(inventar[i])
		{
			case none: invent_pan[i].bmap = NULL;
			break;
			case lighter: invent_pan[i].bmap = lighter_off;
			break;
			case oil: invent_pan[i].bmap = oil_off;
			break;
			case battery: invent_pan[i].bmap = batt_off;
			break;
			case spitzhacke: invent_pan[i].bmap = spitz_off;
			break;
			case splitter: invent_pan[i].bmap = splitter_off;
			break;
			case noten: invent_pan[i].bmap = noten_off;
			break;
			case schwert: invent_pan[i].bmap = schwert_off;
			break;
			case fischglas: invent_pan[i].bmap = fisch_off;
			break;
			case nagel: invent_pan[i].bmap = nagel_off;
			break;
			case codebook: invent_pan[i].bmap = code_off;
			break;
			case lupe: invent_pan[i].bmap = lupe_off;
			break;
			case news: invent_pan[i].bmap = news_off;
			break;
			case fischglas_full: invent_pan[i].bmap = fisch_full_off;
			break;
			case clock: invent_pan[i].bmap = clock_off;
			break;
			case runenstein: invent_pan[i].bmap = runen_off;
			break;
		}
		invent_pan[i].skill_x = inventar[i];
	}



The picking up of the object is handled as at all other
objects.(of course the number is different for all)

Oh, and if you ask: none, lighter,...,runenstein are all
defined numbers.


This is really annoying, because I can't play any further
after this point...

If you have an idea how to solve this, or if you know what the
problem could be, please be so kind and response laugh


Thanks in advance and best regards,
Rei

Re: Can't create DirectX texture: ... [Re: Rei_Ayanami] #330466
06/27/10 19:11
06/27/10 19:11
Joined: Dec 2005
Posts: 116
T
tD_Datura_v Offline
Member
tD_Datura_v  Offline
Member
T

Joined: Dec 2005
Posts: 116
Perhaps the error has something to do with the PNG format or the lack of support thereof.

Here is a manual quote which seems to suggest that the PNG format should not be used:
Quote:
PNG images behave like TGA images, but are not recommended because they are loaded not by the engine, but by the DirectX library, and are not guaranteed to be automatically restored when the video device gets lost. This means that they can lose their content f.i. when a fullscreen application is minimized.

That quote is from an out-dated manual.


...
Code:
case none: invent_pan[i].bmap = NULL;


...




Re: Can't create DirectX texture: ... [Re: tD_Datura_v] #330485
06/27/10 20:54
06/27/10 20:54
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
sPlKe Offline
Expert
sPlKe  Offline
Expert

Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
doubtfull, the error ONLY happens with one certain panel object. funny enough, its the same as all the others just with a different name.
furthermore, form panels and other things, i use PNG only in all my projects and i havent experienced this error in any of them.

edit: the error also doe not happen all the time or in windowed mode.

Last edited by sPlKe; 06/27/10 20:55.
Re: Can't create DirectX texture: ... [Re: sPlKe] #330502
06/27/10 21:38
06/27/10 21:38
Joined: Dec 2005
Posts: 116
T
tD_Datura_v Offline
Member
tD_Datura_v  Offline
Member
T

Joined: Dec 2005
Posts: 116
The object's lite-c variable name and file name are very similar then?
So the error only occurs with an object of a certain name or naming scheme?






Re: Can't create DirectX texture: ... [Re: tD_Datura_v] #330503
06/27/10 21:40
06/27/10 21:40
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
well, at least it didn't happened to me with other pics, but as i said, it does appear random...

Re: Can't create DirectX texture: ... [Re: Rei_Ayanami] #330640
06/28/10 21:22
06/28/10 21:22
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
bump

anyone an idea?

Re: Can't create DirectX texture: ... [Re: Rei_Ayanami] #331058
07/01/10 18:46
07/01/10 18:46
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Okay, i have found a workaround -> I load the pictures that fail (schwert_on / off) at the start. Till now we got no error so far...

But this is just an unnice workaround...

Sorry for triple-posting...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1