Questions tagged [wgl]
53 questions
0
votes
1 answer
wglCreateContextAttribsARB crashes
In my application, it crashes when I try to create wglCreateContextAttribsARB for the 128th time. It is always the 128th time, I always pass the same arguments, and it always returns 0x2095(ERROR_INVALID_VERSION_ARB). I know that it is a valid…
![](../../users/profiles/391659.webp)
Programmdude
- 533
- 5
- 22
0
votes
1 answer
Finding WGL with MinGW
I've wrote an adequate little program in C that creates a window. However, I'm having trouble adding the OpenGL rendering context and assorted functions to it.
GetDC, ChoosePixelFormat, SetPixelFormat -- all wgl functions, as I understand it. I…
![](../../users/profiles/983261.webp)
JGrey
- 165
- 1
- 1
- 10
0
votes
1 answer
Printing a non-english language in WGL
I want to print out words in languages other then english (such as russian and german) while using WGL.
I use the same technique that was described in http://nehe.gamedev.net/tutorial/bitmap_fonts/17002/ for printing english, but the same technique…
![](../../users/profiles/664503.webp)
Talke
- 121
- 6
0
votes
0 answers
WGL Window on QT non-GUI thread
I started out trying to create an OpenGL render window on a non-GUI thread using QT's OpenGL resources as explained in this thread:
https://forum.qt.io/topic/123151/qwindow-on-a-non-gui-thread
My reason for attempting to do this is because my GUI…
![](../../users/profiles/13912223.webp)
rtavakko
- 27
- 2
0
votes
2 answers
Regular window screen capture using openGL
I'm trying to my desktop image capture. (All images, including the desktop output to the monitor)
It's easy using window API (BitBlt or CImageClass) and it's not the way I want.
I want do it using opengl. so I found glReadPixel funtion and window…
![](../../users/profiles/10493327.webp)
Birds
- 65
- 12
0
votes
1 answer
OpenTK MultiThreading: How to "unbind" a GraphicsContext
I am working on a multi threaded OpenGL application with OpenTK 3 and WinForms.
I have 2 shared GraphicsContexts:
a "main" rendering context, used for scene drawing and synchronous load operations.
a "secondary" resource loader context, used to…
![](../../users/profiles/5598990.webp)
JPSgfx
- 93
- 3
- 9
0
votes
2 answers
Should a GL context be released using wglMakeCurrent(0,0)?
Does ist make sense to release a GL context after usage with wglMakeCurrent(0,0)?
Is there any performance advantage to release after usage instead of switching to another context while a context is current?
![](../../users/profiles/278842.webp)
Christopher Oezbek
- 17,629
- 3
- 48
- 71
0
votes
0 answers
How do I get updated/extended functions with OpenGL in Windows?
The specific OpenGL function I am trying to call in my case is: glTexImage2DMultisamplehttps://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2DMultisample.xhtml
I have followed this tutorial:…
![](../../users/profiles/8826010.webp)
Sluggernot
- 1
- 2
0
votes
1 answer
Will `wglCreateContext` fail safely if a DirectX context already exists for the given `HDC` (device context)
I'm attempting to contribute to a cross-platform, memory-safe API for creating and using OpenGL contexts in Rust called glutin. There is an effort to redesign the API in a way that will allow users to create a GL context for a pre-existing…
![](../../users/profiles/1711917.webp)
mindTree
- 786
- 7
- 18
0
votes
1 answer
P/Invoking "wglChoosePixelFormatARB" Unbalances the Stack
I am trying to use some pinvokes to set up a wgl context for some unit tests, but (so far) one of my methods unbalances the stack.
What I have done is to first create a window and get its DC. This all works as I am talking to the kernel32, user32,…
![](../../users/profiles/1117914.webp)
Matthew
- 3,951
- 2
- 21
- 43
0
votes
2 answers
Not understanding why context creation failing with win32 api and OpenGL and wgl
So i have followed all of the fundamental instructions in windows creation for OpenGL rendering context
the problem is to do when i try to create a core profile context with opengl , it fails and i get the "the program stopped working" message from…
![](../../users/profiles/7358334.webp)
sporingGT
- 101
- 7
0
votes
1 answer
Do not #include both and either of or
In GL/glcorearb.h, the following comment can be found.
Do not #include both GL/glcorearb.h and either of GL/gl.h or
GL/glext.h in the same source file.
However, this is the only way I can get my code to work. I have in display.h a declaration of…
![](../../users/profiles/5701767.webp)
A. Voll
- 63
- 5
0
votes
1 answer
inquiry about OpenGL32.dll version's issue using EGL 1.4
I’m a C++ application developer on Windows system. I’m developing an application using EGL 1.4 and OpenGL ES 2.0.
In a certain kind of a OpenGL32.DLL version, I found that a PVR error message occurred. The versions of OpenGL32.DLL that cause this…
![](../../users/profiles/4679575.webp)
정자민
- 21
- 2
0
votes
1 answer
SetPixelFormat return false when using pixel format gotten from wglChoosePixelFormatARB
When I using SetPixelFormat to set pixel format for hDC, it returns false. I used GetLastError(), I get a error code 2000 (means invalid pixel format).
The code as follow:
// Set pixel format attributes
int pixelAttributes[] = {
…
![](../../users/profiles/4772401.webp)
HolyChen
- 29
- 1
- 3
0
votes
0 answers
OpenGL EXTension not detected by GLEW?
I'm writing some modules using "DirectStateAccess" capabilities. If it's not supported, I made the necessary stuff.
On a customer laptop, I was able to create an OpenGL 3.3 Core Profile context. In a first call to glGetString(GL_EXTENSIONS),…
![](../../users/profiles/2931220.webp)
Zyend
- 552
- 3
- 19