80 questions
0
votes
1
answer
147
views
Changing OpenGL (wgl) context to a different window handle
I am creating an application using OpenGL (4.2). By default, the rendering is done on a panel in a window, it works without issues, but the panel can be docked/undocked, which causes the underlying ...
0
votes
1
answer
140
views
Segfault when calling OpenGL functions from other file
I am creating a small abstraction layer for an engine, but when I call any OpenGL API functions from a class, the code segfaults. I'm using glad and glfw and there aren't any errors from either, and ...
1
vote
0
answers
145
views
GdkCursor is randomly resetting to default with wglContext and gtk3
Short summary:
I have multiple GdkWindows that simultaneously get drawn into using OpenGL. For each of those windows it may happen that we want to set the GdkCursor. The change is registered and done, ...
0
votes
2
answers
786
views
Problem using two OpenGL-Contexts in two threads (one per thread)
I have been using one OpenGL-context in one thread (very simplyfied) like this:
int main
{
// Initialize OpenGL (GLFW / GLEW)
Compile_Shaders();
while (glfwWindowShouldClose(WindowHandle) =...
6
votes
1
answer
3k
views
How can I use OpenGL to render to memory without requiring any windowing system library?
I would like to use OpenGL (version 1.5) to render images to memory, without displaying them on screen (I can e.g. just save them as image files or render them as ASCII in terminal). I do not want any ...
1
vote
1
answer
513
views
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 ...
6
votes
2
answers
1k
views
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 ...
1
vote
1
answer
2k
views
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 ...
2
votes
2
answers
3k
views
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??...
0
votes
1
answer
374
views
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 ...
0
votes
1
answer
829
views
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 ...
0
votes
1
answer
1k
views
Context sharing not working in opengl with glfw3 and glew, second window acting like the context isn't shared at all [closed]
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 ...
2
votes
1
answer
4k
views
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 ...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
210
views
glClearColor raised exception TOpenGLComponent Lazarus
I use Lazarus (under Linux) Please anybody help me. I have problem. I have install LasOpenGLContext. There is "OpenGL Controll" at components panel. And I wish to draw a simple cube. But I can not do ...
3
votes
1
answer
5k
views
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 ...
3
votes
2
answers
2k
views
Get only one QOpenGLContext for different QT widgets
I've the following problem :
I want to get an application composed of many view which render a common OpenGL scene from a different point of view, illumination, and others options.
Basically, my ...
0
votes
1
answer
465
views
from OpenGLContext import testingcontext i cant import testingcontext
When i do this:
import OpenGLContext
its importing, there is no problem. But when i write
from OpenGLContext import testingcontext
its giving an error:
Traceback (most recent call last):
File ...
0
votes
0
answers
133
views
Dispose and reload textures when I show interstitial ads?
My question is - do I really need to dispose and reload my textures when I show interstitial ads?
The situation is - when I am showing Interstitial ads (e.g. from Admob) in my game, my pause and ...
2
votes
2
answers
2k
views
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/[email protected]/msg45360.html).
class ...
2
votes
1
answer
89
views
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 ...
5
votes
1
answer
863
views
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 ...
2
votes
1
answer
2k
views
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 ...
0
votes
1
answer
893
views
OpenGl ES 3.0 Context not created on iPad (works in Simulator)
I'm working on a cross platform renderer for PC (Windows, Linux, Mac) and iOS. The iOS part is currently built around OpenGL ES 2.0 and I wanted to upgrade to ES 3.0. So I replaced the following line (...
0
votes
1
answer
515
views
How to change to attributes of the current OpenGL context?
I need to add the EGL_RECORDABLE_ANDROID attribute to the existing OpenGL context. Is it possible to get the list of the current attributes for the current context and add the extra attribute to the ...
0
votes
1
answer
435
views
How do I switch the thread of an OpenGL context with SFML 2.2?
I want to have my window event loop in my main thread and everything else running in a separate thread.
The loop looks like this:
void loop(sf::RenderWindow& window)
{
//I need the context ...
3
votes
1
answer
705
views
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 "...
0
votes
2
answers
1k
views
Qt5 and GLEW MX => glewInit fails
We are migrating our project from Qt 4.8 to 5.4. We use multiple contexts in multiple thread. We use GLEW MX for this purpose (We make the context we desire current then call glewInit() on a local ...
1
vote
1
answer
2k
views
Adding an OpenGL Context to Cocoa Window
I'm trying to add an OpenGL context to a NSWindow, but for some reason it doesn't work.
It creates and shows the NSWindow correctly when I run the app, but I can't do anything with the OpenGL context, ...
1
vote
0
answers
133
views
Get HGLRC from QQuickView in qml 5.3
How can I get HGLRC from QQuickView in qml 5.3 application?
I have a program on openGL in windows which I want render to my QQuickView. The problem is that I don't want to touch render process in ...
0
votes
1
answer
4k
views
PyOpenGL on Ubuntu for Python 2.7
I am trying to install PyOpenGL and so far have tried the following ways:
$ pip install PyOpenGL PyOpenGL_accelerate
$ sudo python2.7 -m pip install PyOpenGL PyOpenGL_accelerate
Some variations of ...
1
vote
1
answer
960
views
Displaying ads above GLSurfaceView in Cocos2d-x on Android
After showing + closing an ad from Mopub in a Cocos2d-x 3.0 Android game, logcat shows these errors:
E/libEGL (13772): call to OpenGL ES API with no current context (logged once per thread)
W/...
-3
votes
1
answer
681
views
Is there a complete win32 wrapper library? [closed]
I search a win32 wrapper libraray that completly isolate me from the api.
I only want to create a opengl 3.3 window for windows only.
I know there are libraries like GLFW, SFML and SDL but this ...
1
vote
1
answer
501
views
context sharing in FreeGLUT under Linux with xorg
I am trying to use OpenGL with shared context (because of sharing textures between windows) via FreeGLUT library... It work fine, I can share textures, but i failed on the end of program or during ...
1
vote
1
answer
2k
views
How do I create an OpenGL 1.2 context in GLFW 3
I want to create OpenGL 1.2 context, but I get this error: "Failed to open GLFW window".
When I create 3.3 or 4.3 context there is no problem. How can I create 1.2 context?
glfwWindowHint(...
1
vote
1
answer
1k
views
Deallocating OpenGL context created by QGLWidget
If I create a QGLWidget, and then I allocate my own textures using something like glGenTextures, glTex2DImage, etc, will all that texture data get cleaned up when I delete the widget? (Also, I will ...
3
votes
1
answer
3k
views
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 ...
4
votes
1
answer
6k
views
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 ...
0
votes
1
answer
119
views
How to check if a GLXcontext is remote or local
I'm experiencing problems since I'm calling cuGLGetDevices() on an application which uses the glXGetCurrentContext (https://www.opengl.org/sdk/docs/man2/xhtml/glXGetCurrentContext.xml) function to ...
0
votes
1
answer
311
views
Windowless OpenGL Context in Apache2 Module
I'm trying to develop an Apache2 module that utilizes OpenGL to perform off-screen rendering and dynamically generate images that I can then send back to the client.
Apache2 is running on an Ubuntu ...
1
vote
1
answer
223
views
Android library project: need to retrieve Resources without Context
First some background (I always like when people asking questions give that): I am writing a library project. It is a simple OpenGL 'graphics distortions' library. Users are supposed to be able to ...
3
votes
2
answers
852
views
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 ...
2
votes
1
answer
1k
views
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 ...
0
votes
1
answer
786
views
Using glColor* with OpenGL version 4.4
I am in the process of updating our ancient OpenGL code. It is a Windows system and I am using GLEW. The OpenGL version is 4.4 (previously, the way the context was created limited us to 1.1). The code ...
2
votes
1
answer
1k
views
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)
{...
1
vote
1
answer
3k
views
wglCreateContextAttribsARB function crashes
I try to write down code from this tutorial. I have the code of InitializeOGL():
bool Ogl::InitializeOGL(bool vSync)
{
cout<<"Init OpenGL"<<endl;
int pixelFormat;
...
4
votes
1
answer
1k
views
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 ...
6
votes
1
answer
2k
views
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 ...
0
votes
1
answer
153
views
Drawing QTMovie's texture twice with OpenGL
I'm currently using OpenGL to display my QTMovie's frames into an NSOpenGLView.
In order to do that, I'm creating a texture context with the following code:
// Called from a subclass of NSOpenGLView
...
4
votes
1
answer
458
views
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, &...