SpriteDX9 Lib - New release - v0.58

Developed or developing a new product in PureBasic? Tell the world about it.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

Version 0.579 released! [27-September-2005 @ 22:10]
- LoadTexture() has been fixed and seems to work now!

LoadTextureDX9() works now, however Deeem2031 always still not reached the state he wanted to have for version 0.58! So here is 0.579 Smile! For changes since 0.57 just simple read the last posting. Only difference are the fixed LoadTextureDX9(), updated helpfile and resident file!

feedback is welcome :)

Edit:
Here are the latest reworked example files: www.superfilm.tv/SpriteDX9_Examples0579.zip
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Hi, va!n

Any new about vsync CPU wasted time matter?
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@Psychophanta:
With enabled VSync the examples require here about 4% CPU usage - without VSync the CPU will eat 100% ...
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Oh! here still gets 100% for both cases at full screen :(
Moreover, with Vsync enabled it runs too slow

Taking a look to the help file of this lib it seems very nice, but still i can't see the real DX9 2D and 3D graphics power.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

I have to activate alpha in startdrawing to enable hardware acceleration... Not a bug, I think?!

Code: Select all

StartDX9(#D3DXSPRITE_ALPHABLEND)
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

Psychophanta wrote:Oh! here still gets 100% for both cases at full screen :(
Moreover, with Vsync enabled it runs too slow

Taking a look to the help file of this lib it seems very nice, but still i can't see the real DX9 2D and 3D graphics power.

@Psychophanta:
I have tested it with FullScreenMode and you are right! CPU ussage is still 100% ! But not so in WindowedMode when VSync is enabled. We noticed the problem of slowing down when using enabled VSync.
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Psychophanta wrote:Oh! here still gets 100% for both cases at full screen :(
Hm, here it works fine. Maybe you should know that "Alt-Tab" still is not supported, so whether you use that the CPU-usage increases to 100%
Psychophanta wrote:Moreover, with Vsync enabled it runs too slow
Yea... don't you think its normal :?:
Psychophanta wrote:Taking a look to the help file of this lib it seems very nice, but still i can't see the real DX9 2D and 3D graphics power.
It isn't so easy as it looks like ;)
djes wrote:I have to activate alpha in startdrawing to enable hardware acceleration... Not a bug, I think?!
I don't understand what you mean.. it runs faster if you use "StartDX9(#D3DXSPRITE_ALPHABLEND)" ?
irc://irc.freenode.org/#purebasic
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Deeem2031 wrote:
Psychophanta wrote:Moreover, with Vsync enabled it runs too slow
Yea... don't you think its normal :?:
It depends.
'VSync Disable' can mean one of 2 things (as long as i know):
- The program renders to display ignoring VSYNC event (no syncroniztion, just process and render without any kind of wait or sleep).
- The program syncronize its rendering to a stablished time chunk, ignoring when real VSYNC event is happening (so tearing effect will appear).

So if you have implemented the first case, there is logical that the examples run slower when 'VSync Enabled' feature.But if you have implemented the second case, then it is not logical.
So, what do you refer with 'VSync Disable' ?
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

Deeem2031 wrote:
djes wrote:I have to activate alpha in startdrawing to enable hardware acceleration... Not a bug, I think?!
I don't understand what you mean.. it runs faster if you use "StartDX9(#D3DXSPRITE_ALPHABLEND)" ?
Yes, i'm drawing lines with an alpha effect, and it runs slower (and without alpha) if I do not activate alpha in startdrawing. But it is NOT a problem ;)

About static dll, I was wondering if I could include the functions of the directx9 dll into my program. Fortunately, I found this site http://www.toymaker.info/Games/html/directx_9_0c.html and I discovered that Microsoft had changed his mind and that this dll is now included by default in directx runtimes, as dynamic! So, all these people asking for this are wrong!

However, maybe we could, with all this work done by traumatic and others on the linker, but I don't think it's usefull by now. I do prefer functions to integrate transformations and maybe... easy ps2 shading on textures!

Thank you for all this good work!
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

lightwave (lwo) loader

Post by djes »

I have decided to give some code samples (some I have collected and some I've done myself) on the french forum. Included is a lightwave loader (lwo objects files).

Note that the code is not optimised at all, and that I have omitted some "thank you" because it wasn't destined to be spread.

http://purebasic.hmt-forum.com/viewtopi ... 6783#36783

Have fun!
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Holy cow, I thought I replied to this already .. ouch! Sorry about that!

Anyways, to answer your question in response to my light question ... Well, for lights, I mean, being able to change a corner of a texture's color to a certain color. That way, if A and B was red, and C and D was black, then the texture would still show the texture but have the red to black gradiant over/on the texture. This helps emulates lights.

Albit, not perfect, but it looks ok :)

The other thing is that directX 9.0c (or d?) has it's own internal GUI library. This allows you to make textured edit boxes, buttons and other controls directly from DirectX's internal library, itself.

Any chance of this being added to this library? If so ... YES!!!!
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

SpriteDX9 v0.58 has been released!
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Post Reply