Skip to main content
GameDev.net gamedev.net
🔒 Locked

Content pipeline

Started by khofez Apr 8, 2015 at 10:37 PM 3 replies 3.8k views
Original Post
khofez
khofez

how I create "content pipeline" in C++ like .xnb files in XNA?

Hodgman
Hodgman

You're comparing a language with a library.

XNA is a library of C# code, which has implemented lots of features, such as these content pipelines.

C# by itself has no concept of a content pipeline, just as C++ doesn't either.

If you want to implement this concept, look at the source code for MonoGame (an open-source XNA replacement) to see how they work, and then write that code again in C++.

PKLoki
PKLoki

It's been a while since I used it but as far as I remember the content pipeline stuff in XNA uses reflection and custom attributes to bind the various content readers, processors and writers together. That's not going to easily translate to straight C++ code, so "write that code again in C++" may actually become "implement the same concepts another way in C++."

Rather than replicating the specific features of a certain library, what is the problem you're trying to solve? What is your input data? What format of output do you need? Bear in mind that most common file formats and data types will have existing import or conversion libraries or tools that you can use.

CC Ricers
CC Ricers

In addition to what Hodgman said, Microsoft provides documentation for the .xnb format and a parser for it which is written in native C++. This parser outputs information about the original file data and format as it's encoded. This will let you load .xnb's in a non-XNA environment. The MonoGame team probably used this to write the pipeline code for their own framework.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.