I just want to know what does "context current" mean in programming !
I see these word at a website(sorry about that I can't post link here)
So,I copy a paragraph form the website below.
Making the OpenGL context current
Before you can use the OpenGL API, it must have a current OpenGL context. You make a window's context current with glfwMakeContextCurrent. It will then remain as the current context until you make another context current or until the window owning it is destroyed.
Someone can help me?
I'd just like to interject for a moment. What you’re referring to as Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called “Linux”, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use.
Linux is the kernel: the program in the system that allocates the machine’s resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” distributions are really distributions of GNU/Linux.
Lol, I'm sorry, I was just messing with you. I will try to explain the real answer here. The current OpenGL context is which context OpenGL is set to perform operations on for that specific thread. Each thread can have its own OpenGL context set as current, but one context cannot be current in two threads at the same time.
Does that make sense? I'm not sure if I explained it well, especially if English is not the best language for you. In your situation, threads probably do not matter, so I will explain differently. What I intend to say is this: If a context is current, then it is the OpenGL context you are working on right now, and any operation you tell OpenGL to do will run in that context.
yup,my first language is not English......
I'm a student in CSIE and also know about thread.
Can I ask a stupid question ?
Now,I only confused that what does context meaning...
I had check the dictionary but it is useless.....
Sorry to bother you.
Thank you
Originally Posted by Hibati
yup,my first language is not English......
I'm a student in CSIE and also know about thread.
Can I ask a stupid question ?
Now,I only confused that what does context meaning...
I had check the dictionary but it is useless.....
Sorry to bother you.
Thank you
That is alright, "context" means something different for OpenGL than it does for the dictionary. I'm trying to find a way to explain this in simple English... An OpenGL Context is an instance/occurrence of OpenGL. It stores all of the state associated with OpenGL at the current time. When I say "state", I mean all of the information that is currently in OpenGL used when you send OpenGL commands.
This is approaching the limit of what I know about how OpenGL works at a low level. I might not be able to explain more if you ask more detailed questions. But I will try to be as helpful as I can be.