PureBasic Docs - Errors & needed improvements to the man
Moderator: Documentation Editors
Re: PureBasic Docs - Errors & needed improvements to the man
It is not false. Textures should be in a power of two. The manual merely lists some of the more common sizes that are a power of two. Naturally, it will not list all possible sizes as this would be infinite. What sizes you can actually use are a limit of your GFX card and will also depend on the rendering API (and version) being used.
As to rectangle vs square, I have been out of school for a long time, so I may not be remembering correctly, but I thought a rectangle was a quadrilateral with four right angles and a square was a rectangle with four equal sides? If this is correct, then the manual would be listing rectangular dimensions. However, it is obviously not listing oblong rectangular dimensions, just square rectangular dimensions.
As to rectangle vs square, I have been out of school for a long time, so I may not be remembering correctly, but I thought a rectangle was a quadrilateral with four right angles and a square was a rectangle with four equal sides? If this is correct, then the manual would be listing rectangular dimensions. However, it is obviously not listing oblong rectangular dimensions, just square rectangular dimensions.
Best wishes to the PB community. Thank you for the memories.
Re: PureBasic Docs - Errors & needed improvements to the man
As the Help file says :Kuron wrote:It is not false. Textures should be in a power of two. The manual merely lists some of the more common sizes that are a power of two. Naturally, it will not list all possible sizes as this would be infinite. What sizes you can actually use are a limit of your GFX card and will also depend on the rendering API (and version) being used.
As to rectangle vs square, I have been out of school for a long time, so I may not be remembering correctly, but I thought a rectangle was a quadrilateral with four right angles and a square was a rectangle with four equal sides? If this is correct, then the manual would be listing rectangular dimensions. However, it is obviously not listing oblong rectangular dimensions, just square rectangular dimensions.
Texture need to be Square ---> Square mean 64X64, 128X128, 256X256 or in the other end the texture Width = Texture Height and this is not true.
X-Wing Alliance game created by Totally Games/LucasArts use rectangular texture in their opt file (the opt file contain the geometry and textures packed together).
Best regards
Guimauve
Re: PureBasic Docs - Errors & needed improvements to the man
I replied to your exact words previously. If you have an issue with what I was replying to, you need to take it up with the person who made the post that I was replying to, which would appear to be you. You can contact yourself here.
The manual says it is strongly recommended to make the texture square, it does NOT say the texture needs to be square.
The manual also says and with power of 2 width/height. The manual does NOT say the width and height have to be equal powers of 2.
As I stated before: The manual merely lists some of the more common sizes that are a power of two. Naturally, it will not list all possible sizes as this would be infinite. What sizes you can actually use are a limit of your GFX card and will also depend on the rendering API (and version) being used.
These words above are also false. The manual does NOT say this. The manual clearly says: It's strongly recommended to make the texture square and with power of 2 width/height: 64x64, 128x128, 256x256... Old GFX cards can have limitation, so if possible limit the texture size to 256x256.Guimauve wrote: As the Help file says :
Texture need to be Square ---> Square mean 64X64, 128X128, 256X256 or in the other end the texture Width = Texture Height and this is not true.
The manual says it is strongly recommended to make the texture square, it does NOT say the texture needs to be square.
The manual also says and with power of 2 width/height. The manual does NOT say the width and height have to be equal powers of 2.
As I stated before: The manual merely lists some of the more common sizes that are a power of two. Naturally, it will not list all possible sizes as this would be infinite. What sizes you can actually use are a limit of your GFX card and will also depend on the rendering API (and version) being used.
I am very happy for them. Achievements like this deserve to be recognized and praised. Perhaps you should send them a congratulatory cake, or at least a card and some flowers?Guimauve wrote:X-Wing Alliance game created by Totally Games/LucasArts use rectangular texture in their opt file (the opt file contain the geometry and textures packed together).
Best wishes to the PB community. Thank you for the memories.
Re: PureBasic Docs - Errors & needed improvements to the man
@Kuron : SORRY DARLING !
Please just ignore my intervention.
Bye Bye
Guimauve
Please just ignore my intervention.
Bye Bye
Guimauve
Re: PureBasic Docs - Errors & needed improvements to the man
The code example for CreatePopupMenu() in PB's help file contains the Windows API
constant #WM_RButtonDown and therefore doesn't work in PB's Linux and MacOS
versions. I therefore modified that code example for Linux:
And this is the modified code example for MacOS:
constant #WM_RButtonDown and therefore doesn't work in PB's Linux and MacOS
versions. I therefore modified that code example for Linux:
Code: Select all
ProcedureC RightClickHandler(*Event.GdkEventButton, *UserData, *DestroyNotify)
If *Event\type = #GDK_BUTTON_PRESS
If *Event\button = 3 ; Right mouse button?
DisplayPopupMenu(0, WindowID(0)) ; Display the popup-menu if yes
EndIf
EndIf
gtk_main_do_event_(*Event)
EndProcedure
If OpenWindow(0, 200, 200, 200, 120, "Popup-Menu Example")
gdk_event_handler_set_(@RightClickHandler(), 0, 0)
If CreatePopupMenu(0) ; creation of the pop-up menu begins...
MenuItem(1, "Open") ; You can use all commands for creating a menu
MenuItem(2, "Save") ; just like in a normal menu...
MenuItem(3, "Save as")
MenuItem(4, "Quit")
MenuBar()
OpenSubMenu("Recent files")
MenuItem(5, "PureBasic.exe")
MenuItem(6, "Test.txt")
CloseSubMenu()
EndIf
Repeat
Select WaitWindowEvent() ; check for window events
Case #PB_Event_Menu ; an item of the popup-menu was clicked
Select EventMenu() ; get the clicked menu item...
Case 1 : Debug "Menu: Open"
Case 2 : Debug "Menu: Save"
Case 3 : Debug "Menu: Save as"
Case 4 : Quit = 1
Case 5 : Debug "Menu: PureBasic.exe"
Case 6 : Debug "Menu: Text.txt"
EndSelect
Case #PB_Event_CloseWindow
Quit = 1
EndSelect
Until Quit = 1
EndIf
Code: Select all
#kEventClassWindow = $77696E64 ; 'wind'
#kEventWindowContextualMenuSelect = 78
Structure EventTypeSpec
EventClass.L
EventKind.L
EndStructure
ProcedureC RightClickHandler(*NextEventHandler, Event.L, UserData.L)
DisplayPopupMenu(0, WindowID(0)) ; now display the popup-menu
EndProcedure
Dim EventTypes.EventTypeSpec(0)
If OpenWindow(0, 200, 200, 200, 120, "Popup-Menu Example")
EventTypes(0)\EventClass = #kEventClassWindow
EventTypes(0)\EventKind = #kEventWindowContextualMenuSelect
InstallEventHandler_(GetWindowEventTarget_(WindowID(0)), NewEventHandlerUPP_(@RightClickHandler()), 1, @EventTypes(), 0, 0)
If CreatePopupMenu(0) ; creation of the pop-up menu begins...
MenuItem(1, "Open") ; You can use all commands for creating a menu
MenuItem(2, "Save") ; just like in a normal menu...
MenuItem(3, "Save as")
MenuItem(4, "Quit")
MenuBar()
OpenSubMenu("Recent files")
MenuItem(5, "PureBasic.exe")
MenuItem(6, "Test.txt")
CloseSubMenu()
EndIf
Repeat
Select WaitWindowEvent() ; check for window events
Case #PB_Event_Menu ; an item of the popup-menu was clicked
Select EventMenu() ; get the clicked menu item...
Case 1 : Debug "Menu: Open"
Case 2 : Debug "Menu: Save"
Case 3 : Debug "Menu: Save as"
Case 4 : Quit = 1
Case 5 : Debug "Menu: PureBasic.exe"
Case 6 : Debug "Menu: Text.txt"
EndSelect
Case #PB_Event_CloseWindow
Quit = 1
EndSelect
Until Quit = 1
EndIf
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
The Useful Internet Links page has a lot of broken links/discontinued websites.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- Andre
- PureBasic Team
- Posts: 2068
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
Thanks shardik for your code exemples!
But about the CreatePopupMenu() examples: I don't think (even more Fred & freak), that the PB help should be filled with API-related stuff/code examples. So it's already not so good, that the current help example uses a Windows-specific constant.
I think, it's time for a native implementation on all 3 supported OS, which is up to Fred & freak!
But about the CreatePopupMenu() examples: I don't think (even more Fred & freak), that the PB help should be filled with API-related stuff/code examples. So it's already not so good, that the current help example uses a Windows-specific constant.
I think, it's time for a native implementation on all 3 supported OS, which is up to Fred & freak!
- Andre
- PureBasic Team
- Posts: 2068
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
All needed notes are added to the manual, for PB4.61...Shardik wrote: unfortunately you seem to have forgotten to add a remark to each
Gadget description in the help for which the SetGadgetColor() and
SetGadgetItemColor() commands on the Mac don't work (in contrast
to the Windows and Linux version). Do you remember my fancy table
which lists all non-working color commands on the Mac? freak
decided that a remark should have been added to each Gadget
description which doesn't work with color commands on the Mac:freak wrote:Don't add that table. Add a note in the topic for each function instead.
By the way, I've added the completely missing remarks about coloring possibilities at the TreeGadget() now...
Re: PureBasic Docs - Errors & needed improvements to the man
Could "Command lines" and/or "Parameters" be added to the index please and let it point to ProgramParameter...
I've just wasted a good half hour looking for how to get the command line parameters... and as it's something that I rarely use, I can forsee myself doing the same again in a year or two...
I've just wasted a good half hour looking for how to get the command line parameters... and as it's something that I rarely use, I can forsee myself doing the same again in a year or two...
Re: PureBasic Docs - Errors & needed improvements to the man
complete the physic commands in the docs,
see here:
http://www.purebasic.fr/english/viewtop ... 0&start=25
[Andre on 5th Oct. 2012: done with PB5.00b4]
see here:
http://www.purebasic.fr/english/viewtop ... 0&start=25
[Andre on 5th Oct. 2012: done with PB5.00b4]
SPAMINATOR NR.1
Re: PureBasic Docs - Errors & needed improvements to the man
Index only match the correct name. If you don' know the correct name and you are looking for it use the search field. Entering "commandline" in the search field returns ProgramParameter.Foz wrote:Could "Command lines" and/or "Parameters" be added to the index please and let it point to ProgramParameter... I've just wasted a good half hour looking for how to get the command line parameters...
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: PureBasic Docs - Errors & needed improvements to the man
PB help for Chr():
"Returns a string with the character associated with the given ASCII/UNICODE value."
Works also in Unicode mode (and it should!), so it would be nice to make that clear in the documentation:Syntax
Text$ = Chr(ASCII-Value)
Description
Returns the character associated with the given ASCII value.
"Returns a string with the character associated with the given ASCII/UNICODE value."
Code: Select all
Debug Chr(401)
Debug Chr(956)
Re: PureBasic Docs - Errors & needed improvements to the man
On the page for "Array" in the manual the example Array.pb and the help page is missing.
Originally reported in this link by akee.
[Andre on 5th Oct. 2012: works in PB5.00b4]
Originally reported in this link by akee.
[Andre on 5th Oct. 2012: works in PB5.00b4]
- Andre
- PureBasic Team
- Posts: 2068
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
I've added a remark + example about unicode supportDanilo wrote:PB help for Chr():
Works also in Unicode mode (and it should!), so it would be nice to make that clear in the documentation:
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
Images: The Help does not distinguish between a PB ImageID and an OS Image Handle, which is in fact critical. Please see this thread:
http://www.purebasic.fr/english/viewtop ... 16#p386616
http://www.purebasic.fr/english/viewtop ... 16#p386616
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.