Hello, I am looking for a good website to learn graphics with C++? And could someone even tell me what is the best to start with, i've tried something with OpenGL, but I need something to come with Win32 desktop apps
GDI, GDI+, Direct2D if you are not thinking of doing any graphics intensive work and just need a UI design.
DirectX, OpenGL, Direct2D if you want to learn graphics for things such as gaming and scientific applications - modern hardware.
I would highly suggest you stay away from the the very low level librarys like GDI/GDI+, DirectX, OpenGL, ect when you are just starting out with learning graphics programming or GUI programming.
Instead go for something that is a lot simple to learn and get your head around first. Once you get the general idea behind graphics programming or GUI programming you can then start to tackle the beasts of DirectX and OpenGL.
For example here is a few good choices for each of the subects.
Those are only a few and there are many more out there. But it gives you a place to start and do some research. Also I would like to note that the graphics libraries I mentioned are only for 2D and if you want to do 3D graphics you will need to learn OpenGL to do so.
i personally would suggest SFML (2.0) as i tried SDL and had trouble with it however that could be because i didn't look at video tutorials as i did with SFML (i used coding made easy c++ sfml 2.0 tutorials). SDL was mainly used in the C language however SFML seems to be better associated with C++ so it depends on which language you are using
I learnt OpenGL long before I used anything else. Its really not that hard, and the only reason that people would use other libraries is because of a few features they add that OpenGL doesn't add (being a graphics-only library), such as (but not limited to):
- Image Loading
- Operations for initializing a window
- Sound
- Keyboard and Mouse input
However, there are plenty of cross-platform libraries out there for doing just those tasks, such as SOIL for loading images, GLFW or GLUT for window creation and user input, and OpenAL or IrrKlang for sound.
The only real disadvantage to OpenGL is that often somethings require a bit of knowledge of linear algebra, and require a few more lines of code to do.
The only real disadvantage to OpenGL is that often somethings require a bit of knowledge of linear algebra, and require a few more lines of code to do.
I also wouldn't say using openGL compared to something like SFML is "only a few more lines of code". Depending on the size of the code it is a a lot more lines of code and more importantly a lot more work and designing.
The only time where I could see it not really making much of a difference is in larger projects and small "example/demo" projects (Like drawing a circle on screen, or something along those lines). But larger projects most likely wouldn't use a library like SFML or SDL.
The hardest hit would probably be Indie projects which are small to mid sized projects and if they used straight openGL the development time would go up quite a lot.
Most of the time for small 2D projects like people do on this forum openGL really isn't the best option available. Specially when the wrappers like SFML and SDL can do almost anything you need to do with much less work (And for the times you do need openGL you can easily use it with both libraries). For small games I see no real incentive to use openGL over SFML or SDL.
If you are on windows yes it can use GDI and DirectX for the back end but I don't see your point... I never mentioned anything about the back end of openGL (At least I don't think I did).
Most of the time for small 2D projects like people do on this forum openGL really isn't the best option available. Specially when the wrappers like SFML and SDL can do almost anything you need to do with much less work (And for the times you do need openGL you can easily use it with both libraries).
From what I'm reading you're implying that SDL is a OpenGL wrapper.
Like Disch said it is a wrapper around openGL. Also the part you quoted was pointing out that SDL and SFML provide contexts which you can use openGL with.