SDL use opengl as i saw.
So this is another opengl which is used with sdl,or it is the same as
the OPENGL.
hmm i can not expain it well.
With less words i mean that opengl work always with sdl or can work and alone.
Also if work alone is same as work with sdl.
(for example the SDL_GL_SetAttrubute() works with sdl.So this will be the same if work alone?)
Well, you can use SDL to initialize and set up the OpenGL context in a platform-independent way. That's about it. SDL will not help you to load and draw textures and such things. You will have to use the OpenGL functions for that. SDL_GL_SetAttrubute is only useful if you use OpenGL.
OpenGL offers a way to communicate with your graphics card (hardware rendering), similar to DirectX. However, it needs a context (a window) in which to display things. SDL provides this context, as well as message (keyboard/mouse/joystick) handling.
SDL does not need OpenGL, but OpenGL needs something like SDL.
you use SDL/OpenGL for a simple pretty much platform independent window setup/basic input instead of Windows.h for example if your on windows. Im using this alot if you have any questions just ask!
What is the reason you want to use OpenGL? Are you sure you want to learn OpenGL now? You seems to struggling with SDL and learning OpenGL is much more difficult IMO.
You can learn them together. It's just that OpenGL is a whole different library that is not as simple as SDL. It looks like you still have a lot to learn and start learning yet another library will not make things easier. I'm not saying you should not learn OpenGL, but do you know why you want to learn OpenGL? If you do, and you think that the SDL graphic functions is not good enough, then go ahead and learn OpenGL.