Cagey
|
|
« Reply #80 on: October 14, 2008, 06:18:02 PM » |
|
Oh balls. I take that back
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #81 on: October 14, 2008, 06:21:41 PM » |
|
What do you mean, it doesn't... work? I don't know. I spent ages making the code nice and class-y. But it was in an untestable transition state for too long. I've had to revert back to my horrible C mess from a while ago and work with that again. Any objectification goals I have will now be iterative. For the moment, this means that I am going to be in array hell insofar as my data formats are concerned. Cagey, why absolute value?
<- that (also, I did try fabs just there in case my intuition was leading me astray, but it made no difference. I wish I had time to check out why, but for the moment I'm stuck trying to get back to the point where (I thought) I was earlier today).
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #82 on: October 14, 2008, 06:27:51 PM » |
|
Are you certain it doesn't work? Odds are the problem was unrelated to the lengthsq function and you just made a different change somewhere else that caused the problem...
|
|
|
Logged
|
|
|
|
muku
|
|
« Reply #83 on: October 14, 2008, 06:29:42 PM » |
|
(also, I did try fabs just there in case my intuition was leading me astray, but it made no difference. I wish I had time to check out why, but for the moment I'm stuck trying to get back to the point where (I thought) I was earlier today).
Haven't you started using source code management? Then that should be trivial
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #84 on: October 14, 2008, 06:39:06 PM » |
|
Haven't you started using source code management? Then that should be trivial It was trivial, even a delight, to get back to the point where I was yesterday with hg, but not to the point where i thought I was today, because essentially all of the code I wrote from last night to this evening was horrendously broken.
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #85 on: October 17, 2008, 03:54:20 AM » |
|
Suffering from Mathematica ® Fatigue ® at the moment.
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #86 on: October 17, 2008, 03:59:45 AM » |
|
I. Hate. EventListeners. In. AS3.
|
|
|
Logged
|
|
|
|
bateleur
|
|
« Reply #87 on: October 17, 2008, 04:58:34 AM » |
|
I. Hate. EventListeners. In. AS3. Not wishing to interrupt your righteous grumpiness, but is there anything I can help with? One gentleman to another, and all that.
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #88 on: October 17, 2008, 05:04:28 AM » |
|
I. Hate. EventListeners. In. AS3. Not wishing to interrupt your righteous grumpiness, but is there anything I can help with? One gentleman to another, and all that. I fear not, I just dislike the way they work (or don't, for that matter). Thanks for the offer, though.
|
|
|
Logged
|
|
|
|
Hideous
|
|
« Reply #89 on: October 17, 2008, 05:25:03 AM » |
|
I hate AS3 in general.
|
|
|
Logged
|
|
|
|
Greg
|
|
« Reply #90 on: October 17, 2008, 11:25:28 PM » |
|
Gnaaaah! Why does OpenGL mangle my sprite colors in subtle yet noticeable ways when I load them into textures? How is one supposed to simulate reduced palettes this way? Grrr. I realize it was August when you wrote this, but recently I overcame the same problem. Actually, it was over Christmas, when I had some time to do more in-depth reading into GL to sort some things out. The first and vastly most useful thing I learned was about GL texture blending modes. GL defaults to Bilinear blending, so the colors from loaded sprites at pixel levels run through the blending algorithm on their way to the fragment buffer. A really excellent explanation of all the blending modes are here and here. that second link in particular, he pretty much explains everything you need to know about OpenGL Blending modes. here's some code that about sums up what your options are. also note, you can turn off blending by setting both GL_TEXTURE_MIN_FILTER & GL_TEXTURE_MAG_FILTER to GL_NEAREST w/ the glTexParameteri(), and thus do blocky pixel graphics and they'll turn out correctly. textureMode_t modes[] = { { GL_NEAREST, GL_NEAREST, "Far Filtering off. Mipmapping off" }, { GL_LINEAR, GL_LINEAR, "Bilinear filtering, no mipmap" }, { GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST, "Far Filtering off, standard mipmap" }, { GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR, "Bilinear filtering with standard mipmap" }, { GL_NEAREST_MIPMAP_LINEAR, GL_NEAREST, "Far Filtering off. Mipmaps use Trilinear" }, { GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR, "Bilinear Filtering. Mipmaps use Trilinear" }, }; Cheers!
|
|
« Last Edit: October 18, 2008, 07:53:00 AM by Greg »
|
Logged
|
A day for firm decisions!!! Or is it?
|
|
|
muku
|
|
« Reply #91 on: October 18, 2008, 04:54:58 AM » |
|
Thanks, but my real problem was this: Gnaaaah! Why does OpenGL mangle my sprite colors in subtle yet noticeable ways when I load them into textures? How is one supposed to simulate reduced palettes this way? Grrr. I figured it out. If anyone ever has the same problem: it's not enough to tell it to store the texture in GL_RGB internal format; no, even if you're in 32bit color mode, you have to tell it explicitly to use GL_RGB8 or it mucks with your colors. Weird, that.
|
|
|
Logged
|
|
|
|
Farbs
|
|
« Reply #92 on: October 18, 2008, 05:45:50 AM » |
|
I. Hate. EventListeners. In. AS3.
2nded. Abobe need to stop hiring enthusiastic programmers and start hiring practical ones.
|
|
|
Logged
|
|
|
|
Massena
|
|
« Reply #93 on: October 18, 2008, 06:44:51 AM » |
|
I. Hate. EventListeners. In. AS3.
2nded. Abobe need to stop hiring enthusiastic programmers and start hiring practical ones. I say we all go back to AS2. Simple, sweet, lovely AS2.
|
|
|
Logged
|
|
|
|
Gregory
|
|
« Reply #94 on: October 18, 2008, 10:55:52 AM » |
|
I. Hate. EventListeners. In. AS3.
2nded. Abobe need to stop hiring enthusiastic programmers and start hiring practical ones. I say we all go back to AS2. Simple, sweet, lovely AS2. I like AS3. But then I'm an enthusiastic programmer.
|
|
|
Logged
|
|
|
|
increpare
Guest
|
|
« Reply #95 on: October 18, 2008, 07:39:33 PM » |
|
Bah humbug. I spent all day changing my nice opengl code from immediate mode to (for the most part) using display lists which, irritatingly, I've found out, are deprecated in the train wreck known as openGL 3.0. Ah well. Here's hoping there'll be something nice and similar in opengl 4.0. The change also ramped up my code readability by quite a bit. Also: gDEBugger is pretty bloody mesmerizing. Also: my profiling shows that it will certainly be worthwhile for me to go back and start figuring out what was so kooky about my length 2 function before calls | name | 6137290 | length(float, float, float, float) | 1404657 | parity(float, float, float, float) | 1387279 | angle(float, float, float, float) |
My 'angle' function, by the by, is a wonder of modern geometry: it doesn't measure any identifiable geometric property at all, and resists all efforts I make to rid it from my code and replace it with something that one might recognise as an angle and less hopelessly inefficient (my 'angle' function calls length no less than three times).
|
|
|
Logged
|
|
|
|
joshg
|
|
« Reply #96 on: October 19, 2008, 05:12:44 AM » |
|
I. Hate. EventListeners. In. AS3.
2nded. Abobe need to stop hiring enthusiastic programmers and start hiring practical ones. I say we all go back to AS2. Simple, sweet, lovely AS2. This makes me feel better about still being stuck with my copy of Flash Basic 8.
|
|
|
Logged
|
these are from an actual radio shack in the ghetto
|
|
|
increpare
Guest
|
|
« Reply #97 on: October 19, 2008, 10:28:00 AM » |
|
Spent all day debugging my code. FINALLY fixed my length and angle code, and added several simplifying optimisations. e.g. old rotation code snippit: pdir-=angle(dx-cx,dy-cy,bx-ax,by-ay); pdir=(-angle(dx-cx,dy-cy)+180.0f-angle(dx-cx,dy-cy, cos(pdir*(Pi/180.0f)), sin(pdir*(Pi/180.0f)))); found itself replaced with the entirely equivalent pdir=-(pdir+angle(dx-cx,dy-cy)+angle(bx-ax,by-ay)); Also changed over all of my angle units to radians, except when calling the opengl rotation function (opengl's immediate mode works in degrees). I feel better about that. Also, to avoid veering too much off topic. My current big HATE about codeblocks: it's icon is too bloody easy to confuse with Chrome's. (it might not be obvious how similar they are from that...but...damnit...it's a source of slight though continual irritation).
|
|
|
Logged
|
|
|
|
Hideous
|
|
« Reply #98 on: October 19, 2008, 10:33:56 AM » |
|
Oh hey you're talking to Ronald Raygun there.
|
|
|
Logged
|
|
|
|
Zaknafein
|
|
« Reply #99 on: October 19, 2008, 11:47:46 AM » |
|
Qt annoys me greatly. But it's probably because I'm using it in Java (Qt Jambi) and come from a .NET background where events are actually supported in the language instead of emulated with stupid reflection. But it's still crap. Makes me appreciate the Windows Forms Designer of VS.Net.
|
|
|
Logged
|
|
|
|
|