🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

glDrawElements doesn't draw anything in nVidiaNsight

Started by
8 comments, last by Alberth 2 years, 5 months ago

I'm having a large scale project, where I ported some stuff to OpenGL. I can't post a sample code here, as it's from a large code base.

But I'm using nVidiaNsight, which I don't see any mesh rendered when I point to glDrawElements.

That's the exact behavior that I get when I run the application... black screen.

I don't know what's wrong or how to debug more into the problem.

Game Programming is the process of converting dead pictures to live ones .
Advertisement

Make it smaller, and smaller, and smaller, and … until it works. Then figure out why the last step fixed the problem.

Anything that you don't understand is too complex by definition. The only way to get forward is to reduce the problem at hand until it becomes understandable.

Don't forget what gets drawn is a result of a long list of pipeline states which are used during the actually dispatched draw call. So it could be a whole slew of reason why nothing shows up on screen. The draw call is actually dispatched so saying it didn't draw anything is misnomer, just because you don't see it doesn't mean the draw did not happen. Few guesses:
-Draw State
-Shader bug
-Transform not correct.
-No output rendertarget bound at the time of draw.

@cgrant

Thanks so much for your answer.

I have drawn a simple triangle, when I remove those DrawElements calls to the 8 meshes there, I get the triangle drawn.

While drawing the triangleAND the 8 meshes, the triangle disappears and its not drawn anymore..

I really don't know why drawing those 8 meshes mess up the whole pipeline.

I would narrow it down to those items

-No output rendertarget bound at the time of draw.
-Shader bug
-Draw State

How would I check those things, but first do you have an interpretation about the above scenario


Game Programming is the process of converting dead pictures to live ones .

When I launch the nVidiaframe debugger I get the following too

2,Target,NVIDIA Nsight Graphics,"The following incompatibilities were seen during capture: glTexEnvi, wglCreatePbufferARB, wglDestroyPbufferARB, wglGetCurrentReadDCARB, wglGetPbufferDCARB, wglMakeContextCurrentARB "

But the triangle works.. alone

Game Programming is the process of converting dead pictures to live ones .

Perhaps it's time to make a minimalist code, so that you can post it on GitHub. Please?

nVidia nsight shows eglSwapBuffer = false

but at code level its not false

how come ?

Game Programming is the process of converting dead pictures to live ones .

I have now 8 draw calls, which in nvidia night 4 of them draws a mesh.. but nothing appears on the screen..

Image
Game Programming is the process of converting dead pictures to live ones .

AhmedSaleh said:
I have now 8 draw calls, which in nvidia night 4 of them draws a mesh.. but nothing appears on the screen..

Repeatedly telling us “it doesn't work” has very little use. It gives no information for us what you're doing or what happens (or doesn't happen) in the entire process from code to the black screen.

As taby suggested, make a minimal non-working example and put it at a public place like github, so people can have a look, point out bugs in your code that you may be missing, do experiments, etc.

This topic is closed to new replies.

Advertisement