Is there an equivalent (XNA 3.1 "Effect.CompileFromFIle") for (XNA 4.0)?

I am creating a .NET 3D Library for games and tools that are cross-platform between D3D9, D3D10, OpenGL and XNA, which will work on Windows, XBOX, Phone7, MacOSX and Linux (possibly iPhone and Android).

So my question is ..., I want to be able to compile the Effect file in XNA 4.0, as you could in XNA 3.1 ... Microsoft justifies using this function, it is not legal because it kills XNA for using it creating tools for your games (for example, an effects editor).

If someone knows about this for work and can post some code or point me in the right direction, tnx would be nice.

+3
source share
2 answers

I also posted this question on the App Hub, which was answered. http://forums.create.msdn.com/forums/p/70737/431600.aspx#431600

The answer to this question is to use the command line utility (CompileEffect), which uses the Content pipeline to compile the source .fx file into a binary block, which can be passed directly to the constructor of the XNA Framework Effect class.

Here is a link to answer this question for anyone looking ... http://create.msdn.com/en-US/education/catalog/sample/stock_effects

EDIT ( ): FX. LINK: https://msdn.microsoft.com/en-us/library/windows/desktop/bb232919(v=vs.85).aspx

LINK2: https://msdn.microsoft.com/en-us/library/windows/desktop/bb509710(v=vs.85).aspx

+4

, Xbox Windows. Xbox , XNA 3.1 Effect.CompileFromX , Xbox Windows.

, ( ) , Windows.

, 4- , , ; , , MSBuild.

EDIT: , , ( 23 2011 . 14:50 - 20:00), XNA Content Pipeline, , , , XNA ...

+5

Source: https://habr.com/ru/post/1782335/


All Articles