Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
#define's with MATERIAL*->effect ... doesn't work! #342292
09/26/10 11:19
09/26/10 11:19
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I am wondering why this doesn't work... I defined a string and use this define in a MATERIAL* definition. When I run the engine, I always get

Quote:
Malfunction W1550: Can't compile effect:
objMtlDeferredSwitch
D:\Projects\2010\Shaders\SSAO\main\demos\animatedSprite\memory(1,1): error X3000: unrecognized identifier 'OBJMTLDEFERREDSOLID_SHADER'.


Here is the code:

Code:
#define OBJMTLDEFERREDSOLID_SHADER "objDefSolid.fx"

MATERIAL* objMtlDeferredSwitch = {
   effect = OBJMTLDEFERREDSOLID_SHADER; // Doesn't work
   flags = ENABLE_RENDER;
   event = objMtlDeferredSwitch_ev;
}



Best regards,
-Christian

P.S: if I use a static char* or STRING*-string instead, it doesn't work either... frown

Re: #define's with MATERIAL*->effect ... doesn't work! [Re: HeelX] #342361
09/26/10 19:10
09/26/10 19:10
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
Probably this is the reason:
"#defines are valid within all subsequent code, but ignored within engine objects definitions, such as PANEL*, MATERIAL* etc."
http://www.conitec.net/beta/define.htm

Perhaps there's some kind of pre-pre-compiler for engine objects?

Re: #define's with MATERIAL*->effect ... doesn't work! [Re: Saturnus] #342365
09/26/10 19:48
09/26/10 19:48
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Brah! My disregard for the manual was way too obvious this time smile

Thanks, pal!
Sorry, others!!


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