Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 26,406 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Support for volume textures #357753
02/08/11 16:48
02/08/11 16:48
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
There is a stunning error in your code. It should read
Code:
// Creates a volume texture from the given filename
LPDIRECT3DVOLUMETEXTURE9 shd_voltex_create(STRING *filename)
{
	LPDIRECT3DVOLUMETEXTURE9 temptex;
	HRESULT res = D3DXCreateVolumeTextureFromFile((LPDIRECT3DDEVICE9)pd3ddev, filename, &temptex);
	if(res != S_OK)
	{
		printf("error: %x", res);
		return NULL;
	}
	return temptex;
}


What is _chr anyways?

Re: Support for volume textures [Re: AdrenalinMod] #357755
02/08/11 16:52
02/08/11 16:52
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
_chr converts a Gamestudio String to a char-array

Re: Support for volume textures [Re: AdrenalinMod] #357757
02/08/11 16:59
02/08/11 16:59
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: AdrenalinMod
There is a stunning error in your code.

There is a stunning fail in your post


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Support for volume textures [Re: WretchedSid] #357856
02/08/11 22:00
02/08/11 22:00
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
Why fail? I just wanted to help, sorry that you don't appreciate it.

Re: Support for volume textures [Re: AdrenalinMod] #357859
02/08/11 22:04
02/08/11 22:04
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Because it's wrong, so you mustn't have tested it.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Support for volume textures [Re: AdrenalinMod] #357860
02/08/11 22:06
02/08/11 22:06
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
I have been coding DirectX and WIN API for over ten years now, I rarely make any mistakes. I didn't recognize the chr command and thought it was a typo.

Re: Support for volume textures [Re: AdrenalinMod] #357862
02/08/11 22:07
02/08/11 22:07
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
And you thought that STRING evaluates to char?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Support for volume textures [Re: WretchedSid] #357870
02/08/11 22:14
02/08/11 22:14
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
STRING is no WIN32 data type, maybe you should look that up.

Re: Support for volume textures [Re: AdrenalinMod] #357873
02/08/11 22:18
02/08/11 22:18
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
You should've looked it up, you'd knew that it isn't a type definition of char. But as the function gets the name passed at STRING and the function excepts a char, there has to be some kind of conversion.
If you had looked that up, you had made one fail less.

Oh and btw, char is neither a Win32 data type, so what?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Support for volume textures [Re: AdrenalinMod] #357875
02/08/11 22:19
02/08/11 22:19
Joined: Feb 2011
Posts: 44
UK, Aylesbury
A
AdrenalinMod Offline OP
Newbie
AdrenalinMod  Offline OP
Newbie
A

Joined: Feb 2011
Posts: 44
UK, Aylesbury
normally strings are char type only. I was confused.

Page 1 of 3 1 2 3

Gamestudio download | 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