Pres3D source
Pres3D source
Hi,
I opened a new thread, because this is basically another thing.
I release the source of Pres3D (presenting using PureBasic http://www.purebasic.fr/english/viewtop ... 14&t=43856) in this post. I choosed the LGPL licence, so you all are free to manipulate and use the code.
Please download here: http://www.x-beliebig.info/Download/Pre ... source.zip
It is commented and all files are included. It is programmed using PureBasic 4.50 (Windows).
The reason: I'm not having enough time to develop an editor and continue development of the core presentation code. As I think that this will never earn some significant amount of money in the future, it will be better held as an open source project. It would be nice, if someone will keep a hand on it. For me, it has been an experiment and the wish to confirm an idea. So, it is confirmed (successfully) and now the project is finished for me. Thank you all for the kind comments.
Kukulkan
I opened a new thread, because this is basically another thing.
I release the source of Pres3D (presenting using PureBasic http://www.purebasic.fr/english/viewtop ... 14&t=43856) in this post. I choosed the LGPL licence, so you all are free to manipulate and use the code.
Please download here: http://www.x-beliebig.info/Download/Pre ... source.zip
It is commented and all files are included. It is programmed using PureBasic 4.50 (Windows).
The reason: I'm not having enough time to develop an editor and continue development of the core presentation code. As I think that this will never earn some significant amount of money in the future, it will be better held as an open source project. It would be nice, if someone will keep a hand on it. For me, it has been an experiment and the wish to confirm an idea. So, it is confirmed (successfully) and now the project is finished for me. Thank you all for the kind comments.
Kukulkan
Last edited by Kukulkan on Mon Oct 11, 2010 7:43 am, edited 1 time in total.
- flaith
- Enthusiast
- Posts: 704
- Joined: Mon Apr 25, 2005 9:28 pm
- Location: $300:20 58 FC 60 - Rennes
- Contact:
Re: Pres3D source
Thanks for giving us the source of your code, much appreciated
“Fear is a reaction. Courage is a decision.” - WC
Re: Pres3D source
Thank you, Pres3D is amazing. I hope this project doesn't die a lonely death!
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Pres3D source
Hi Kukulkan,
how great is that ~ ~ thank you with joy
Well I managed to add a small feature which enables one to choose a different *.xml presentation from the application folder if the default 'slide.xml' is unavailable. I missed this most of all for to quickly test different presentations - meaning different effect settings. (next shall be drag&drop)
Might not be the smartest solutions but it works fine and I'd like to share it with you.
Besides I rounded my html-version of the docu which I also like to share in case someone prefers html over pdf too.
cheers ~ Vera
how great is that ~ ~ thank you with joy
Well I managed to add a small feature which enables one to choose a different *.xml presentation from the application folder if the default 'slide.xml' is unavailable. I missed this most of all for to quickly test different presentations - meaning different effect settings. (next shall be drag&drop)
Might not be the smartest solutions but it works fine and I'd like to share it with you.
Besides I rounded my html-version of the docu which I also like to share in case someone prefers html over pdf too.
cheers ~ Vera
Code: Select all
Procedure.b OpenSlideXML(XMLFile.s)
If LoadXML(#XML, XMLFile.s) = 0
XMLFile = OpenFileRequester("Choose a Presentation", GetPathPart(ProgramFilename()) + "slide.xml", "XML (*.xml)|*.xml", 0 )
If LoadXML(#XML, XMLFile.s) = 0
ProcedureReturn #False
EndIf
EndIf
Repeat
If XMLStatus(#XML) <> #PB_XML_Success
res = MessageRequester("Info", "Sorry, this was no suitable slide-file. Like to open another one ?", #PB_MessageRequester_YesNo| $50)
If res = #PB_MessageRequester_Yes
XMLFile = OpenFileRequester("Again", GetPathPart(ProgramFilename()), "XML (*.xml)|*.xml", 0 )
If LoadXML(#XML, XMLFile.s) = 0
ProcedureReturn #False
EndIf
Else
MessageRequester("Oh Well", "so maybe some other time ", $50)
ProcedureReturn #False
EndIf
EndIf
Until XMLStatus(#XML) = #PB_XML_Success
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
Re: Pres3D source
Hi,
I just tested Pres3D
I think it is a nice startpoint.
It should be a normal application with a menu where you can load the presentations and so on.
So it needs a way to switch between 'normal' window and fullscreen.
Here is my first patch for Pres3DInsert it directly afterNow you can switch to fullscreen and back by pressing the return key.
Edit:
Oh I forgot, you also have to change a 0 to a 1:to
The 'fullscreen mode' through the xml file is now obsolete
Have Fun,
Bernd
I just tested Pres3D
I think it is a nice startpoint.
It should be a normal application with a menu where you can load the presentations and so on.
So it needs a way to switch between 'normal' window and fullscreen.
Here is my first patch for Pres3D
Code: Select all
If KeyboardPushed(#PB_Key_Return)
Status.l = GetWindowLong_(WindowID(0), -16)
If XML_Settings\ScreenFull
NewWidth = XML_Settings\ScreenWidth
NewHeight = XML_Settings\ScreenHeight
Status | #WS_CAPTION
XML_Settings\ScreenFull = #False
Else
ExamineDesktops()
NewWidth = DesktopWidth(0)
NewHeight = DesktopHeight(0)
Status & ~#WS_CAPTION
XML_Settings\ScreenFull = #True
EndIf
SetWindowLongPtr_(WindowID(0), -16, Status)
; resize has to be behnd SetWindowLong_() because than the values are set
ResizeWindow(0, 0, 0, NewWidth, NewHeight)
While KeyboardPushed(#PB_Key_Return)
ExamineKeyboard()
Wend
EndIf
Code: Select all
ClearScreen(XML_Settings\BackgroundColor)
ExamineKeyboard()
ExamineMouse()
ExamineKeyboard()
Edit:
Oh I forgot, you also have to change a 0 to a 1:
Code: Select all
ScreenRet.l = OpenWindowedScreen(WindowID(0), 0, 0, XML_Settings\ScreenWidth, XML_Settings\ScreenHeight, 0, 0, 0)
Code: Select all
ScreenRet.l = OpenWindowedScreen(WindowID(0), 0, 0, XML_Settings\ScreenWidth, XML_Settings\ScreenHeight, 1, 0, 0)
The 'fullscreen mode' through the xml file is now obsolete
Have Fun,
Bernd
Re: Pres3D source
Hi,
I modified now so much, that I have to provide a download:
http://www.infratec-ag.de/PureBASIC/Pres3D_V1.01.zip
What I have changed:
1. I included Veras extension
2. I implemnted the switching between fullscreen and window
3. I added a Version to the window title
4. Now you can use a filename as parameter.
So you can create a desktop link to start your presentation.
5. I added a menu
So later it is possible to load and maybe save a presentation.
What I will do next:
Add a 'Load' function to the file menu
Add a status bar where you can see at wich page we are.
Best regards,
Bernd
I modified now so much, that I have to provide a download:
http://www.infratec-ag.de/PureBASIC/Pres3D_V1.01.zip
What I have changed:
1. I included Veras extension
2. I implemnted the switching between fullscreen and window
3. I added a Version to the window title
4. Now you can use a filename as parameter.
So you can create a desktop link to start your presentation.
5. I added a menu
So later it is possible to load and maybe save a presentation.
What I will do next:
Add a 'Load' function to the file menu
Add a status bar where you can see at wich page we are.
Best regards,
Bernd
Re: Pres3D source
Nice work. Thank you!
But you do not really switch to fullscreen, do you? A real fullscreen mode is more performant that only using a windowed-mode in fullscreen-size.
By the way: using SetWindowLongPtr_() will reduce compatibility to windows!
Kukulkan
But you do not really switch to fullscreen, do you? A real fullscreen mode is more performant that only using a windowed-mode in fullscreen-size.
By the way: using SetWindowLongPtr_() will reduce compatibility to windows!
Kukulkan
Re: Pres3D source
Hi Kukulkan,
you are right with 'windows'. But in your code is And so I thought it is already for windows only.
If you tell me that I can remove this, or for what it is good for. I search for a way to be
cross platform compatible.
And from the documentation in PureBASIC an OpenWindowScreen() has the same performance like OpenScreen().
But I have normally nothing todo with graphic, so maybe I'm wrong.
I have just implemented the 'Open' functionality. I hope I have done it right.
But I still have to avoid all the stuff, when no xml is loaded at start.
At the moment this is not possible of course of Vera's code.
But I think it should be possible to start the application without loaded xml.
Hm, at the moment I can not upload something to our web site.
So you have to wait for V1.02
Bernd
you are right with 'windows'. But in your code is
Code: Select all
; allow Sprite3D view from behind (windows-only!!!!!!)
Define pd3d.IDirect3DDevice9
!extrn _PB_Screen_Direct3DDevice
!MOV dword EAX, [_PB_Screen_Direct3DDevice]
!MOV dword [v_pd3d],EAX
pd3d\SetRenderState(22,1)
If you tell me that I can remove this, or for what it is good for. I search for a way to be
cross platform compatible.
And from the documentation in PureBASIC an OpenWindowScreen() has the same performance like OpenScreen().
But I have normally nothing todo with graphic, so maybe I'm wrong.
I have just implemented the 'Open' functionality. I hope I have done it right.
But I still have to avoid all the stuff, when no xml is loaded at start.
At the moment this is not possible of course of Vera's code.
But I think it should be possible to start the application without loaded xml.
Hm, at the moment I can not upload something to our web site.
So you have to wait for V1.02
Bernd
Re: Pres3D source
Hi,
Yes, this part is the only windows-related code in the complete source. PureBasic uses a DirectX mode that shows the texture of an object (Sprite3D) only on one side. To show it on both sides, this code-snippet sets the needed switch in DirectX (as PB does not offer such a way). My hope is, that this trick is not needed at all on linux or MacOS.
Maybe someone will test this and inserts some plattform dependent variation of this part:
Kukulkan
Yes, this part is the only windows-related code in the complete source. PureBasic uses a DirectX mode that shows the texture of an object (Sprite3D) only on one side. To show it on both sides, this code-snippet sets the needed switch in DirectX (as PB does not offer such a way). My hope is, that this trick is not needed at all on linux or MacOS.
Maybe someone will test this and inserts some plattform dependent variation of this part:
Code: Select all
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
; allow Sprite3D view from behind (windows-only!!!!!!)
Define pd3d.IDirect3DDevice9
!extrn _PB_Screen_Direct3DDevice
!MOV dword EAX, [_PB_Screen_Direct3DDevice]
!MOV dword [v_pd3d],EAX
pd3d\SetRenderState(22,1)
CompilerEndIf
Re: Pres3D source
Without having a look at the source:
Most performant ------------------------- least performant
Fullscreen - Windowedscreen - Autostretched Windowedscreen
If you open the windowedscreen in the same resolution as the desktop is, you should be fine.
Most performant ------------------------- least performant
Fullscreen - Windowedscreen - Autostretched Windowedscreen
If you open the windowedscreen in the same resolution as the desktop is, you should be fine.
Re: Pres3D source
Hi,
as promised, here is the link to V1.02
http://www.infratec-ag.de/PureBASIC/Pres3D_V1.02.zip
Now you can open a new xml file via the menue.
I'll check tomorrow what happens in Linux.
Bernd
as promised, here is the link to V1.02
http://www.infratec-ag.de/PureBASIC/Pres3D_V1.02.zip
Now you can open a new xml file via the menue.
I'll check tomorrow what happens in Linux.
Bernd
Re: Pres3D source
404 Not found.infratec wrote:http://www.infratec-ag.de/PureBASIC/Pres3D_V1.02.zip
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
- Michael Vogel
- Addict
- Posts: 2680
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: Pres3D source
Seems to be fixed nowc4s wrote:404 Not found.infratec wrote:http://www.infratec-ag.de/PureBASIC/Pres3D_V1.02.zip