Questions tagged [openglcontext]

An OpenGL context represents all of the state associated with an instance of OpenGL. Use this tag for questions about context creation, and use.

An OpenGL context represents all of the state associated with an instance of OpenGL. OpenGL functions are executed within the current context, and modify only the current context.

Reference

See the main help page at https://www.opengl.org/wiki/OpenGL_Context

See Also

Related tags are:

75 questions
14
votes
1 answer

Is it possible to share an opengl framebuffer object between contexts/threads?

I want to render my scene in one thread and then blit the result in window owned by another thread. To avoid reading the framebuffer back to cpu memory, I would like to use a framebuffer object. So far I have not been able to get this to work (white…
Plow
  • 3,603
  • 3
  • 16
  • 20
6
votes
1 answer

CAOpenGLLayer displaying remote Context

I have a sub-classed CAOpenGLLayer class which overrides drawInCGLContext there I draw a rectangle with OpenGL. The CAOpenGLLayer is added to a CALayer and shown. So when I would like to draw something I would need to do it in drawInCGLContext…
Johan_
  • 420
  • 5
  • 14
6
votes
1 answer

SDL2 - Check if OpenGL context is created

I am creating an application using SDL2 & OpenGL, and it worked fine on 3 different computers. But on another computer (an updated arch linux), it doesn't, and it crashes with this error: OpenGL context already created So my question is: How do I…
MiJyn
  • 4,117
  • 4
  • 34
  • 58
5
votes
1 answer

OpenGL and multiple GPUs - General possibility

I was wondering, is it possible to run a multi-window OpenGL application on more than one GPU simultaneously? To be more specific, let's say I've created an application with two windows each sharing it's GL context between each other. Now if I'd…
PuerNoctis
  • 1,264
  • 14
  • 31
5
votes
1 answer

Is calling glFinish necessary when synchronizing resources between OpenGL contexts?

I am using two OpenGL contexts in my application. The first one is used to render data, the second one to background load and generate VBOs and textures. When my loading context generates a VBO and sends it to my rendering thread, I get invalid data…
Ebatsin
  • 435
  • 2
  • 14
5
votes
1 answer

Am I allowed to simultaneously render from the same buffer object on multiple shared contexts in OpenGL 2.1?

In Apple's documentation, I read this: 1 — "Shared contexts share all texture objects, display lists, vertex programs, fragment programs, and buffer objects created before and after sharing is initiated." 2 — "Contexts that are on different threads…
jlstrecker
  • 4,643
  • 1
  • 42
  • 57
4
votes
3 answers

How can I create my own openGL context and bind it to a GLCanvas?

So when I got to grips with the java paint(Graphics g){} method I moved on to creating my own render methods but I had to learn about buffer strategies and how to 'get' Graphics So now I am learning openGL, I have got to grips with the…
Troyseph
  • 4,393
  • 3
  • 34
  • 54
4
votes
1 answer

QOpenGLContext from GLFW Context

We have a 3D rendering window created using GLFW and we want to use QWebkit for displaying a QWebPage inside the rendering (aka render the QWebPage to an OpenGL texture). Using only the CPU version is too slow and Qt supports rendering QWebkit into…
Artificial Mind
  • 905
  • 6
  • 16
4
votes
1 answer

Crash on VAOs loaded from non-main thread

In my code I have a wrapper class for an object backed by two buffer objects and a vertex array object. I generate them using this in the constructor (slightly simplified): glGenVertexArrays(1, &vao); glBindVertexArray(vao); glGenBuffers(1,…
dascandy
  • 6,916
  • 1
  • 25
  • 49
3
votes
1 answer

How to make QOpenGLContext current without surface in Qt5?

I am working on a project that will use OpenCL to render graphics for display in a QOpenGLWidget. The recommended way to do this seems to be creating a second QOpenGLContext beside the one already present in the QOpenGLWidget, then create a thread…
Lennart Rolland
  • 7,561
  • 6
  • 47
  • 80
3
votes
1 answer

Multi-device OpenCL/OpenGL context

I'm currently writing a smoke simulation in OpenCL where I use OpenGL (freeglut) to visualize the smoke. My computer is a Asus Zenbook with a Intel i7 CPU and a Intel HD 4000 GPU which are both "recognized" (HD 4000 = CL_DEVICE_TYP_GPU & Intel i7 =…
Ferenziz
  • 79
  • 4
3
votes
1 answer

Fullscreening a window in SDL2 with openGL

My program starts with a loading window while it is compiling shaders, loading textures etc. I then want to be able to launch a fullscreen application and use these resources. My understanding is that the openGL context must be the same before and…
3
votes
1 answer

Single OpenGL context, multiple views

I have a Windows app which can create several view windows which can render some models using OpenGL (3.2+). Each window can either render it's own independent object, or two (or more) windows can render the same object (but for example from…
Bjoern
  • 623
  • 5
  • 15
3
votes
2 answers

How to save OpenGL textures when lose context on Android

Our game requires that several large textures are built up dynamically from small images, and we don't keep a data copy of the textures, we just use OpenGL with glTexSubImage2d to update the actual textures. When Back is pressed, or the game loses…
user3162134
  • 227
  • 1
  • 7
3
votes
3 answers

Load Textures while rendering (OpenGL)

I want to load some meshes including OpenGL-textures while the screen shows an animated loading screen (rendered with OpenGL). So I do my loading stuff in a second thread which of course does not work, because I can't access the same GL-context from…
Florian M
  • 2,045
  • 3
  • 15
  • 14
1
2 3 4 5