How to remove/disable glXCreatePbuffer in Linux - c++

I am trying to debug an opengl error that i have and i decided to use Nvidia Linux Graphics Debugger. My laptop has Nvidia Optimus but i manged to fix everything to make things work with dGPU using Fedora 22.
I am new to Linux developing and I tend to use wrappers when it comes to doing something because I started developing the same project in windows and linux at the same time. I find it easyer for some small things to use windows compared to linux but I would like to more and stay there. :D
When i try to capture a frame with Linux Graphics Debugger I get this error.
Detected unsupported operations that may cause errors or a crash during capture.
First seen unsupported operation: glXCreatePbuffer
I did some googleing and i found out what is the operation. I get the same error with all applications that use OpengGl.
My problem is how to disable this. I am using SDL2 GLEW and FreeGlut.

Related

Cannot enable vsync in Cygwin/X

I am trying to compile a simple game using SDL2 and OpenGL under Cygwin. When I ran the program, I found that the GPU usage is unusually high. Then I found that VSync was not enabled for the program. More specifically, SDL_GL_SetSwapInterval(1) returned neither 0 (success) nor -1 (failed), but an undocumented value 5. SDL_GetError() returns glXSwapIntervalMESA failed. Any idea on how to fix this?
Update: I tried to call glXSwapIntervalMESA directly, and found that it returned GLX_BAD_CONTEXT. Now it seems that the only way to force VSync is through the display driver settings.
Cygwin/X forces you to operate through an X11 server that runs on top of Windows GDI. The capabilities of that X11 server are very limited and not every optional feature in the book is supported.
If you don't need the parts of X11 other than GLX, then drop it and access the graphics system directly. The same goes for Cygwin and POSIX functions.
I.e. use MinGW to compile your program without Cygwin, and a SDL-2 build that uses the OS native functions for OpenGL context creation and management.

Force Unreal Engine to use opengl on windows executable

I'm attempting to make a video game in Unreal Engine 4.9. I'm building it for Windows, but I'd like to have it use opengl instead of directx in the executable. However, I've found no options that let you do this. Unreal Engine uses OpenGL when it creates executables for Linux and Mac, but there seems to be no way to use OpenGL with Windows.
Am I missing something? Is there some way to force Unreal Engine to use OpenGL in Windows executables?
EDIT: The reason I want to use OpenGL is because I want this game to run without having to install anything on the end user's computer (DirectX has to be installed to work)
Microsoft doesn't really support OpenGL, they typically go out of their way to make it very difficult to use OpenGL on Windows and strongly encourage people to use DirectX instead.
The simplest way to get a working OpenGL context in windows is sometimes to use ANGLE which is a compatibility layer which translates OpenGL calls to DirectX calls. This is what Chrome and Firefox use to support WebGL on windows. I doubt that Unreal Engine is integrated with this, so you might have a hard time.
Edit:
EDIT: The reason I want to use OpenGL is because I want this game to run without having to install anything on the end user's computer (DirectX has to be installed to work)
One thing you could do is cross-compile the Mesa3D drivers, as described here: https://wiki.qt.io/Cross_compiling_Mesa_for_Windows
But then you won't get hardware acceleration.

nsight debugging with OpenGL interop

Usually I program on Linux, now I'v setup a Windows environment just to debug with the nsight version of Visual Studio.
But when I try to start the debugger (either Graphics or CUDA Debugging), it doesn't work. The CUDA debugger just disconnects and the Graphics debugger disconnects with
FrameDebugger: Unsupported operation encountered; saving compatibility log to 'C:\Users\##\Documents\NVIDIA Nsight\nvcompatlog.txt'
The file then says
cuGraphicsGLRegisterImage (Registering GL textures for CUDA-Interop is unsupported)
Does it mean there is no way to debug CUDA, when there is interop present? It's hard to believe and so I want to make sure the problem is not on my computer only.
cuGraphicsGLRegisterImage is not supported in Graphics Debugger as the nvcomlog.txt said.
The Cuda Debugger should work. Please contact devtools-support#nvidia.com, you may be asked for the code.

OpenGL - Using modern libraries

Upon successful compilation of a recent program I wrote from the openGL-book using openGL 4.0 I wasn't able to run the program due to an error that stated " error XX - unsupported hardware.."
However according to a previous question I asked if I could compile/run openGL programs on my computer I got an answer that I could:
Wiki claims you can do GL 4.0 with your HD 4000 [Graphics Chip] on Windows.
My question is - is that I am using the libraries freeglut 2.8 and GLEW 1.10 (newest versions) but the tutorial I followed used functions that came with 4.0 could the reason that my program does not run follow because I am linking modern versions of openGL libaries?
Things you have to check to run modern OpenGL:
Graphics driver: Do you have the latest and most up to date drivers?
Graphics card/chipset: Can your graphics hardware support the latest OpenGL even with its most recent drivers?
Using Proper Hardware: Some laptops come with a low powered graphics chipset and a high powered alternate graphics card/chipset. The low powered one may not support new stuff, but the high powered one definitely should. Have you instructed your computer to use the right one?
Libraries: Have you properly linked to something like GLEW that gives you the ability to use modern OpenGL?
Since you're on Windows, do note that they purposefully don't give you preinstalled access to modern OpenGL, so you have to do it yourself. Usually that just means checking your drivers and downloading GLEW.
From your error message, it looks like your graphics drivers aren't up to date or the graphics card/chipset/whatever you're using doesn't support the OpenGL version you want.

Ogre3D Basic Framework issue on Ubuntu

I have been trying to learn to use Ogre3D and have gotten to the stage where I want to start something more serious than the examples it comes with so I found and copied the Basic Ogre Framework
I am using Ubuntu 9.10, but have compiled Ogre 1.7 from the Ogre3D website, I am using the Netbeans 6.8 IDE with the c++ plugin.
The Basic Ogre Framework Demo App compiles and runs, but gets to the main loop where is checks to see if the Render Window is active, otherwise it calls sleep(1000);
The if statement that is checking if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isActive()) is always returning false, despite specifically setting the m_pRenderWnd->setActive(true);
From reading the forum posts related to it, nobody else is having this issue, but they are primarily using windows or Mac.
Is there issues with Ogre3D on Ubuntu, or is it possibly a problem with the autogenerated makefiles that netbeans is generating?
Have you configured the application to use the correct video drivers for your system? Since you're on ubuntu you'll need to use OpenGL. I found some drivers didn't work on some systems when using Ogre.