15,203 reputation
13571
bio website vectorstorm.org
location Melbourne, Australia
age
visits member for 3 years, 8 months
seen 1 hour ago

Mobygames Profile (not entirely accurate): http://www.mobygames.com/developer/sheet/view/developerId,80048/


1d
comment GLEW doesn't work
Obligatory link to The First Rule of Programming.
1d
comment Background Music in Puzzle Math Game
I'm voting to close this question as off-topic because "where free assets can be found" is explicitly off-topic for this site, as per the site help
Jan
10
comment OpenGL - Arcball camera rotation
You can't implement arcball control that way. If you're using pitch and yaw accumulators (such as your 'pPitch' and 'pYaw' values), then you're not building an arcball; you're just using normal euler angles, like you'd see in a ground-based FPS shooter. You already have all the right pieces in your code; you just want to actually render using 'pViewMat' as your view matrix, instead of using 'pPitch' and 'pYaw' to build a new one.
Jan
9
comment OpenGL - Arcball camera rotation
There's not enough information here to actually tell us what problem you're having, but if I was a betting man, I'd bet that you have code not shown that's using those 'pPitch' and 'pYaw' values to set the view matrix, instead of actually using the 'pViewMat' matrix that you set up in Camera::update(). Since your pPitch and pYaw values are crazypants and not actually related to the camera position or target position in any way, that'd explain why the camera isn't pointing at the target.
Jan
9
comment OpenGL - Arcball camera rotation
...you're not doing anything with the 'pPitch' or 'pYaw' values. You put numbers into them and clamp them, but they don't actually influence anything in any of the code you show here.
Dec
24
comment What is the cause of this lighting artifact on my dynamic terrain mesh?
So the idea is, if (fabs(TR-BL) < fabs(TL-BR)) { Make BR-BL-TL and BR-TL-TR } else { Make BR-BL-TR and BL-TL-TR }. Any non-planar quad (such as virtually every quad in a heightmap-based terrain) will 'buckle' as it's turned into triangles for rendering, and that 'buckle' will happen along the new triangle edge that you add, so it's going to run diagonally through the quad, one way or the other. The theory is that you get far fewer buckling-related artifacts if you make sure to put that buckle in between the diagonal vertices which are the most similar to each other.
Dec
24
comment What is the cause of this lighting artifact on my dynamic terrain mesh?
@GenericJoe Sure. When you're converting a quad into two triangles, there are two ways you can do it; to use your terminology, you can either do "BR-BL-TL" and "BR-TL-TR", or you can do "BR-BL-TR" and "BL-TL-TR". The first pair of triangles puts the triangle diagonal between TL and BR, while the second pair puts the triangle diagonal between TR and BL. In your code, you always do the first pair of triangles. When I say "choose the closer of the two diagonals", I mean to check whether the change in height between BR and TL is smaller than the change in height between BL and TR.
Dec
23
comment How to setup glOrtho and Viewport
@AndonM.Coleman I say again: We're going to have to agree to disagree. Please stop posting further comments on my answer.
Dec
23
comment In-development technologies for improvements in video game graphics and design
"The advancement of the arts, from year to year, taxes our credulity and seems to presage the arrival of that period when human improvement must end." -- Henry Ellsworth, Commissioner of the US Patent Office, in a satiric aside to an 1843 report to Congress reporting a new record high in the submission of new inventions.
Dec
23
comment How to pick a 3D object with known mouse coordinates if the camera is rotated 60 degrees?
As reference for gluUnProject()-based approaches: Using gluUnProject to transform mouse position to world coordinates
Dec
23
comment How to pick a 3D object with known mouse coordinates if the camera is rotated 60 degrees?
Gah, good clarification, Lars! My brain was elsewhere. I've never actually used gluUnProject(), so I was going based on memory of overheard conversations. You're right; gluUnProject doesn't read back the Z-Buffer itself; that's usually the immediately-prior step in gluUnProject()-based answers, for determining the window 'depth' input value that gluUnProject() wants. Will amend my answer.
Dec
23
comment How to pick a 3D object with known mouse coordinates if the camera is rotated 60 degrees?
(Actually, a more correct answer would probably be to put the screen on the near clip plane, and would be firing from the pixel's position on the near clip plane, firing directly away from the camera. But this answer was already too wordy/mathy, and this distinction won't make any difference for most games.)
Dec
23
comment Fragment Shader output type error
I've gone over a diff of the two versions of the loading code; the only material differences (besides different indenting and a few modified variable names) is the code for printing out the shader info logs. The original code destroyed shaders and exited when a compile error was reported. The new code does not. (In fact, the new code doesn't even check whether the shader compilation succeeded) Whatever solved the problem, it seems implausible for it to have been related to this code.
Dec
23
comment How to setup glOrtho and Viewport
@AndonM.Coleman These arguments are unhelpful. I think your interpretation of the question is problematic. Particularly since the question was how to make the area defined by those variables fill the display. That question makes no sense if those two things are, in fact, the same thing, as you claim. Unless the original asker comes back to explain their intent, we're going to have to agree to disagree over the likely intent of this confusingly phrased question.
Dec
22
comment How to setup glOrtho and Viewport
@AndonM.Coleman The precise question was how to "fill the display". I think it's pretty clear that they weren't asking how to fill only a small portion of a window.
Dec
22
comment How to setup glOrtho and Viewport
Using these variables how can i configure glViewport to have the area defined by the dimX variables fill the display? The origin needs to be at 0,0 and the viewport needs to fill the entire window. That was the question being asked, as I read it.
Dec
22
comment How to setup glOrtho and Viewport
Your glViewport call won't work if dimL doesn't equal zero, or if dimR doesn't equal windowWidth. Similarly, dimB must be zero, and dimT must equal windowHeight. I don't think the question implied that any of those conditions were necessarily the case.
Dec
22
comment How to setup glOrtho and Viewport
I don't think this is right: glViewport (dimL, dimB, dimR - dimL, dimT - dimB). Those dimL, dimB, dimR, and dimT values are the values being passed to glOrtho() (according to the code provided by the OP); they don't necessarily have anything to do with the window dimensions.
Dec
20
comment Problem getting mouse events while keys held down in SDL2
@sol_var You should post that as the answer and accept it. :)
Dec
18
comment Problem getting mouse events while keys held down in SDL2
No, in SDL2 you will receive SDL_KEYDOWN multiple times, at a frequency based on your OS's key repeat rate. (You can tell whether a SDL_KEYDOWN was generated by a true keydown or by the OS's key repeat by checking the value of event.key.repeat.)