--- Log opened Thu Aug 16 00:00:43 2012 |
00:04 | | You're now known as TheWatcher[zZzZ] |
00:41 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
00:47 | | io|sick [Alexandria@Nightstar-e67f9d08.com] has quit [[NS] Quit: Lost terminal] |
00:50 | | Derakon[AFK] is now known as Derakon |
01:01 | | iospace [Alexandria@Nightstar-e67f9d08.com] has joined #code |
01:49 | | Orthia [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
02:12 | | Derakon is now known as Derakon[AFK] |
02:34 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited] |
02:45 | | celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
02:53 | | celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code |
04:02 | | Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
04:10 | | Kindamoody[zZz] is now known as Kindamoody |
04:13 | | Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
04:27 | | Derakon[AFK] is now known as Derakon |
04:49 | | iospace is now known as iospacedout |
04:56 | | Derakon is now known as Derakon[AFK] |
05:16 | | Derakon[AFK] is now known as Derakon |
05:46 | | celmin [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code |
05:49 | | celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
05:49 | | celmin is now known as celticminstrel |
05:52 | | Kindamoody is now known as Kindamoody|gaming |
06:07 | < Tarinaky> | rms: That's why I said 'typically'. |
06:41 | | Derakon is now known as Derakon[AFK] |
07:38 | | You're now known as TheWatcher |
07:38 | | McMartin_ [mcmartin@Nightstar-99166553.pltn13.sbcglobal.net] has joined #code |
07:40 | | McMartin [mcmartin@Nightstar-7d790d29.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
08:00 | | Kindamoody|gaming is now known as Kindamoody |
08:22 | | Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
08:24 | | Kindamoody is now known as Kindamoody|out |
08:39 | | celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] |
09:20 | | Nemu [NeophoxProd@Nightstar-bece4b0d.asahi-net.or.jp] has quit [Ping timeout: 121 seconds] |
09:57 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
10:05 | | RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
10:39 | | Kindamoody|out [Kindamoody@Nightstar-05577424.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
10:39 | | Kindamoody|out [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code |
10:40 | | mode/#code [+o Kindamoody|out] by ChanServ |
11:05 | | iospacedout is now known as iospace |
13:08 | | iospace is now known as iofficespace |
13:40 | | * Tarinaky tries to remind himself of how to actually do stuff with OpenGL >.< |
13:41 | | ShellNinja [abudhabi@Nightstar-34271be2.adsl.inetia.pl] has quit [Connection closed] |
13:43 | | abudhabi [abudhabi@Nightstar-34271be2.adsl.inetia.pl] has joined #code |
13:43 | | abudhabi is now known as AnnoDomini |
14:17 | | * TheWatcher stabs Moose |
14:19 | < gnolam> | Not a good move. It'll kick you. |
14:19 | <@TheWatcher> | Better than it biting me. |
14:20 | <@TheWatcher> | møøse bites kan be pretty nasti |
14:20 | | * Tamber offers TheWatcher a pair of crossbows. Or at least, a pair of somewhat-ticked-offbows. |
14:20 | | gnolam [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has quit [[NS] Quit: Reboot] |
14:31 | | gnolam [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has joined #code |
14:36 | | * TheWatcher is victorious over his taming of email, for now. |
14:36 | < Tarinaky> | Ah! Of course! |
14:37 | | * Tarinaky can't believe he forgot that <,M |
14:37 | < Tarinaky> | that being the stuff in this book |
14:50 | | Kindamoody|out is now known as Kindamoody |
15:03 | | Nemu [NeophoxProd@Nightstar-e1d9a987.asahi-net.or.jp] has joined #code |
15:06 | < Tarinaky> | I'm having a derpy moment. |
15:06 | < Tarinaky> | The OpenGL Super Bible suggests using three vectors to define a position and orientation. A dispacement, a vector pointing forwards and a vector pointing up. |
15:07 | < Tarinaky> | How then, would you rotate those two unit vectors? |
15:08 | < gnolam> | Rotation matrices. |
15:09 | < gnolam> | Or quaternions. |
15:09 | < Tarinaky> | As I understand it quaternions are something else... |
15:13 | < iofficespace> | time to go back to expect EWWWWWWWWWW |
15:13 | < iofficespace> | time to work on code |
15:13 | < gnolam> | You can use them to represent rotations. And rotate vectors with them. |
15:13 | < iofficespace> | YAAAAAAAAAAAAAY |
15:13 | < iofficespace> | ^_^ |
15:14 | < Tarinaky> | I also can't find anything on quaternions. Which is annoying. |
15:14 | < Tarinaky> | Or rather, I can't find instructional material for them |
15:14 | < Nemu> | I thought quaternions were an obsolete mathematical construct, superseded by tensors |
15:14 | < Tarinaky> | I can get an acknowledgement they exist, and a statement that they are difficult >.> |
15:15 | < Tarinaky> | Nemu: Mathematically speaking, yes. Computer Graphics use them though. |
15:15 | < gnolam> | (Form a quaternion u = (0, v), where v is the vector you want to rotate. v' = Q*u*Q', where Q is your rotation quaternion. Discard w from v' and you have a rotated 3D vector.) |
15:16 | < gnolam> | (Err... probably should have used v1 instead of v' there - it's not a conjugate) |
15:16 | < Tarinaky> | gnolam: I still don't know what a quaternion is >.>) |
15:17 | < gnolam> | Short version: a 4D vectorish kind of thing you can use, among other things, to represent rotations. Think of it as a specialized axis-angle representation. |
15:20 | < Tarinaky> | Ahah! -This- (different) book has a chapter on them! |
15:28 | | RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds] |
15:30 | < Tarinaky> | Wait, what... this makes no sense. |
15:31 | < Tarinaky> | It says here that the scalar part of a quaternion is cos(theta/2) |
15:32 | < Tarinaky> | It also says that in the case of no rotation the scalar part is either 1 or -1. |
15:32 | < Tarinaky> | But that'd mean cos(0) = 1 and -1 |
15:33 | < Tarinaky> | I am missing something here :/ |
15:35 | < Tarinaky> | Oh wait. |
15:35 | | * Tarinaky facepalms. |
15:35 | < Tarinaky> | Ignore me. |
15:51 | < Rhamphoryncus> | Tarinaky: face palm is always the answer ;) |
15:52 | < Rhamphoryncus> | Tarinaky: does the super bible use fixed function or shaders? |
15:52 | <@TheWatcher> | Depends which edition! |
15:53 | < Tarinaky> | I haven't gotten into the "New testament" portion. |
15:53 | < Tarinaky> | As you can probably tell I have enough to struggle with >.< |
15:54 | <@TheWatcher> | The 5th edition is pure OpenGL 3+stuff, the 4th edition is OpenGL 2.1 with a section on fixed function, and a section on shaders |
15:54 | | Kindamoody is now known as Kindamoody|afk |
15:54 | < Tarinaky> | Should I upgrade to 5e? |
15:54 | <@TheWatcher> | <insert debate here> ¬¬ |
15:57 | <@TheWatcher> | I'd generally suggest not. The old pipeline is good for learning the basics, and by the time you get through the 4e superbible, you'll be able to switch to opengl 3 (if you want or need to) easily. |
15:58 | <@TheWatcher> | But then, I'm hardly an Authority, so *shrug* |
16:04 | < Rhamphoryncus> | Better question: what are the differences you'll need to deal with? Defining some dummy shaders, obviously, and not using glBegin/glEnd (although I think that's immediate mode, technically a separate issue?) |
16:08 | | RichyB [richardb@Nightstar-bb7cf0b5.netsight.co.uk] has joined #code |
16:10 | | celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code |
16:11 | < Tarinaky> | Reading and trying to understand quarternions is making me want to drop maths when I get back to Uni :( |
16:15 | < gnolam> | Skip quaternions. |
16:15 | < gnolam> | And I say this as a person using them. |
16:15 | < gnolam> | They're counterintuitive, and you won't get it right on the first go. |
16:16 | < gnolam> | Rotation matrices are much simpler to understand. |
16:17 | < gnolam> | And you don't /need/ quaternions - they just make some things easier (and more compact). |
16:21 | | RichyB [richardb@Nightstar-bb7cf0b5.netsight.co.uk] has quit [[NS] Quit: Leaving] |
16:24 | | Kindamoody|afk is now known as Kindamoody |
16:47 | | RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
17:04 | | Kindamoody is now known as Kindamoody|out |
17:58 | <@TheWatcher> | Ugh |
17:58 | <@TheWatcher> | This student has something against whitespace |
17:58 | < AnnoDomini> | What did he do? |
18:00 | < rms> | At least brainfuck is visible. |
18:01 | <@TheWatcher> | Aside from indentation, there's virtually no whitespace in this code. For example: if((lift_direction==direction)&&(((lift_direction==DIR_DOWN)&&(distance>0))||((l ift_direction==DIR_UP)&&(distance<0)))){ |
18:01 | <@TheWatcher> | It's /all/ like that |
18:03 | | Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [Ping timeout: 121 seconds] |
18:03 | <@Tamber> | ...holy /crap/. |
18:03 | < rms> | :/ |
18:04 | < celticminstrel> | Meep. |
18:04 | | Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code |
18:04 | < celticminstrel> | Does he think you have supernatural comprehension? :P |
18:04 | <@Tamber> | Well, Watcher *does* write Perl... |
18:05 | <@TheWatcher> | Tamber: I write /readable/ perl :P |
18:05 | <@Tamber> | Yes, but understanding the incomprehensible in a prerequisite for Perl~ |
18:05 | <@Tamber> | :) |
18:05 | | AnnoDomini is now known as Number3 |
18:07 | | * TheWatcher gives AD a badge with a pennyfarthing on it |
18:10 | | * Number3 wears it with pride. |
18:19 | | * Vornicus determines that he kind of needs to learn perl soon. |
18:26 | | Kindamoody|out is now known as Kindamoody |
18:53 | | RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving] |
19:02 | | Kindamoody is now known as Kindamoody[zZz] |
21:03 | | Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code |
21:03 | | mode/#code [+o Vash] by ChanServ |
21:04 | < Rhamphoryncus> | Buh. My Globe class has a const array of arrays of vertices. The class I'm using to store the vertices has a reference back to the globe. The reference means I can't have a default value when initializing the array, so all values must be given explicitly to begin with... |
21:05 | < Rhamphoryncus> | so I'd have to have a giant blob like this: array<Foo, 10> myarray = {v[0], v[1], v[2], v[3], v[4], ...} |
21:18 | < Rhamphoryncus> | I ran into this before but I think I was able to add a default initializer |
21:35 | < Rhamphoryncus> | x_x it's complaining that I don't have an implicit copy constructor. I explicitly add one and it has the same complaint |
21:43 | <&ToxicFrog> | What's the signature of the CC you added? |
21:43 | < Rhamphoryncus> | hmm? |
21:44 | | * Rhamphoryncus gets it to work by changing the reference to a pointer and removing the const |
21:45 | < Rhamphoryncus> | (const was on the other two members) |
22:18 | < Rhamphoryncus> | doh. My code is blowing up by going off the top of my map.. which is because I'm lazy and not limiting myself to tiles that are on the map in the first place |
22:19 | | * Rhamphoryncus bodges and gets DEAR GOD WHAT IS THAT THING |
22:27 | < Rhamphoryncus> | woo, I r smrt |
22:27 | < Rhamphoryncus> | replaced this: |
22:27 | < Rhamphoryncus> | float c = cos(pi * 2 * i / 5); |
22:27 | < Rhamphoryncus> | with this: |
22:27 | < Rhamphoryncus> | float c = cos(pi * 2 * (i / 5 + 0.5)); |
22:29 | | iofficespace is now known as io\gone |
22:29 | < Rhamphoryncus> | still quite busted though |
22:33 | < McMartin_> | 10:18 * Vornicus determines that he kind of needs to learn perl soon. |
22:34 | < McMartin_> | Two safe places to look at sample code: TheWatcher's published work, and Graham Nelson's published work (primarily the inweb source). |
22:44 | <&ToxicFrog> | Rhamphoryncus: will pi * 2 promote the 2 to a float, or demote pi to an int? |
22:45 | < Rhamphoryncus> | to float |
22:54 | | Number3 is now known as AnnoDomini |
23:15 | < McMartin_> | Actually, I suspect that that will promote everything to double and then truncate at the end. |
23:16 | <~Vornicus> | McM: it will /not/ promote the i until after it divides I think |
23:16 | < McMartin_> | Oh, i is an int? |
23:16 | < McMartin_> | Yeah, it won't. |
23:16 | <~Vornicus> | I would assume so~ |
23:16 | <~Vornicus> | It looks like an index number. |
23:16 | < McMartin_> | But if pi is a float, ISTR that it and the 2 get promoted to double. |
23:17 | < McMartin_> | (If you want a float literal I think you *must* use 2.0f) |
23:17 | | McMartin_ is now known as McMartin |
23:17 | | mode/#code [+ao McMartin McMartin] by ChanServ |
23:21 | | You're now known as TheWatcher[t-2] |
23:24 | | You're now known as TheWatcher[zZzZ] |
23:25 | | Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
23:31 | < Rhamphoryncus> | afaik that's implementation dependant, which is exposed via FLT_EVAL_METHOD |
23:31 | < Rhamphoryncus> | with 0 meaning it doesn't muddle with your float sizes |
23:32 | < Rhamphoryncus> | Which seems to be the default on x86-64, thanks to having native support for float and double |
23:32 | < Rhamphoryncus> | on plain x86 gcc defaults to one of the other values as it uses 80 bit registers |
23:36 | < Rhamphoryncus> | I put this in my code: |
23:36 | < Rhamphoryncus> | static_assert(FLT_EVAL_METHOD == 0, "Floating point semantics not portable: FLT_EVAL_METHOD != 0"); |
23:37 | < Rhamphoryncus> | Correctness with opengl sometimes requires exactly reproducible results |
23:37 | <&McMartin> | Yeah. |
23:37 | <&McMartin> | (This is a large part of why I used float constants for everything that touched OpenGL back in the old pipeline days) |
23:37 | < Rhamphoryncus> | afaik you can enable that on x86 anyway, it's just limited to modern hardware. Oh well. |
23:50 | < Rhamphoryncus> | and *again* I'm bitten by being too lazy to only provide valid coordinates |
23:50 | < Rhamphoryncus> | But since I don't have an easy way to filter them out.. clearly I need an easy way |
23:56 | | io\gone is now known as iospace |
23:57 | < Rhamphoryncus> | Bodge fail. Buh |
--- Log closed Fri Aug 17 00:00:58 2012 |