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:

81 questions
0
votes
1 answer

how to create openGL 4.2 context with Qt?

I'm looking for a way to create a OpenGL 4.2 context with Qt. I found this and this. but those threads are more than 2 years old.. maybe there's a better way to do this by now? //edit: oh, and if possible i'd like to have a portable solution to do…
Mat
  • 4,281
  • 9
  • 44
  • 66
0
votes
1 answer

Is it possible to use OpenGL in a window that is already using GDI+?

Basically I am being called to render to an offscreen DC which is set up (I'm not sure how) to use GDI+. When I try to associate an OpenGL context with the DC, it just fails (i.e. returns zero but no error). SetPixelFormat also fails (probably…
TholePin
0
votes
1 answer

VBO per shader attribute without VAO, or different approach?

I'm using various 'nested' contexts in my application (for shader and geometry sharing), so I cannot use VAOs as they cannot be shared across contexts. My mesh data is stored in one VBO as a 'pool' of unique vertices, and in another VBO I store the…
cmannett85
  • 21,725
  • 8
  • 76
  • 119
0
votes
1 answer

Passing GLSurfaceView context to a thread

I want my GL Renderer to be set to "DIRTY" and use a thread to control the FPS but for some reason the requestRender call seems to be skipped over all together. I have a feeling this could be something to do with the thread not getting the proper…
Jack
  • 2,625
  • 5
  • 33
  • 56
0
votes
0 answers

Where to create QOpenGLDebugLogger in a qml application?

I have a Qt6 qml application, and plan to add several QQuickFramebufferObject descendant components to use OpenGL directly. I need OpenGL logs, and I learned that I can use QOpenGLDebugLogger for this. As a PoC, I can create the QOpenGLDebugLogger…
Ferenc
  • 779
  • 1
  • 6
  • 14
0
votes
0 answers

problem with Pyglet on Bullseye and respberry pi 4: Could not create GL context

I'm trying to use pyglet on Raspberry pi 4 (Bullseye) to create a simple window. But at compile time I get the following error message: Could not create GL context. Here is my simple code: import pyglet displays = pyglet.canvas.get_display()…
0
votes
0 answers

How to switch between two displays while rendering in OpenGL?

I have 2 physical displays in my hardware and I need to render video frames alternatively on the 2 displays with my C++ application. I have created a renderer module to render video frames. I have initialized the renderer module with OpenGL context…
Arun AC
  • 417
  • 7
  • 17
0
votes
1 answer

Why does my OpenGL context still return null?

I am trying to create a context in opengl-es for android and I'm a bit confused about it. I have initialized my context in a completely separate class from my renderer and my launch activity like so. import…
Jack
  • 2,625
  • 5
  • 33
  • 56
0
votes
1 answer

NSOpenGLContext for non-drawing purposes

How to create a system-independent NSOpenGLContext in Cocoa, not for drawing, but for retrieving OpenGL information like vendor, version etc. ???
yolo
  • 2,757
  • 6
  • 36
  • 65
0
votes
1 answer

How to retrieve a GL2 instance?

I am currently writting a game with the JOGL bindings to use OpenGL but I am so struggling on this. I need to initialize my vaos and vbos (for each component) using the GL2 variable that I collected in the init method in the class that implements…
0
votes
1 answer

crash from context shared QOpenGLWidget

I have two QOpenGLWidgets(view1, view2)as children in a top-level widget. Qt document says 'When multiple QOpenGLWidgets are added as children to the same top-level widget, their contexts will share with each other'. So, view1 and view2 share OpenGL…
slyx
  • 2,063
  • 1
  • 19
  • 28
0
votes
1 answer

Multiple IGraphicsContext with OpenTK / using multiple OpenGL contexts in a single window

What I want to do: The main goal: Use SkiaSharp and OpenTK together. Render 2D and 3D. What is the problem: SkiaSharp messes up the state of OpenGL, so I can't use it for 3D without saving and restoring some states. Old solution (with OpenGL < 4):…
Daniel Bişar
  • 2,663
  • 7
  • 32
  • 54
0
votes
1 answer

Context sharing not working in opengl with glfw3 and glew, second window acting like the context isn't shared at all

So i was trying to replicate this example of context sharing from glfw with glfw, glew and opengl in c++: https://github.com/glfw/glfw/blob/master/examples/sharing.c. The second window isn't showing anything except the background color which was set…
Error 1000
  • 13
  • 4
0
votes
2 answers

Where can I call gluUnproject?

This is a really simple question. Where can I call gluUnproject? Do I need a current openGL context of some kind? I looked up the function here, but that isn't telling me if there's any kind of precondition. I want to do this: GLdouble…
Stephen Furlani
  • 6,794
  • 4
  • 31
  • 60
0
votes
1 answer

Check if gl context was destroyed

Is there way to detect if opengl context was disposed when user has pressed home button?Currently I always recreate whole glSurface in onResume method.Also there is setPreserveEGLContextOnPause which might keep context alive.I'd like to use it to…
undefined
  • 623
  • 7
  • 27