OpenGL With Or Without SDL

Sage
Posts: 1,066
Joined: 2004.07
Post: #1
Is there a difference, code-wise or performance-wise, to using OpenGL with SDL? I currently program with SDL because I like the input code and I'm trying to learn OpenGL. Unfortunately I cannot find many good sources of SDL OpenGL information or tutorials so I wondered if I could use any OpenGL sites and just put the code somewhere in the program. Would this work or does SDL have its own way of using OpenGL that I would have to learn?
Quote this message in a reply
Moderator
Posts: 434
Joined: 2002.09
Post: #2
I believe that once SDL has set up the context to draw in, you just do your own thing in it.

I was intending to give this a go myself a few months ago but I have been too pressed for time. But I think if you look inside the sample SDL OpenGL app (should be available by starting a new project and selecting one of the SDL project templates) you will quickly see where SDL ends and OpenGL begins.

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Sage
Posts: 1,066
Joined: 2004.07
Post: #3
So after I set up the context using SDL, I can code as I would using OpenGL by itself?
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #4
Correct, assuming the context you setup is an OpenGL context.
Quote this message in a reply
Post Reply