If context is specific platform, how does OpenGL read it? [closed] - opengl

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I read some article said OpenGL Context is create by GUI server, but how does OpenGL read it? Is an OpenGL implementation cross-platform?

An implementation of OpenGL is the actual code that implements the OpenGL specification. An OpenGL context is a particular interface to an OpenGL implementation, along with whatever state data and objects are needed for that interface.
OpenGL does not "read" the context; OpenGL is the context. Without a context, there is no interface to a valid OpenGL implementation, and without a valid OpenGL implementation, there is no OpenGL.
Implementations are specific to the hardware that they are written for.

Related

Interoperability between Metal Shading Language (MSL) and C++ Libraries [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I’m developing an iOS app and solved the interoperability Swift-C++ in the CPU side wrapping the C++ classes in Objective-C. But on the GPU side, I don’t Know if exists any way of call and retrieve data from a pure C++ class (not MSL). Since MSL is C++ based my intuition says that yes but I didn’t find any information in that way…
I’m trying to use libraries like CGAL or FastNoise to update a massive number of particles.
Welcome!
I'm afraid you can't just access any data from any class in your GPU code. Programming for the GPU requires a very different paradigm. You have to explicitly send data to the GPU, trigger computational tasks a.k.a. "kernels" to run on the GPU, wait for their completion, and transfer the data back to the RAM.
I recommend you check out some tutorials on Metal. Here is for example a sample project where image data is modified on the GPU using compute kernels.

Order independent transparency in legacy OpenGL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I've been searching for resources covering order independent transparency, but they all cover modern OpenGL (3.0+), which I can accomplish, but I haven't found anything that explains how to implement any of these algorithms in legacy OpenGL. What are the extensions that perform any kind of order independent transparency in the absence of framebuffers and what's the first version of OpenGL that provides such possibilities?
First things first: There are no dedicated legacy OpenGL extensions for order independent transparency. Period.
However there is one technique that can be used to implement depth peeling using the fixed function pipeline. The paper can be found here: https://my.eng.utah.edu/~cs5610/handouts/order_independent_transparency.pdf

New to OpenGL Shading Language [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm learning OpenGL recently and I want to work with GLSL in my codes.
I want to know where should I write the codes?
Is there an IDE or something?
Or should I write them some where in my source code?
what should I do for writing a simple shading program?
Thanks alot.
You can write GLSL code to anywhere you want. Just open a text file and write the code in there. Than you are gonna load the file and compile it from your source code. Alternatively you can embed the shader source into the source code with raw string literals if your language supports them.
You can find a basic example for writing and compiling in this tutorial. Programming language you use doesn't matter for compiling since it's done in OpenGL.

Is it necessary to create couple program OpenGL? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm learning OpenGL and want to create simple program. I want to render different meshes with different shaders. Should I recreate program or I must reuse created program? (program - shader program, created by calling glCreateProgram)
You don't have to re-use the linked program(s), it's just usually much faster than re-compiling/linking them each frame/drawcall.

Is it possible to create the low-level grapics API (similar to OpenGL)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is that possible to create a low level framework similar to OpenGL?
What do you need to building such API?
No, implementing something like OpenGL is not possible. Since the time OpenGL has decended from the heavens complete, writing something like it was forbidden by all common religions.
But really, what you'll actually need is about 21 years of work, a few thousands of developers and broad support from all industry leaders, so yea, piece of cake.
Or actually, all you need is just a notepad and a pencil, writing is easy!