Search found 1236 matches
- Fri Dec 24, 2021 7:02 pm
- Forum: Feature Requests and Wishlists
- Topic: Support for not clearing 3D screen between renders
- Replies: 6
- Views: 2718
Re: Support for not clearing 3D screen between renders
With vector drawing on a canvas you can have subpixel movement (and partial clearing as well): EnableExplicit Define ww, wh, style, win, canvas, event, quit Define draw ww=800 wh=600 style | #PB_Window_ScreenCentered style | #PB_Window_SystemMenu style | #PB_Window_MinimizeGadget win = OpenWindow(#P...
- Fri Dec 24, 2021 4:25 pm
- Forum: Feature Requests and Wishlists
- Topic: Support for not clearing 3D screen between renders
- Replies: 6
- Views: 2718
Re: Support for not clearing 3D screen between renders
If you don't need high performance maybe a hack is sufficient, like grabbing and double rerendering the screen. A simple demo would be for example examples/3d/Bridge.pb with RenderWorld() replaced with this code: GrabSprite(0, 0, 0, ScreenWidth(), ScreenHeight()) RenderWorld() GrabSprite(1, 0, 0, Sc...
- Sun Dec 19, 2021 12:01 pm
- Forum: Coding Questions
- Topic: HideGadget faster option
- Replies: 30
- Views: 3759
Re: HideGadget faster option
Instead of this: EnableExplicit Define win, show, hide, g, event, quit win = OpenWindow(#PB_Any, 50, 100, 630, 110, "..") hide = ButtonGadget(#PB_Any, 10, 10, 300, 40, "hide") show = ButtonGadget(#PB_Any, 320, 10, 300, 40, "show") Dim gadgets(10) For g = 0 To 9 gadgets(...
- Sun Dec 19, 2021 11:38 am
- Forum: Coding Questions
- Topic: HideGadget faster option
- Replies: 30
- Views: 3759
Re: HideGadget faster option
It could be a faulty event processing, that's what it look like to me. If you have something like a main loop that only processes one event instead of all events then some events could lag behind. Also the regular time steps of the lags look like you have some Delay() or other work done that impedes...
- Wed Dec 15, 2021 6:20 pm
- Forum: Coding Questions
- Topic: OpenScreen causes Error in Linux OpenSuse Leap 15.3
- Replies: 15
- Views: 1248
Re: OpenScreen causes Error in Linux OpenSuse Leap 15.3
I don't get the warning by the way. Maybe some library versions on your system don't match? I don't know really. Maybe try the checkinstall script that comes with purebasic.
- Wed Dec 15, 2021 6:12 pm
- Forum: Coding Questions
- Topic: OpenScreen causes Error in Linux OpenSuse Leap 15.3
- Replies: 15
- Views: 1248
Re: OpenScreen causes Error in Linux OpenSuse Leap 15.3
Does the example in the doc for KeyboardPushed() work?
- Wed Dec 15, 2021 6:08 pm
- Forum: Coding Questions
- Topic: OpenScreen causes Error in Linux OpenSuse Leap 15.3
- Replies: 15
- Views: 1248
Re: OpenScreen causes Error in Linux OpenSuse Leap 15.3
If you remove the main loop (empty else block) then do you still get the IMA?
- Wed Dec 15, 2021 5:58 pm
- Forum: Coding Questions
- Topic: OpenScreen causes Error in Linux OpenSuse Leap 15.3
- Replies: 15
- Views: 1248
- Tue Dec 07, 2021 8:22 pm
- Forum: Coding Questions
- Topic: Retrieve the fields from a structure
- Replies: 5
- Views: 718
Re: Retrieve the fields from a structure
You can do something like that with the JSON and XML libs.
similar, but not the exact answer i think, but it was posted somewhere in the forum:
How to loop through structure fields?
https://www.purebasic.fr/english/viewtopic.php?t=73867
similar, but not the exact answer i think, but it was posted somewhere in the forum:
How to loop through structure fields?
https://www.purebasic.fr/english/viewtopic.php?t=73867
- Sun Dec 05, 2021 7:06 pm
- Forum: Tricks 'n' Tips
- Topic: Mandelbrot set and Julia set using the OpenGLGadget and a fragment shader
- Replies: 21
- Views: 3407
Re: Mandelbrot set and Julia set using the OpenGLGadget and a fragment shader
On my Ubuntu the test code fails at OpenLibrary, but it works (on my system) with "libGL.so". But it then fails because GetFunction result is 0.
For a start: https://stackoverflow.com/a/66249269
Coole Fraktale
For a start: https://stackoverflow.com/a/66249269
Coole Fraktale
- Wed Dec 01, 2021 5:53 pm
- Forum: General Discussion
- Topic: Quick OK Image format
- Replies: 42
- Views: 8562
Re: Quick OK Image format
The thread title says 'quick' instead of 'quite'.
- Tue Nov 30, 2021 1:18 pm
- Forum: Coding Questions
- Topic: Compare text files (or sources)
- Replies: 15
- Views: 2375
Re: Compare text files (or sources)
git diff has an option to detect code moves. You can diff any two files without having any git repo initialized. It's only coloring though, not giving any patch info. Not sure how useful it is.
Code: Select all
git diff --color-moved=plain a b
- Mon Nov 29, 2021 1:54 pm
- Forum: Coding Questions
- Topic: Locking a mutex multiple times?
- Replies: 10
- Views: 1664
Re: Locking a mutex multiple times?
You could add some test code (in debug mode) that uses a test thread which double-locks a mutex. If it doesn't finish after some time you give yourself a message. So when you port your code you will get notified immediately in case reentrant isn't working.
- Mon Nov 29, 2021 1:04 pm
- Forum: Coding Questions
- Topic: Locking a mutex multiple times?
- Replies: 10
- Views: 1664
Re: Locking a mutex multiple times?
It seems to work here on my Ubuntu 18 / x86_64
Code: Select all
m = CreateMutex()
LockMutex(m)
LockMutex(m)
UnlockMutex(m)
UnlockMutex(m)
Debug "hi!" ; hi!
- Mon Nov 29, 2021 12:44 pm
- Forum: Coding Questions
- Topic: Locking a mutex multiple times?
- Replies: 10
- Views: 1664
Re: Locking a mutex multiple times?
It's not a problem, PB mutex locks are reentrant
https://en.wikipedia.org/wiki/Reentrant_mutex
https://en.wikipedia.org/wiki/Reentrant_mutex