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
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
  • 287
  • 1
  • 10
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,815
  • 3
  • 17
  • 14
2
votes
1 answer

How do OpenGL contexts and device contexts work?

I'm new to U/I programming, and I'm trying to get started with OpenGL. When I run an example program which creates a new OpenGL window with GLUT, it works fine. Good. However, in the context of another program, where I have to respond to Draw…
TholePin
2
votes
2 answers

openGL context in console

I'd like to use certain functions of openGL, but nothing related to rendering visual content. Is there way to create it without ANY dependencies (not to windows, nor some package[SDL, SFML, GLUT])? Only libraries allowed are those without external…
Raven
  • 4,783
  • 8
  • 44
  • 75
2
votes
2 answers

How Do I Initialize OpenGL.NET with GLFW.Net?

I am trying to use OpenGL and GLFW in C#. I Have Installed NuGet Packages for GLFW.Net and OpenGL.Net. What I cannot for my life figure out, is how do I setup the context for OpenGL.Net with GLFW.Net?? No error messages appeared when I tried to run…
PixelRifts
  • 143
  • 7
2
votes
2 answers

sharing opengl context on different displays using ubuntu

We have an application with multiple windows on different screens using 3 graphic cards. Each window uses opengl to render fonts, images etc... This works very well so far, except for sharing resources. we tried to implement something like this…
underdoeg
  • 1,862
  • 4
  • 14
  • 26
2
votes
2 answers

OSG render scene into image

I trying to render an OSG scene into a image in my Qt program. Refer to the example of SnapImageDrawCallback(https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg45360.html). class SnapImageDrawCallback : public…
2
votes
1 answer

Create Resources on Specific Context

I have a Qt OpenGL application that uses a QOpenGLWidget to render content. In another class (let's call it Resources), I want to create OpenGL resources like VBOs, VAO, shader programs, etc. for this widget. This creation method is not called by…
Nico Schertler
  • 32,049
  • 4
  • 39
  • 70
2
votes
1 answer

Cannot set view for NSOpenGLContext

(Sorry in advance for the seemingly large amount of code here) I'm trying to create a window with an OpenGL context with Cocoa, but I'm finding that I am unable to set the view property of the NSOpenGLContext that I create. I cannot simply use an…
KFox
  • 1,166
  • 3
  • 10
  • 35
2
votes
1 answer

LibGDX on resume function

I have issues with OpenGL ES context loss under LibGDX, so I'm trying to figure out how to solve the problem. My first step was to actually re-initialize all my textures when the resume function is called in one my classes that extends Screen. Like…
user1650305
2
votes
1 answer

SDL2 either lost OpenGL context or functions not defined

I am initiating the display, the renderer and the OGL context off of the display. None of these gives an error, following is how I create these elements. if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { printf("SDL initialization failed: %s\n",…
2
votes
2 answers

Render a SceneGraph with PyOpenGL

I'm using OpenGLContext to load a VRML file into a SceneGraph object. Unfortunately, for the life of me I can't find any example showing how to render the SceneGraph. I've created a context with testcontext.getInteractive(), but now what? How do I…
zmbq
  • 38,013
  • 14
  • 101
  • 171
1
vote
1 answer

Is there a way to pass context into onDrawFrame(GL10 gl)?

I am designing a game in Open GLES on Android in Java. Obviously I am using lots of textures and soon I will run out of memory. I am quite new to Android and Java, but I figured that the easiest way to go round this problem is to destroy the objects…
EasyCoder
  • 71
  • 7
1
vote
1 answer

Use Qt3D offscreen-rendered texture in OpenGL

Goal I'd like to implement an actual widget for Qt3D since QWidget::createWindowContainer just doesn't cut it for me. Problem Description My first approach of letting a new class subclass QWidget and QSurface was not successful since the Qt3D code…
Florian Blume
  • 3,237
  • 17
  • 37
1
vote
1 answer

How to render to multiple windows using a single OpenGL context?

I created two windows using GLFW. The first window has an OpenGL context and the second one doesn't. What I want to do is render the same scene to both windows using a single OpenGL context. Something like this. glBindVertexArray(vaoId); // ...…