Pages: 1 2 »
  Print  
Author Topic: GL Lighting  (Read 8408 times)
Offline (Male) RetroX
Posted on: July 19, 2010, 07:35:57 pm

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I could spend several hours looking across the internet to find an answer to my question, but maybe someone here knows an answer.

http://dl.dropbox.com/u/6125077/other/gltest.tar.gz

Why isn't the lighting working? :(

Is it SFML, or is my code wrong?
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) retep998
Reply #1 Posted on: July 19, 2010, 08:06:00 pm

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
Like yo?
are you using C instead of c++?
and like wheres the headers?
whats with everything being all weird?
like really retro?
wtf?
Logged
Offline (Male) RetroX
Reply #2 Posted on: July 19, 2010, 08:27:38 pm

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I forgot that I used my header for it. :/

It should compile, now.

And .cc is C++.
« Last Edit: July 19, 2010, 08:30:49 pm by RetroX » Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) retep998
Reply #3 Posted on: July 19, 2010, 08:33:37 pm

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
you use something other than regular sfml.
where are your sfml namespaces?
all your shit is weird.
I ain't touching that fucking shit with a 50 foot pole until you can learn to use normal c++ with .cpp and .h files, using standard libraries, and the ability to be compiled in both mingw and vc++ with ease.
Logged
Offline (Unknown gender) score_under
Reply #4 Posted on: July 20, 2010, 09:52:29 am

Member
Joined: Aug 2008
Posts: 308

View Profile
I guess he means you're writing in C-style, when you should be writing in C++-style. Also, your indentation is messed up.
Logged
Offline (Male) RetroX
Reply #5 Posted on: July 20, 2010, 09:54:51 am

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I updated the file.

I made a header with typedefs for SFML classes for my ease of use.  I forgot that I included them, and I updated the file to take them out.

.cc and .hh are completely standard C++ file extensions.  .h isn't even a C++ extension; .hpp is.  .c and .h can be used for C++, but it's not common.

And score_under, how is the indentation messed up?  It's two spaces, and I specifically checked for tabs to make sure that it would remain constant.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) score_under
Reply #6 Posted on: July 22, 2010, 09:42:21 am

Member
Joined: Aug 2008
Posts: 308

View Profile
And score_under, how is the indentation messed up?  It's two spaces, and I specifically checked for tabs to make sure that it would remain constant.
I'm fairly sure you're the only person in the world who thinks that this:
Code: [Select]
while(doSomething())
  {
  doSomethingElse();
  }
is prettier than this:
Code: [Select]
while(doSomething())
{
  doSomethingElse();
}
Logged
Offline (Female) IsmAvatar
Reply #7 Posted on: July 22, 2010, 10:22:52 am

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
I'm with him. Indentation belongs to the block that follows the conditional. Very much like indentation-based languages, like Python. You indent every line belonging to the conditional. For example, consider if you wrote it without the block brackets. You'd still indent the line.
Logged
Offline (Male) RetroX
Reply #8 Posted on: July 22, 2010, 12:41:16 pm

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I'm fairly sure you're the only person in the world who thinks that this:
Code: [Select]
while(doSomething())
  {
  doSomethingElse();
  }
is prettier than this:
Code: [Select]
while(doSomething())
{
  doSomethingElse();
}
Almost every programmer that I know codes like the first one except for the ones here.  Although, I kind of agree with you, I've been stuck like this for a long time. >_>
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Female) IsmAvatar
Reply #9 Posted on: July 22, 2010, 02:15:40 pm

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
Quote
Almost every programmer that I know codes like the first one except for the ones here.
I code like the first one. See LateralGM. In C and GML, I usually code like this, though:

Code: [Select]
while (doSomething()) {
  doSomethingElse();
}
Logged
Offline (Male) kkg
Reply #10 Posted on: July 23, 2010, 02:57:13 am

Member
Location: Australia
Joined: Nov 2009
Posts: 84
MSN Messenger - kamikazigames@gmail.com
View Profile Email
and then the newprogrammerfag comes in and writes like this:
Code: [Select]
while (doSomething())
  {
      doSomethingElse();
  }
Logged
PC: Core i7-2600 @ 3.8ghz | 4x 4gb G.Skill RipjawZ DDR3-2000 | GTX580 | Win7 x64
Time is the greatest teacher, however it kills every single one of its pupils.
Offline (Female) IsmAvatar
Reply #11 Posted on: July 23, 2010, 08:02:19 am

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
Oh god, I hate that.
Logged
Offline (Male) RetroX
Reply #12 Posted on: July 23, 2010, 02:30:49 pm

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Ism, I hate your method worse. :/

Although what's the worst is 8-space tabs.

And now that we're talking about programming styles, is there anyone who has the slightest idea about what the problem that I'm having is? :/
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) score_under
Reply #13 Posted on: July 23, 2010, 03:44:26 pm

Member
Joined: Aug 2008
Posts: 308

View Profile
Although what's the worst is 8-space tabs.
Except in Assembler, when it's sometimes acceptable.

Also, my tabs are set to width 2. It really picks up on those people who mix tabs and spaces, most programmers seem to use 4 space tabs nowadays ;)
Logged
Offline (Female) IsmAvatar
Reply #14 Posted on: July 23, 2010, 06:20:00 pm

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
Quote
Ism, I hate your method worse. :/
At least my method has some logic behind it.
Logged
Pages: 1 2 »
  Print