Posted 26 April 2010 - 01:09 AM
I've finished most of the Mathematical classes (Vector2 et al), the Input namespace works (only GamePad has been tested as of now, but Mouse and Keyboard should work as well.)
The highest priority is to get the Graphics System working, but I'm still not sure whether I should use SDLx, or pbKit to implement it.
Want to try it out for yourself?
Download the compiled libraries here.
Also, I suggest downloading the demo app.
It's not very sophisticated, but it contains a rudimentary game loop, and it shows how to use the XFX Input system.
Any suggestions for improvements are welcome, and I will try my best to implement them as soon as possible.
Posted 26 April 2010 - 08:43 AM
Since pbkit is just the shortest direct way of feeding gpu with prepared push buffers (it can be considered the port of the lowest layer under directx named nvidia miniport driver, often seen on pc as something_mini.sys, kind of abstraction layer allowing directx to manipulate standard shaders, registers, push buffers, etc... -but let's not forget the tricky direct8 shaders => native shaders encoding-) the real question is :
- sdl + pbkit
- opengl + pbkit
- directx + pbkit
Because it wouldn't pay much to not use pbkit for graphics acceleration (and it's not so complicated to use). Redoing directx may lead to copyright problems, and maybe sdl is the easiest to do... Anyway you can always limit available api to a minimal subset to avoid too much work at first.
If everything was to be redone, it's all the management of textures that is tricky (I think).
You can start with just the accelerated 2D bitblt, that way you avoid the shader stuff, which I agree is a bit sophisticated (SM 1.1) if you never handled shaders code before.
If it goes all the way, that would allow, even with a limited subset of directx or similar, maybe, some interesting dev community targetting xb1/360/pc/zune free dev (no subscription)
I'm still lacking free time to participate efficiently though... Good luck anyway!
Edited by openxdkman, 26 April 2010 - 09:53 AM.
Posted 16 May 2010 - 08:10 AM
Edited by openxdkman, 16 May 2010 - 08:13 AM.
Posted 17 May 2010 - 06:17 AM
Posted 17 May 2010 - 01:39 PM
After playing a bit with open gl es 2.0 on iPhone and Zune HD, I really believe there might be a way to simulate a few compatible calls on xbox1. If I have time I will try to create these calls above pbkit (the hardest part being some shaders translations. also I can't exclude shader model 1.1 being too weak for such an attempt... so it can fail. but if it works there will be plenty of homebrew sources using open gl es 2.0 that could be ported easily then. at least it should be possible to create xb1 compatible shader doing what does the open gl es 1.1 fixed-function pipeline).
See where I'm going?
On a side note, what library should I get to implement OpenGL? MESA3D seems the most likely candidate, but I want your opinion just to be sure.
Posted 17 May 2010 - 05:19 PM
But since it's anyway a strong coding nightmare ahead, feel free to choose what you know the most and/or what looks the easiest... I've become an old lazzy man, so my opinion counts for peanuts... All you need to know is that xbox1 gpu is nv2A, clone of nv20 compliant with shader model 1.1. A few odd things changed compared to nv20 at shader level, but comments in pbkit source will teach you all you need to know about these little changes.
Edited by openxdkman, 17 May 2010 - 05:25 PM.
Posted 17 May 2010 - 11:14 PM
Now, from what I've seen in code samples, those are being handled by EGL, or a similar library, which also helps managing the game window.
For the XBOX, however, that's not necessary.
So I was wondering what I should do 'cause glBegin and glEnd would be the perfect places to insert pb_begin and pb_end respectively.
Should I go ahead and add glBegin and glEnd, or should I try to mimick the EGL functions that do those calls?
Posted 18 May 2010 - 09:00 AM
Maybe browse through open gl es 2.0 samples and select one that you would like to see run on xb1 and try to minimize the changes needed in the sample source.
Guys at www.opengles-book.com ported their samples to iphone and had to change a lot these initialize and terminate calls because apple already call them in a specific iphone framework you have to use.
So at the end, all devs will finally obtain specific initialize and terminate calls for each platform, I guess...
See what they say on their site. They also give hints in order to code and test on windows or mac (through open gl es emulators for pc or mac).
Edited by openxdkman, 18 May 2010 - 09:01 AM.
Posted 18 May 2010 - 11:59 AM
so I guess I'll take a look at some IPhone and Pandora code samples to see if there are similarities.
The hardest thing to do will be shaders and texture management.
Main problem with the shader functions will be the compilation of GLSL to microcode.
Texture management? I dunno. I come from XNA, so the entire thing is handled for you instead of doing it yourself. This will take some time.
Once GLES works on the XBOX, I'm going to try to build a SpriteBatch class on top of it, and work from there.
Posted 18 May 2010 - 08:02 PM
with fixed-function pipeline in order to comply with open gl es 1.1 and to be able to run on
iphone 2G/3G, ipod 2G
with regular open gl es 2.0 shaders able to run on
iphone 3Gs, ipod 3G, ipad
from the same site they say they created a shader for 2.0 that does the entire fixed-function pipeline
so starting withi this one maybe a good way to be sure all can be done, and postpone a bit the hard work on automatic translation of any shader source in correct opcode...
pbkit does the translation from standard direct8 pseudo opcode (produced by cgc+vsa for example) into nv2a specific native opcode. it's sure the 'fixed-function pipeline' shader can be translated into .cg source for xb1... (well I haven't tried yet, but it's on my lazzy todo list...)
Obviously some hyper-sophisticated 2.0 shaders won't probably be translatable into sm 1.1 shaders... So boundaries and limits will appear afterward.
Edited by openxdkman, 18 May 2010 - 08:05 PM.
Posted 25 May 2010 - 01:29 AM
Most of their code fits right in, and because of that, I already have around one third of the GL ES 2.0 functions coded.
I still need to test them, though, and I still don't know whether I should also create a custom subset of EGL, but I'm getting there.
libGLESv2 is coming to the XBOX.
Posted 14 November 2010 - 11:10 PM
No change to the files at SourceForge yet, but al lot has changed.
Of what little code that I had completed, most has been rewritten.
I now manage the code with Visual Studio 2005 (still compiling with Cygwin, though), which makes everything so much easier.
The directory structure has been completely revamped, together with a lot of other, smaller changes.
The only thing left to do before I can (finally) post the SOURCE code of XFX, is to clean up the directories and remove all unneeded bloat.
After that, I think I'll open up a couple of developer spots on my 1 man team, so XFX can really evolve into something useful.
One of the most important changes is 'type-safe' enums.
Previously, you wrote XFX code like:
//Allow the game to exit
if(gamePadState.Buttons.Back == Pressed)
While it works, there's a downside, since enums violate the scope principle of C++: the namespaces become polluted with constant definitions that easily lead to naming conflicts.
So what I did was wrap all enums in structs like the PlayerIndex enum, for example:
typedef PlayerIndex::type PlayerIndex_t;
Not very elegant, but it works. Now, let's take the above XFX example and modify it to reflect the changes:
//Allow the game to exit
if(gamePadState.Buttons.Back == ButtonState::Pressed)
Not only does it look more like XNA, it also prevents namespace pollution.
Well, that's it for now. I'll update again when I've uploaded the source code and updated precompiled libs to SourceForge.net
Posted 18 November 2010 - 06:43 AM
Posted 03 December 2010 - 12:06 AM
What exactly is this? What can it do, and what might we expect to see from it?
Will it let other games be ported to the XBox?
Thanks for any answers.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users