Nice trick! The glX functions are for the X11server though, don't work with wayland. I find no equivalent for wayland, or I would need to use the restricted ES (for Embedded Systems), with EGL.
I will try using a single context, hidden, resizing it before each draw to an offscreen framebuffer ...
Search found 18 matches
- Wed Jan 28, 2026 12:28 pm
- Forum: Coding Questions
- Topic: Get OpenGLgadget() context number?
- Replies: 3
- Views: 3787
- Thu Jan 22, 2026 3:39 pm
- Forum: 3D Programming
- Topic: shader 3D Editor
- Replies: 7
- Views: 6293
Re: shader 3D Editor
The string is in GLSL language, based on C. "//" means "out-comment the rest of this line". It seems that "%" replaces the newline symbol, accessible in PB as ~"\n", or in plain C '\n'.
I find no documentation on '%' in GLSL.
I find no documentation on '%' in GLSL.
- Thu Jan 22, 2026 3:08 pm
- Forum: Tricks 'n' Tips
- Topic: Tip: How to do For/Next with a variable Step
- Replies: 10
- Views: 13438
Re: Tip: How to do For/Next with a variable Step
I hate it too. In short, just forget the for...next loop, and use other loops: while...wend, repeat...until, etc., even possibly label: ...goto label.
e.g. suppose you need for...step...next with float numbers, or the iteration is multiplicative. Other loops will allow you.
e.g. suppose you need for...step...next with float numbers, or the iteration is multiplicative. Other loops will allow you.
- Thu Jan 22, 2026 2:57 pm
- Forum: Coding Questions
- Topic: Reading or writing inside a LIST() without move his current position [Resolved]
- Replies: 9
- Views: 2929
Re: Reading or writing inside a LIST() without move his current position
Look at
Code: Select all
PushListPosition()
PopListPosition()- Thu Jan 22, 2026 2:51 pm
- Forum: Coding Questions
- Topic: Get OpenGLgadget() context number?
- Replies: 3
- Views: 3787
Get OpenGLgadget() context number?
The setter #PB_OpenGL_SetContext is useful, but there is no getter, like maybe #PB_OpenGL_GetContext.
GetGadgetAttribute(openGLgadgetNum, #PB_OpenGL_SetContext ) only returns 0, not working.
The same question came when using wegGL / webView: viewtopic.php?p=636229#p636229
In practice, the first ...
GetGadgetAttribute(openGLgadgetNum, #PB_OpenGL_SetContext ) only returns 0, not working.
The same question came when using wegGL / webView: viewtopic.php?p=636229#p636229
In practice, the first ...
- Thu Jan 22, 2026 2:12 pm
- Forum: Feature Requests and Wishlists
- Topic: Requested API Structure and constants
- Replies: 86
- Views: 220136
Re: Requested API Structure and constants
GetGadgetAttribute(openGLgadgetNum, #PB_OpenGL_SetContext ) only returns 0, not working. How can we get the context number after openGLgadget creation? -in order to store it for later use.
- Thu Jan 22, 2026 1:47 pm
- Forum: 3D Programming
- Topic: opengl version
- Replies: 5
- Views: 5313
Re: opengl version
By the way, when you write a vertex- or fragment shader, the first line still must be
(for example, "compatibility" is rather discouraged), or#version 330 compatibility
. Do they prevail over minor-version and major-version? Is this a valid answer to my first question?#version 450 core
- Thu Jan 22, 2026 1:36 pm
- Forum: Feature Requests and Wishlists
- Topic: Requested API Structure and constants
- Replies: 86
- Views: 220136
Re: Requested API Structure and constants
#PB_OpenGL_GetContext
The setter #PB_OpenGL_SetContext is useful, but there is no getter. The getter is necessary when the user has the freedom to dynamically create and and close windows and their OpenGLgadget()'s. Is there a quick workaround by importing something from a library and skipping the ...
The setter #PB_OpenGL_SetContext is useful, but there is no getter. The getter is necessary when the user has the freedom to dynamically create and and close windows and their OpenGLgadget()'s. Is there a quick workaround by importing something from a library and skipping the ...
- Sun Nov 16, 2025 5:17 pm
- Forum: 3D Programming
- Topic: opengl version
- Replies: 5
- Views: 5313
opengl version
Hi, I am busy writing shaders. I need to check which version of openGL is available in purebasic and found no info on that at all. Can someone clarify that please?
I use PB 6.21 (x64) on linux Zorin. I need a minimum of openGL 4.5 . The hardware goes up to 4.6 .
glfw has GLFW_VERSION_MAJOR and GLFW ...
I use PB 6.21 (x64) on linux Zorin. I need a minimum of openGL 4.5 . The hardware goes up to 4.6 .
glfw has GLFW_VERSION_MAJOR and GLFW ...
- Mon May 19, 2025 10:10 pm
- Forum: The PureBasic Editor
- Topic: color scheme
- Replies: 0
- Views: 2251
color scheme
:D :D :D REJOICE GIRLS !!! :D :D :D
Today I don't have a new color scheme.
I have better ;
I have two ripe color schemes.
This one I call Caparica (named after some Portuguese nostalgia) :
; PureBasic IDE Exported Preferences
;
[Sections]
IncludeColors = 1
;
; Color settings
;
[Colors ...
Today I don't have a new color scheme.
I have better ;
I have two ripe color schemes.
This one I call Caparica (named after some Portuguese nostalgia) :
; PureBasic IDE Exported Preferences
;
[Sections]
IncludeColors = 1
;
; Color settings
;
[Colors ...
- Mon May 19, 2025 9:59 am
- Forum: Coding Questions
- Topic: Running directly C code with v6.00 [Resolved]
- Replies: 23
- Views: 7416
Re: Running directly C code with v6.00 [Resolved]
- Mon May 19, 2025 9:31 am
- Forum: Assembly and C Programming in PureBasic
- Topic: Problem with 128 bit registers (XMM)
- Replies: 12
- Views: 16505
Re: Problem with 128 bit registers (XMM)
Older gfx cards needed it. Later they accepted unaligned.Does the structure 'p4' or the data table 'q4' have to be aligned also?
Code: Select all
movaps movups- Thu May 15, 2025 1:02 pm
- Forum: Coding Questions
- Topic: Running directly C code with v6.00 [Resolved]
- Replies: 23
- Views: 7416
Re: Running directly C code with v6.00 [Resolved]
This simple example runs on windows10home and PB6.20
"main()" is not even necessary. PB and C seem to mix nicely.
; NEEDS C-BACKEND AND CONSOLE MODE (compiler-->options).
! int foom(float valoo){
! printf("Hello Moony! %f %f ********", valoo, valoo);
input()
! return 0;}
openconsole ...
"main()" is not even necessary. PB and C seem to mix nicely.
; NEEDS C-BACKEND AND CONSOLE MODE (compiler-->options).
! int foom(float valoo){
! printf("Hello Moony! %f %f ********", valoo, valoo);
input()
! return 0;}
openconsole ...
- Thu May 15, 2025 11:38 am
- Forum: Assembly and C Programming in PureBasic
- Topic: Problem with 128 bit registers (XMM)
- Replies: 12
- Views: 16505
Re: Problem with 128 bit registers (XMM)
I tried all possible ways and could not get started using the 128-bit registers of SSE2.
I agree with Fred, "enableASM" seems to make things worse.
;comment
structure p4 : w.f : x.f : y.f : z.f : endstructure
global ppp.p4
dataSection
q4: ; like a virtual table
Data.f 1.1, 2.2, 3.3, 4.4 ...
I agree with Fred, "enableASM" seems to make things worse.
;comment
structure p4 : w.f : x.f : y.f : z.f : endstructure
global ppp.p4
dataSection
q4: ; like a virtual table
Data.f 1.1, 2.2, 3.3, 4.4 ...
- Sat Nov 02, 2024 9:30 pm
- Forum: General Discussion
- Topic: 600€ de gain en PB !!!!!!
- Replies: 26
- Views: 9434
Re: Small PB game for 200€
I already heard this sentence but no one could ever demonstrate it. Please can anyone demonstrate this dogma.Security by obscurity just makes no sense.
Thank you.