Questions tagged [wgl]

58 questions
2
votes
2 answers

Setting up OpenGL/Cuda interop in Windows

I am writing a DLL that needs to do some work in Cuda 3.2 and some work in OpenGL. OpenGL will render some grayscale images that my Cuda code needs to read in and modify, and then give back to OpenGL as a texture. I believe I need to create PBOs…
Alex
  • 21
  • 3
2
votes
0 answers

wglMakeCurrent with hdc parameter NULL

According to the registered here (khronos site): If the OpenGL context version of is 3.0 or above, and if either the parameter of wglMakeCurrent is NULL, or both of the and parameters of…
Mano-Wii
  • 592
  • 5
  • 19
2
votes
2 answers

does wglGetCurrentContext sync GPU and CPU?

when programming with OpenGL, glGet functions should be avoided because they force the GPU and CPU to synchronize, does this also apply to the wgl function "wglGetCurrentContext" which obtains a handle to the current OpenGL context? if not, are…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76
2
votes
1 answer

wglCreateContextAttribsARB returns NULL on capable hardware

I have a program which creates an OpenGL 4.0 context on a Windows machine. On my own computer, this code works - however, on my friend's computer, it does not. wglCreateContextAttribsARB returns NULL, even though my friend's Nvidia card supports…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
2
votes
1 answer

wglGetProcAddress returning NULL

I am using wlgGetProcAddress to get functions using a context created with wglCreateContext. I have set the context with wglMakeCurrent. I get a valid function pointer for glGetStringi, but I get NULL for glGetString. I thought that glGetString…
Graznarak
  • 3,626
  • 4
  • 28
  • 47
2
votes
0 answers

WGL extension and virtualbox

I'm currently trying to use the old Rendermonkey 1.82 on a WinXP virtual machine running in VirtualBox 4.3.8. Sadly it doesn't work for OpenGL, unable to find WGL extensions (exact error msg is: "WGL PBuffer extensions not detected - please update…
2
votes
2 answers

Get OpenGL (WGL) context from QOpenGLContext

I'm trying to get the OpenGL context (HGLRC) from the QQuickView window. I need to pass it to a non-Qt library. I can get a QOpenGLContext easily enough: m_qtContext = QOpenGLContext::currentContext(); How do you obtain the OpenGL context from the…
Jay
  • 13,803
  • 4
  • 42
  • 69
1
vote
1 answer

WGL - ChoosePixelFormat and sRGB framebuffer

I have a legacy OpenGL application which sets a pixel format based of ChoosePixelFormat instead of wglChoosePixelFormatARB or wglGetPixelFormatAttribivARB/wglGetPixelFormatAttribfvARB. ChoosePixelFormat doesn't allow to set a framebuffer color space…
Irbis
  • 1,432
  • 1
  • 13
  • 39
1
vote
1 answer

OpenGL loading fails at seemingly random points

I am loading OpenGL in C# using LoadLibrary/GetProcAddress/wglGetProcAddress. For some reason, it fails to load the pointer for glBlendFunc, and other random ones after that point. I have been looking through my code for the better part of an hour…
1
vote
1 answer

opengl win32 not drawing to screen

I am trying to use glClearBufferfv(GL_COLOR, 0, red) to draw a red screen. The program displays a white screen and the loading icon on the cursor is continually rotating. I am using glew. I am also using visual studio and i think i have linked to…
1
vote
0 answers

Stubbing glOrthof to use glOrtho

I'm writing graphics code that targets both an embedded VxWorks 653 system and Windows (VxWorks is our prime target that we're delivering, and Windows is our desktop environment to test). Our VxWorks 653 graphics driver uses glOrthof and does not…
1
vote
1 answer

openGL PBO use wglcontext, Not create window

My goal is get pixel data from main window. nothing any rendering. like we see the monitor such as screencapture. I tried to TRANSPARENT windows, glReadPixel. so I have a TRANSPARENT windows and context. glfwSetErrorCallback(errorCallback); if…
Birds
  • 65
  • 2
  • 13
1
vote
0 answers

wglGetPbufferDCARB with a NULL parameter returns a device context (hDC). But which hDC is this?

Accidentally I put a NULL parameter in wglGetPbufferDCARB. It was something like: HDC hDC = wglGetPbufferDCARB(NULL); Unexpectedly this code returned a real hDC! But I did not find anything about it. Does anyone know where this hDC comes from?
Mano-Wii
  • 592
  • 5
  • 19
1
vote
0 answers

WGL calls decrease performance of memory allocations on Nvidia systems

We are experiencing significant performance problems with our C++ application that uses WGL for window creation (and OpenGL for rendering) on some systems with Nvidia graphics cards. As soon as a window is created, or more precisely, as soon as…
mOfl
  • 478
  • 3
  • 14
1
vote
0 answers

Create OpenGL window win32 API

I am trying to create an OpenGL window inside of already existing parent window using win32 api. However, when creating a child, the function CreateWindowEx returns NULL with an error 1407 ERROR_CANNOT_FIND_WND_CLASS. The window must be a child so…