10-25-2025, 05:08 AM
(10-20-2025, 09:08 PM)TempodiBasic Wrote: Hi a question about OpenGL in QB64pe:
Reading a 2020 book about OpenGl, at beginning it says to learn OpenGl 3.3 because it is the first of the new paradigm of OpenGl developing.
OpenGL v3.3 is the version that deprecated most of the fixed-function pipeline used in previous versions, and moved over to the programmable pipeline. A "pipeline" is a sequence of processing stages that converts data an app gives to OpenGL to the final rendered image. The fixed-function stages can not be programmed by the user, as can the "programmable" pipeline.
OpenGL v1.1, which QB64, QB64pe, and QB64 Original (not the true original created by Galleon [Rob]) are powered by, uses the fixed-function pipeline. Here is a textual representation of both types of pipelines:
FIXED PIPELINE:
( ) = Fixed-Function Stage
(Vertex) --> (Primitive) --> (Rasterization) --> (Fragment) --> (Framebuffer)
As stated before, OpenGL v3.3 deprecated "most" of the fixed-function pipeline. OpenGL did not remove the fixed-function stages in the pipeline, but a lot of the functionality in them. OpenGL simply added the programmable stages to the pipeline to work along side the fixed-function stages. The programmable stages are coded with shaders, which is talked about below. Here's the textual representation of the complete pipeline with the fixed-function and programmable stages:
COMPLETE PIPELINE
( ) = Fixed-Function Stage
[ ] = Programmable Stage
(Vertex) --> [Vertex] --> (Tessellation) --> [Tessellation] --> [Geometry] --> (Primitive) --> (Rasterization) --> [Fragment] --> (Framebuffer)
The programmable stages shown above were not all implemented together. While the OpenGL shaders language, "GLSL" was implemented into OpenGL v2.0, the Fragement shader was added through an extension, "GL_ARB_fragment_shader", in OpenGL v1.4, which was released in July 2002. The official Fragment shader was implemented in OpenGL 2.0, which was released in September 2004, as was the Vertex shader and the GLSL shader language. The Geometry shader, for the Geometry stage, was implemented in OpenGL v3.0, released in August 2008. The Tessellation shader was introduced in OpenGL v4.0, which was released in March 2010, and the Compute shader was introduced into OpenGL in version 4.3, which was released in August 2012.
Just FYI, OpenGL 4.6 was released in July 2017, which makes it nearly 9 years old at the time of this writing, and is the last version to ever be released. However, per Khronos, the maintainers of OpenGL, stated that OpenGL v4.6 will remain viable for at least 20 more years for backwards compatibility. OpenGL was replaced with Vulkan.
(10-20-2025, 09:08 PM)TempodiBasic Wrote: Then it says that there are many libraries about OpenGl both for Immediate mode both for CoreProfile and it continues saying that among these OpenGL libraries the most popular ones are GLUT, SDL, SFML and GLFW.
There are only two profiles for OpenGL. They are the "Core Profile" and the "Compatibility Profile". The compatibility profile provides both core features as well as all the deprecated fixed-function features. The core profile only provides the core features.
The "GLUT" library became obsolete in August 1998. Others have forked the project and created "FreeGlut", which was last updated in June 2024. I personally have never used either of them, so there is nothing to comment on.
I have created multiple demos with SFML, which one can be seen in the screenshot below, and it is an amazing 2D graphics library to use.
I recently started learning SDL3 and I primarily use it with the Vulkan graphics API. The main graphics demo I created with SDL3 and the Vulkan graphics API is a sphere with layers of cubes. The demo has many features including MSAA (MultiSample Anti-Aliasing), motion blurring, tinting, fly through, Orthographic, and others. I absolutely love Vulkan way more than OpenGL, even though it is extremely more verbose, meaning there is an extreme amount of coding that needs to be done to do render a single triangle. Roughly over 1k statements.
(10-20-2025, 09:08 PM)TempodiBasic Wrote: The question is:
nowadays (2025) are these affermitions yet right?
Is QB64pe's OpenGl version 3.3 or more?
Is QB64pe's OpenGl using one of those popular libraries? Or whatother?
Is available in QB64pe's OpenGl the CoreProfile mode?
These questions can appear too ingenue but I have found no clear answer in QB64pe's wiki .
These have been answered already, so I will not respond.
(10-21-2025, 12:26 AM)Unseen Machine Wrote: Bad news (for me at least!)
from my research, it is possible to add some of GL 3.x to QB64 using a mixture of .dll's, windows api calls and declare library but its not an easy task by any means, and I mean, SOOOOO NOT easy!
Light at the end...
RayLib supports modern OpenGl and an amazing person has wrapped and packaged it for Qb64 so if you want the modern approach then use that....
Me
It would be way more work, in my humble opinion, to code OpenGL v3.3 or later in QB64pe than it would be to do so in C++ with the SDL library.
RayLib is also an amazing graphics library.
(10-20-2025, 10:36 PM)SMcNeill Wrote: I think we use version 1.1. I don't think it's ever been upgraded beyond that point. It's just not really been adopted in use enough for anyone to really ask about upgrading and adding the more advanced features. At least, not as far as I know.
To upgrade the OpenGL version used by QB64/QB64pe would require a full rewrite in my humble opinion, as I have stated since 2012. But, that would mean getting into shaders.
Well... That's my 2 cents worth.
The Joyful Programmer has changed call signs. The Joyful Programmer is now called "AstroCosmic Systems".


