I am in love with sfml.

Pages: 1234
closed account (N36fSL3A)
How did you switch to OpenGL after SDL?
What do you mean? I just followed Youtube/Lazyfoo tutorials?

Or if you're talking about what made me do it, I reached the end of the SDL tutorials on Lazyfoo.net.
Lumpkin wrote:
Maybe because text doesn't show voice?

Actually words like "voice" and "tone" are often used to describe literary text.

apparently people don't read it the same way I do

They don't, and that's a good thing to remember. Lachlan Easton's advice was good; try to be specific and deliberate in what you say.

Disch wrote:
It made sense to me, Lumpkin.

Can you explain it to me? Because to me it sounds like "I liked X until Y came along" which implies that X and Y are for the same purpose, but Y is preferred; but that doesn't make sense, because OpenGL isn't usually used for 2D rendering and SDL (alone) isn't usually used for 3D rendering.
closed account (S6k9GNh0)
So, instead of implying that you replaced SDL with OpenGL, you could say, "I used SDL for rendering, then moved on to using OpenGL directly with SDL" or maybe even, "I used to use SDL 2D for rendering, now I use OpenGL" which implies that you replaced functionality, with something else that can actually replace that functionality.

Words do not convey implicit meaning that well over the internet. I can't assume that you meant one thing based on your habits of pasting them or else I'd probably make wrong assumptions. Especially for others who are trying to learn and take everything that's said to heart, it's imperative that things be said with correct wording and meaning.
closed account (N36fSL3A)
Actually words like "voice" and "tone" are often used to describe literary text.
I know, but I wasn't using it that way, and you know that. :P

OpenGL isn't usually used for 2D rendering
I'm confused, because a lot of topics I've looked up before trying to learn OpenGL told me to start off with something 2D?
I was not aware that 2D rendering with OpenGL was so rare compared to it's big brother 3D.
closed account (S6k9GNh0)
OpenGL can be used for 2D accelerated rendering, it's just not common nor convenient. Either way, there are other issues with saying one is a replacement for the other.
Last edited on
Oops, I meant raw OpenGL. Of course SDL 2.x as well as SFML use OpenGL for 2D rendering, but I've never seen anyone use it directly in application code. You could easily do so though. It's just that 2D rendering is much faster than 3D, even with slow operations like the bit blitting that SDL 1.x did, so it's not usually necessary to accelerate it with OpenGL. Doesn't hurt, though.
closed account (jwkNwA7f)
Why is using OpenGL for 2D so rare? That's what I use.
Because there are loads of much easier and more effective alternatives?
closed account (N36fSL3A)
May not be commmon, but this guy did it http://www.youtube.com/results?search_query=Tantere

A comment on one of his videos, he says he uses pure OpenGL for rendering and SDL for only for window handling.
Can you explain it to me? Because to me it sounds like "I liked X until Y came along" which implies that X and Y are for the same purpose, but Y is preferred;


It can mean that. Or it might just mean what it actually says... that he liked X until Y came along. X doesn't necessarily have to have anything to do with Y... the appearance of Y might have just adjusted his mindset toward unrelated things. Or the appearance of Y might have been completely unrelated and he only mentioned it as a reference point in time.

"I liked scarey movies until I met my girlfriend" makes perfect sense. Maybe having this girlfriend changed his perspective. Or maybe his girlfriend didn't like scarey movies and so he grew out of them. Or maybe his girlfriend was TOO into scarey movies and it turned him off to them. Or maybe it's one of a million other possible explanations.

but that doesn't make sense, because OpenGL isn't usually used for 2D rendering and SDL (alone) isn't usually used for 3D rendering.


Even if it meant what you thought it meant.... it makes perfect sense. And yes, OpenGL is frequently used for 2D rendering. I've used it for 2D rendering on more than one occasion. I've even used it to render a single textured quad where each texel was generated dynamically every frame... no translations... no 3D effects... no nothing... just a canvas for pixel plotting.

There's a whole thing called "orthogonal projection". It's used to create a rendering environment which lacks depth perspective (ie: 2D rendering). GLU even has a series of functions to build orthogonal matrixes. They probably wouldn't have done that if 2D rendering was as rare as you seem to think.




If you guys are going to be some kind of amateur literary analyst, don't get upset at the author when you analyzed their writings incorrectly. There's a full page in this thread now of people giving Lumpkin shit because they read stuff into his post that he didn't write.

You guys are putting words in his mouth and then ganging up on him because you don't like the words you gave him.

It's getting compounded by gang mentality. A few people decided they don't like Lumpkin and now other people are jumping on board. It's bully culture. I'm very disguisted by it. This is like the 3rd thread I've seen deteriorate into this... and in none of them did I see Lumpkin do anything even slightly wrong.



My advise to Lumpkin: This situation sucks, and isn't your fault... but all the same I would stay out of the lounge for a while. Give these jerks time to cool off. If it's any consolation I think I'm going to stay out of the lounge for a while as well.

My advise to everyone else: Chill the fuck out. This is embarrassing.
Last edited on
^+1
closed account (jwkNwA7f)
^+1 again :D
ahh Disch, the voice of lounge calm and reason. +1
> t's because they use only template classes, which have to be defined when you use them
> and thus don't use source files (which also means you only pay for what you use)
I fail to see how using *.cpp is `paying for what you don't use'.
And my reason to abandon CImg.h and move on openCV was because I was paying a lot in compilation time
http://cimg.sourceforge.net/reference/group__cimg__overview.html
$ time g++ foo.cpp -c
real    0m6.032s
user    0m5.843s
sys     0m0.183s

$ time g++ foo.cpp -c -O2
real    0m22.930s
user    0m22.493s
sys     0m0.310s



http://xkcd.com/303/
Last edited on
ne555 wrote:
I fail to see how using *.cpp is `paying for what you don't use'.

Because the .cpp files have to be linked in with the application. Admittedly it doesn't make a big difference, but that's why I made that a side-note and not a central point.

@Disch
I genuinely didn't understand what he was saying (and still don't). You need to use something like SDL (or WinAPI or GLX but I wouldn't recommend using those directly) to make a context for OpenGL anyway, so why would using OpenGL make you stop using SDL?

Anyway; I think he just has a habit of saying things without really thinking, and it causes confusion which he then tries to divert by retroactively changing what he said. You are right, though, that we sometimes gang up on him. I see it as well and while I would say that I'm usually not overly discourteous to him (I have been mean to him at least once because he irritated me, and I'm sorry for that), I often start it when I'm the first person to respond to his posts and others jump on the bandwagon. Saying that, he should learn to be more deliberate and think about what he says before he says it, because he does have a habit of making non-sequiturs. I know he's young, but then maybe he shouldn't be on a forum about a technical subject. Although I came here when I was young, and from what I recall I annoyed a few people by dragging threads off-topic, and no-one really ganged up on me. Maybe you're right, maybe we are being unfair. He still ought to learn, though.

@Lumpkin
I want to apologise for any times I've been mean to you, but please make an effort to be more humble (edit: or, should I say, accepting of criticism) and think about what you say before you say it rather than just posting on an impulse.
Last edited on
I wrongfully though that when you linked several *.o the final executable would only have the necessary symbols, not all of them.
Lets say that we have

a.o:
0000000000000000 T a()
0000000000000001 T b()
0000000000000002 T c()

m.o:
0000000000000000 T m()
0000000000000001 T n()

main.o:
                 U x()
0000000000000000 T main

x.o:
                 U a()
0000000000000000 T x()
main() calls x() that calls a(), all the other functions are empty.

So now lets link all these object files and look at the executable (fat removed)
$ g++ *.o -o object.bin
$ nm -C object.bin
0000000000400580 T a()
0000000000400581 T b()
0000000000400582 T c()
0000000000400584 T m()
0000000000400585 T n()
0000000000400588 T x()
0000000000400480 T main
so it has all the functions.

However, if instead an static library is created
$ ar rcs lib.a a.o m.o x.o
$ g++ main.o lib.a -o lib.bin
$ nm -C lib.bin
0000000000400588 T a()
0000000000400589 T b()
000000000040058a T c()
0000000000400580 T x()
0000000000400480 T main
that does not have the unused functions m() and n(), but it does have b() and c().

If I understand it correctly, the undefined symbols in main.o are found in x.o so all the object file is imported. x.o also has undefined symbols, found in a.o, and again all the object file is imported.
However m.o is unneeded and thus discarded. So the dependencies are resolved at object file level instead of function level.


The thing is, we don't need the whole a.o, just the a() definition. If a rule like `only 1 function per source file' were followed, then we'll end with just the functions that we are actually using.
So ¿is there a way to make the tool behave as such?
@ret
openGL is pretty advanced topic for starters don't you think? :p
@Ne55 You'll probably get better responses if you post an actual thread for the question.
closed account (jwkNwA7f)
@uk marine what do mean? I'm not a starter.
Pages: 1234