Softpixelwrapper -explodes and dies? help!

Blitz3D Forums/Blitz3D Userlibs/Softpixelwrapper -explodes and dies? help!

Imperium(Posted 2013) [#1]
I've been trying out the Softpixelwrapper as a solution to bring OpenGL/DX9 support to my FPS project. But my success has been limited because of the following errors:



When I run my main FPS project it results in a Memory Access error that only happens when trying to run it with Softpixel. It also for some reason detects in issue within the code? I created a basic example below help troubleshoot the issue. The good news is that it works but it still has its share of problems. It runs slower than expected and reports an error when I run&compile with IDeal. See the image above the red line for reference. On my machine it takes 4 presses of the Exit key to quit the program before it generates 5 errors messages.




SabataRH(Posted 2013) [#2]
If I'm not mistaken that Softpixel wrapper for b3d is many years old. I too tried using it awhile back and achieved these same errors. The latest Softpixel release seems to have abandoned b3d.. :(


Imperium(Posted 2013) [#3]
Well it works, kinda... I've combed over everything and don't see what could be causing these issues. According to the authors site it is
version 2.2 beta Updated from30/08/2011.

I really hoped that this would help get my project running with OpenGL or DX9. The goal was to maximize its performance and better support newer operating systems like 7 and 8. My FPS project loads all the meshes from a file called "Objects.bb" I wonder if this the cause of the mesh error? It bugs out right when it tries to load a mesh.


Kryzon(Posted 2013) [#4]
Memory Access Violation.
When you run in Debug mode it's usually more verbose than that. Have you tried doing so?


jfk EO-11110(Posted 2013) [#5]
all I can say is: try isolating the error, locate the couple of lines where it actually happens. Even of I'd take the time to read trough your entire code, I would't see the bug.


Imperium(Posted 2013) [#6]
I don't have any errors in my code. When it borks the debugger tells me there is a error in softpixelwrapper.bb? I was able to get it working by removing everything but a single plane, cube, single mesh, and leaving the tweening code as shown above. But the performance is much lower than expected and the error messages after closing the project have made me abandon this as on option for switching the Blitz3d renderer. Too bad the author abandoned support for Blitz3d.

I would seem that Xors3d is really the only option. I don't care about adding in any shaders or other fancy effects, my only goal here is to provide better compatibility and performance with newer hardware.


Kryzon(Posted 2013) [#7]
I downloaded the wrapper from the SoftPixel website, put the userlibs in place and ran the demos from the blitz IDE.
All apart from the shaderLib demo worked - the instancing demo was impressive, showing 625 animated meshes on screen.

I don't like that the wrapper tries to 'replace' the native Blitz3D functions by using the exact same identifiers (TurnEntity, RenderWorld, EntityFX etc.). It should've taken the Xors3D route and added prefixes.
A possible cause for the error in your code is that you're using some native Blitz3D function that wasn't wrapped, so you're trying to use Blitz3D handles with SoftPixel handles and that won't work.

Suggestions:
1) Go through your wrapper .bb file and add a "spe" prefix to all the wrapper functions, so there's no chance of mixing up the native with the external.
2) Rewrite whatever code you want to run with SPE from scratch, so you're always doing things the SPE accepts.
3) Don't use OpenGL. If you're in Windows, regardless of the version, use Direct3D always.


GaryV(Posted 2013) [#8]
I would seem that Xors3d is really the only option.


It is not really an option. It is a dead product that is not supported and no longer updated. The author abandoned the product. Because it is based on DirectX 9, by the time you finish a project, it may have issues under the then-current version of Windows, much like DX7 has under Windows 8 now. DirectX 9 is VERY old. OpenGL not only outperforms DirectX on Windows, but is more compatible and more future-proof on Windows. You would be better off sticking with Softpixel than using Xors3D.

Another alternative is BlitzMax and MiniB3D. MiniB3D is a good little engine.

If you must have DirectX, consider looking at NuclearBASIC. It supports DirectX 11 and falls back to DirectX 9. It is more future-proof than something like Xors3D which is DirectX 9 only.


RemiD(Posted 2013) [#9]
GaryV>>I don't know what's your problem with Xors3d, but if it is functional, (it seems), an compatible with Windows XP, Windows Vista, Windows 7, Windows 8, it means that Xors3d can still be used during a long time without problems.


xlsior(Posted 2013) [#10]
DirectX 9 is VERY old


It's also the highest version available for windows XP, which currently still has a 37% market share. With that in mind the majoriy of programmers still target DX9 today, which means that MS has MUCH more incentive not to break DX9 backwards compatibility than they had towards DX7.

http://appleinsider.com/articles/13/07/01/windows-8-install-base-surpasses-vista-still-trails-all-mac-os-x-installs

That said: using xors3d at this point probably isn't a good option regardless, for the reasons mentioned above.


Naughty Alien(Posted 2013) [#11]
..what went wrong with Xors actually ?? I was under impression that developers are quite commited to development and rather responsive to community ??


GaryV(Posted 2013) [#12]
I don't know what's your problem with Xors3d

I stated it.


It's also the highest version available for windows XP, which currently still has a 37% market share.

Which will be completely unsupported by Microsoft in a matter of months.


With that in mind the majoriy of programmers still target DX9 today, which means that MS has MUCH more incentive not to break DX9 backwards compatibility than they had towards DX7.

I agree with this, but it applies to today. It does not apply to 1-2 years from now which is the time-frame an average larger project started today would be finished. Microsoft has shown that backwards compatibility is no longer a priority for them.



After the debacle of Windows 8 and the perception of it in the market, Windows 9 may appear sooner than expected. Much like Windows 7 came out so soon after Vista. Some older DrectX 9 engines I have used are using portions of DirectDraw 7 for displaying text other 2D elements and DirectDraw 7 no longer works properly on Windows 8. There are DirectX 9 engines that will already not function properly on Windows 8.

Microsoft broke backwards compatibility in Direct X with the release of DirectX 10 for a reason. DirectX 9 is 12 years old. Support will be dropped, sooner rather than later.

As to OpenGL. I would be more worried about 32-bit being unsupported than OpenGL not working on a new version of Windows.


Imperium(Posted 2013) [#13]
Considering how many games have been made with DX9 this would not be a wise move for Microsoft to break compatibility. Have we all forgotten the past so quickly? Bill Gates started promoting Windows (95) back in the day as a gaming operating system for good reason. If you are really into playing games you likely run a Windows OS.

Unless they are completely abandoning what has helped sell the OS they're only hurting themselves by not supporting developers. Backwards compatibility is important and should not be killed off because they want to keep selling you new hardware and other useless crap. Not everyone can afford or wants to use AAA development tools or the latest and greatest game engine. If you keep updating the technology behind a project you will NEVER finish anything.

32bit support isn't going anywhere because most applications are still built for 32bit environments. Remember XP PRO 64bit? It would cause a quicker collapse of Microsoft than what even Vista did.

Xors looks like a viable option. I won't give up on Softpixel just yet but it will be awhile before I have an extra $100 to spend.