glsl u_time

Started by
12 comments, last by MikeCyber 4 years, 3 months ago

Yes I'm having a look at:

https://learnopengl.com/Getting-started/Textures

Can someone tell me how to debug this with nsight?

Thanks

Advertisement

Do not distract you with these things, they keep you from understanding what's going on. Step thorugh that tutorial from the very beginning. Also grab the book “OpenGL Programming Guide 9th Edition” for a much more comprehensive text and many examples and a small framework to play them through. Start at page 1. Don't copy things together you find on the internet. They are almost all deprecated anyway and only good to demonstrate a principle. But it is the principle you must understand at first, not the contents of variables or loop counters.

Understand how application and shaders work together. How to configure a shader pipeline, how to pass stream data like vertices and indices to it and set uniforms. For that you need to be somewhat proficient in C or basic C++, know how to wield pointers and handle memory. When you're through (may take some time) you'll grin about the misplaced use of a C function in a shader. It might be that a book or course of C or C++ may be another good thing.

You said to place it in the main function, while I've never looked at shaders before. And no, not enough time to buy books etc.

I still don't know why the above shader code snippet works on some places but not mine, hence I want to debug the shader with nsight which seems to be able to set breakpoints on other code.

This topic is closed to new replies.

Advertisement