L
L
Legebocker2018-01-14 18:34:55
C++ / C#
Legebocker, 2018-01-14 18:34:55

How to display images in OpenGL and a question about compiling shaders?

I'm not going to say so much crap, I'll get straight to the point.
I gave up on those lessons, because they themselves write what does not work. I settled on textures, namely about imposing them on shapes. I do not need it, so that the question arose differently. How to display images in OpenGL?
So here is the question(s).
1. What libraries are needed to display pictures? (I clearly understood that OpenGL only works with byte arrays, not with pictures. Also, one library had to be built through CMake, which I don’t know how. As far as I remember, the path must be put in a folder with some txt-shnik related to Cmake.)
2. How to display pictures? (It is desirable to have a lesson so that I understand. I'm a stupid person. I need OpenGL only for a library for displaying sprites for the game)
3. How to program pictures? (Ahem, the question is not very correct. I'm wondering how to connect them with the code so that there is a picture for a certain function, an animation is triggered when a button is pressed, etc. etc.
Oh yes. Question about shaders. I know that they are compiled in the process, not in the process of compiling the project. So. After I change the shaders, it does not change them at all. I have to create a virgin project, throw all the code there, and only then does it start work.How to fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andryukha, 2018-01-14
@syrov

Sounds like you'd be better off trying out the 2d game library, of which there are many. If the goal is to learn OpenGL, then there are many examples and they all work in a strange way :). I was once fond of OpenGL and these lessons helped me a lot , and there are many books of which.

A
Alexander Taratin, 2018-01-15
@Taraflex

https://github.com/glcoder/gl33lessons

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question