And? Nobody is denying that. Does that mean you are cool with a slew of compiler warnings because you know that behind-the-scenes it's still getting your shit done correctly?pubby8 wrote:The whole reason compiler complains is because not having a default label is identical to a "default: break;" label!TheBuzzSaw wrote:According to who? Frankly, I do stuff like that all the time to prevent the compiler from blasting out warnings: "YOU DIDN'T ACCOUNT FOR EVERY POSSIBILITY! WE'RE ALL GONNA DIE!" If you know you haven't hit every option, you really should have the default there, even if it doesn't do anything.pubby8 wrote:Which would look cleaner in switch. I dunno, it's just style choice, however you really should avoid "default: break;" - it is bad practice.
Falco's (Lame-Ass) OpenGL Projects
Moderator: Coders of Rage
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
Re: Falco's (Lame-Ass) OpenGL Projects
Most compiler warnings are stupid, and it makes more sense to disable the stupid ones rather than write code around them.GyroVorbis wrote:And? Nobody is denying that. Does that mean you are cool with a slew of compiler warnings because you know that behind-the-scenes it's still getting your shit done correctly?pubby8 wrote:The whole reason compiler complains is because not having a default label is identical to a "default: break;" label!TheBuzzSaw wrote:According to who? Frankly, I do stuff like that all the time to prevent the compiler from blasting out warnings: "YOU DIDN'T ACCOUNT FOR EVERY POSSIBILITY! WE'RE ALL GONNA DIE!" If you know you haven't hit every option, you really should have the default there, even if it doesn't do anything.pubby8 wrote:Which would look cleaner in switch. I dunno, it's just style choice, however you really should avoid "default: break;" - it is bad practice.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
Clearly demonstrating your lack of experience here...pubby8 wrote:Most compiler warnings are stupid, and it makes more sense to disable the stupid ones rather than write code around them.GyroVorbis wrote:And? Nobody is denying that. Does that mean you are cool with a slew of compiler warnings because you know that behind-the-scenes it's still getting your shit done correctly?pubby8 wrote:The whole reason compiler complains is because not having a default label is identical to a "default: break;" label!TheBuzzSaw wrote:According to who? Frankly, I do stuff like that all the time to prevent the compiler from blasting out warnings: "YOU DIDN'T ACCOUNT FOR EVERY POSSIBILITY! WE'RE ALL GONNA DIE!" If you know you haven't hit every option, you really should have the default there, even if it doesn't do anything.pubby8 wrote:Which would look cleaner in switch. I dunno, it's just style choice, however you really should avoid "default: break;" - it is bad practice.
I really miss arguing with avansc and people who are actually intelligent over whether the trivial little things took more clock cycles at a low level or used more memory. Arguing based on compiler warnings and style is honestly below me. I'm done.
- JaxDragon
- Chaos Rift Junior
- Posts: 395
- Joined: Mon Aug 04, 2008 2:03 pm
- Current Project: Kanoba Engine
- Favorite Gaming Platforms: PS3, PC
- Programming Language of Choice: C++
- Location: Northeast NC
Re: Falco's (Lame-Ass) OpenGL Projects
@op, Im actually kind of interested in these kinds of things. I always enjoy reading schoolwork code, I like to see what it may be like when I get to college. And this kind of code is usually a good reference, especially with all the commenting and whatnot.
@drama ...really?
@drama ...really?
Re: Falco's (Lame-Ass) OpenGL Projects
frlz. It be all elysian shore up in here.JaxDragon wrote:@op, Im actually kind of interested in these kinds of things. I always enjoy reading schoolwork code, I like to see what it may be like when I get to college. And this kind of code is usually a good reference, especially with all the commenting and whatnot.
@drama ...really?
Re: Falco's (Lame-Ass) OpenGL Projects
People thought I say stupid thingspubby8 wrote:Most compiler warnings are stupid, and it makes more sense to disable the stupid ones rather than write code around them.GyroVorbis wrote:And? Nobody is denying that. Does that mean you are cool with a slew of compiler warnings because you know that behind-the-scenes it's still getting your shit done correctly?pubby8 wrote:The whole reason compiler complains is because not having a default label is identical to a "default: break;" label!TheBuzzSaw wrote:According to who? Frankly, I do stuff like that all the time to prevent the compiler from blasting out warnings: "YOU DIDN'T ACCOUNT FOR EVERY POSSIBILITY! WE'RE ALL GONNA DIE!" If you know you haven't hit every option, you really should have the default there, even if it doesn't do anything.pubby8 wrote:Which would look cleaner in switch. I dunno, it's just style choice, however you really should avoid "default: break;" - it is bad practice.
I'm not hating just through my entire OpenGL book I've never seen a depth distance as far apart as -100,10000GyroVorbis wrote:Haha, what? Why you hating?N64vSNES wrote:Wut?Code: Select all
glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -100, 10000);
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
Out of curiousity when people here are developing in OpenGL do you ever use gltools. I use it a fair bit when I don't want to write custom shaders. It comes with stock shaders that would be enough for most basic ogl projects. Also it allows you to stay current because it uses the core implementation so there's no use of deprecated functions.
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Falco's (Lame-Ass) OpenGL Projects
eatcomics wrote:frlz. It be all elysian shore up in here.JaxDragon wrote:@op, Im actually kind of interested in these kinds of things. I always enjoy reading schoolwork code, I like to see what it may be like when I get to college. And this kind of code is usually a good reference, especially with all the commenting and whatnot.
@drama ...really?
Last edited by GroundUpEngine on Fri Feb 11, 2011 10:41 am, edited 1 time in total.
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
You're missing the point. It's a warning, not an error. It is good to have one because not having one generally implies you have not explicitly declared what happens if no match is found. It's not bad to have "default: break;" because it tells other programmers on your team, "If no matches are found, I acknowledge that I want nothing to happen." Having nothing is bad practice because it implies, "I assumed it would always hit one of the upper possibilities".pubby8 wrote:The whole reason compiler complains is because not having a default label is identical to a "default: break;" label!
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
Personally, I'm not a fan. It tries to mimic the old immediate mode for comfort's sake, and I have long since moved onto using my own VBO classes. As far as stock shaders go, those take like 2 seconds to write, and I have a nice Shader class. ^_^MrDeathNote wrote:Out of curiousity when people here are developing in OpenGL do you ever use gltools. I use it a fair bit when I don't want to write custom shaders. It comes with stock shaders that would be enough for most basic ogl projects. Also it allows you to stay current because it uses the core implementation so there's no use of deprecated functions.
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Falco's (Lame-Ass) OpenGL Projects
+1TheBuzzSaw wrote:and I have long since moved onto using my own VBO classes. As far as stock shaders go, those take like 2 seconds to write, and I have a nice Shader class.
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
I agree about the VBO's and shaders, but for ppl with less experience i think it's a great idea. And isn't using it for comfort's sake the point, what I mean is that if i'm writing a quick app I don't want to have to go and write boiler plate code every time. For a larger project you're 100% right, and I prefer it the same way.TheBuzzSaw wrote:Personally, I'm not a fan. It tries to mimic the old immediate mode for comfort's sake, and I have long since moved onto using my own VBO classes. As far as stock shaders go, those take like 2 seconds to write, and I have a nice Shader class. ^_^MrDeathNote wrote:Out of curiousity when people here are developing in OpenGL do you ever use gltools. I use it a fair bit when I don't want to write custom shaders. It comes with stock shaders that would be enough for most basic ogl projects. Also it allows you to stay current because it uses the core implementation so there's no use of deprecated functions.
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
- TheBuzzSaw
- Chaos Rift Junior
- Posts: 310
- Joined: Wed Dec 02, 2009 3:55 pm
- Current Project: Paroxysm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
Well, but I'm referring to quick projects too. My classes make it so easy to set stuff up that I just use them instead of GLTools even for small quick ideas.MrDeathNote wrote: I agree about the VBO's and shaders, but for ppl with less experience i think it's a great idea. And isn't using it for comfort's sake the point, what I mean is that if i'm writing a quick app I don't want to have to go and write boiler plate code every time. For a larger project you're 100% right, and I prefer it the same way.
I should write the OpenGL SuperQur'an.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Falco's (Lame-Ass) OpenGL Projects
Looks like you need a book that covers a broader spectrum.N64vSNES wrote:I'm not hating just through my entire OpenGL book I've never seen a depth distance as far apart as -100,10000GyroVorbis wrote:Haha, what? Why you hating?N64vSNES wrote:Wut?Code: Select all
glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -100, 10000);
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Re: Falco's (Lame-Ass) OpenGL Projects
So you are saying that it is good or bad practice? :sYou're missing the point. It's a warning, not an error. It is good to have one because not having one generally implies you have not explicitly declared what happens if no match is found. It's not bad to have "default: break;" because it tells other programmers on your team, "If no matches are found, I acknowledge that I want nothing to happen." Having nothing is bad practice because it implies, "I assumed it would always hit one of the upper possibilities".
And on topic of stupid warnings, the "/*" inside comment warning is perhaps the most annoying of them all (although strict aliasing rules is close second)