Nvidia Nsight 4.0 cannot profile code in OpenGL 4.3 - opengl

I am using Visual Studio 13 with Nvidia NSights 4.0. In my application I am doing a mix of different types of rendering but, for the purpose of testing the proiler, I did a simple rendering of a scene. I opened the graphics debugger and, when I open the GUI and press spacebar to capture the frame I get this error:
Cannot enter frame debugger. Nsight only supports frame debugging for
D3D9, D3D10, D3D11, and OpenGL 4.2.
Reason: glEnd
I am using a GT540m and I checked my OpenGL version and it is 4.3
If I, then, try to use the performance anaysis tool and trace OpenGL (following the instructions) I always get some percentage of CPU frames and 0 GPU frames.
I have no idea what am I doing wrong. Is there any solution to this or alternative ways to profile OpenGL?

Are you using immediate mode drawing? Ie. glBegin(..); glVertex<> ; glEnd()
From the Nsight User Guide's Supported OpenGL Functions page:
NVIDIA® Nsight™ Visual Studio Edition 4.0 frame debugging supports the set of OpenGL operations, which are defined by the OpenGL 4.2 core profile. Note that it is not necessary to create a core profile context to make use of the frame debugger. An application that uses a compatibility profile context, but restricts itself to using the OpenGL 4.2 core subset, will also work. A few OpenGL 4.2 compatibility profile features, such as support for alpha testing and a default vertex array object, are also supported.
So, replace the immediate mode rendering with newer drawing functions like glDrawArrays and glDrawElements that vertex array objects.
Better yet, create a core profile context to ensure you aren't using deprecated functionality.
My advice: stay away from outdated tutorials online and read the latest edition of the Red book (OpenGL Programming Guide), which only covers modern OpenGL.
You can also try the more basic GPUView tool that can be found in Win 8 SDK
UPDATE:
As for why 0 GPU frames are retrieved, are you sure that your GPU is on the list of supported hardware. I had the same problem where NSight was mostly working (was able to profile other aspects) but 0 GPU frames were collected. Later realized that my card was not officially supported.

Now available Nsight 4.5 RC1, works with cuda sdk 7 RC, and among its features, now support openGL 4.3 !

Related

Running OpenGL on windows server 2012 R2

This should be straightforward, but for some reason I can't make it work.
I hired a Softlayer Bare Metal Server that comes with an Nvidea Tesla GPU.
I'm remotley executing a program (openScad) that needs OpenGL > 2.0 in order to properly export a PNG file.
When I invoke openScad and export a model, I get a 0kb png file as output, a clear symptom that OpenGL > 2.0 support is not present.
In order to make sure that I was running openGL > 2.0 I connected to my server via RD and ran GlView. To my surprise I saw that the server was supporting nothing but openGL 1.1.
After a little research I found out that for standard RD sessions the GPU is not used so it makes sense that I'm only seeing openGL 1.1.
The problem is that when I execute openscad remotley, it seems that the GPU is not used either.
What can I do to successfully make the GPU capabilities of my server work when I invoke openscad remotely?
PS: I checked with softlayer support and they are not taking any responsibility
Most (currently all) OpenGL implementations that use a GPU assume that there's a display system of some sort using that GPU; in the case of Windows that would be GDI. However on a headless server Windows usually doesn't start the GDI on the GPU but uses some framebuffer.
The NVidia Tesla GPUs are marketed as compute-only-devices and hence their driver does not support any graphics functionality (note that this is a marketing limitation implemented in software, as the silicon is perfectly capable of doing graphics). Or in other words: If you can implement your graphics operations using CUDA or OpenCL, then you can use it to generate pictures. Otherwise (i.e. for OpenGL or Direct3D) it's useless.
Note that NVidia is marketing their "GRID" products for remote/cloud rendering.
I'm replying because i faced a similar problem in the past; also trying to run an application that needed openGL 4 on a windows server.
windows remote desktop indeed doesn't trigger opengl. However if you use tigervnc instead and then start your openScad application it might recognize your opengl drivers. At least this trick did it for me.
(when opening an openGL context in a program it scan's for monitors/RD's attached i pressume).
hope it helps.

Quad-buffer OpenGL for 4.2 core-profile?

I'm developing a 3D stereoscopic OpenGL app specifically for Windows 7 and nVidia Quadro K5000 cards. Rendering the scene from left and right-eye perspectives using glDrawBuffer(GL_BACK_LEFT) and glDrawBuffer(GL_BACK_RIGHT) works fine, and the 3D effect is displayed nicely.
While this works, I'd like to use nVidia's nSight Graphics local debugging. However, I get the error "Cannot enter frame debugging. nSight only supports frame debugging for ... OpenGL 4.2. Reason: glDrawBuffer(bufs[i] = 0x00000402)"
If the calls to glDrawBuffer are removed, nSight local debugging works.
Going through the OpenGL 4.2 spec, DrawBuffer is described in section 4.2.1
So, two questions:
1) Is there some other way (besides DrawBuffer) to specify BACK_RIGHT or BACK_LEFT buffers for drawing to quad-buffers?
2) Is nSight capable of doing frame-level debugging on quad-buffered stereoscopic setups? If so, how?

gl_PointCoord has incorrect/uninitialized value

I am having trouble to get valid values in my fragment-shader's gl_PointCoord variable. I use libgdx, which is a cross-platform java framework that allows to run the same application on the desktop as well on android. The shader works fine with OpenGL ES on android, only the desktop seems to not provide a correctly interpolated value but always zero.
Could this be an issue with libgdx or with the graphics driver?
NVidia Quadro 3000M
Driver 275.33
Win 7 64-bit (Service Pack 1)
libgdx-0.9.6
fyi: Did not do much research yet, but seems to be a bug in lwjgl or the driver that gl_PointCoord is only available when enabling pointsprite-mode via
Gdx.gl20.glEnable(GL11.GL_POINT_SPRITE_OES);
This is not available in OpenGL 4.2 or OpenGL ES 2.0, but seems to be required to be explicitly set on the desktop.

Can't figure out why this OpenGL program is not rendering

I compiled Joe Groff's "An intro to modern OpenGL: Hello World: The Slideshow.
I have compiled it using Mingw-w64 with freeglut, Glut 3.7 and a version that makes my own context.
However, when I run the program, the image doesn't fade back and forth like its supposed to and I can't figure out why (spent a whole day on it).
Also, I have examined most of inputs and outputs except for the shaders and cant find anything wrong, anyone have any ideas?
Most likely, your OpenGL version doesn't support shaders. Are you by any chance running in a virtual machine or via remote desktop? These tend to only support OpenGL 1.1 even if the graphics card/drivers are much more recent, and OpenGL 1.1 does not support shaders. It's also possible that if you're using an older laptop with an integrated Intel GPU that shaders are not (properly) supported.

I need openGl 2.0 but my graphic card support 1.5

I want to start with my webGL project and minimal require is my graphic card support openGL 2.0.
Problem exist because i have intel laptop with integrated intel 965 graphic media accelerator and driver is up to date and it support openGL 1.5.
Is there any solution how to update my graphic carf to support 2.0? Is this possible?
Okay. just stay patient actually because ANGLE is coming. It seems to me that your hardware is able to run directX 9 and ANGLE is a project from google to allow webgl support from directX. But as the others say, you can't upgrade opengl drivers just like that. Or you could try MESA in the firefox build.
For more information, see Learningwebgl.com.
Sadly no. With a little more effort you can still develop against opengl 2.0 but you'll need to use another machine (or just buy a better graphics card) to test anything 2.0 specific (pixel shading for instance).
Ok, that's not entirely true. You could download the mesa library and compile it for win32 and get some of the opengl 2.0 functionality emulated in a software renderer but it would be very slow.
It's possible that updating drivers might help some, but probably won't make that jump. Otherwise, you could use something like Mesa3D, which does the rendering in software. It can be slow, but does support up through OpenGL 2.1 (including shaders), if memory serves.
If there's no other way, you could try http://www.mesa3d.org/ . I haven't followed this project for quite some time, but apparently they currently provide OpenGL 2.1 software rendering.
I just updated drivers my HP 6710b with Mobile Intel 965 Express Chipset -- and now WebGL is working in Firefox 4 RC1!
I put instructions on this site.
It is not pretty but it works!
angleproject is your best bet. Check out which exact 965 card you have from here (search for 'intel gma' in wikipedia), which also lists the OpenGL support version for these cards. It might take a couple of months though before you can use angleproject to accelerate your WebGL application.
I have a slightly newer 4500MHD, and I have the same problem. WebGL works on Firefox 3.7a4, but fails in the later versions a5 and a6. I had to use the latest drivers from Intel which claim to support OpenGL 2.0. The Microsoft drivers don't ship with OpenGL support.
I have reported a issue in the Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=570474. It looks like support for Intel cards might be fixed by the time the releases are in beta.