Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Oct 2010
Offline Last Active Yesterday, 08:33 PM

Posts I've Made

In Topic: how to limit fps in glut ?

24 October 2014 - 01:47 PM

As far as I know GLUT doesn't have any way of enabling vsync. Maybe you should consider using a modern

library like GLFW or SDL. In GLFW you would call:



In Topic: With regards to texturing, what is "linear space" and "nonlinear...

24 October 2014 - 01:15 AM

They are talking about sRGB encoding. Ordinary images (as in photographs with 8 bits per component) are typically encoded in the sRGB color space. You cannot perform math with these values until you have first converted them to linear RGB color space. If you create a texture using a sRGB format (e.g. GL_SRGB8_ALPHA8 or DXGI_FORMAT_R8G8B8A8_UNORM_SRGB) then this conversion happens automatically when you sample the texture.


Some additional information: http://www.gamedev.net/topic/652795-clarifications-gamma-correction-srgb/#entry5127278

In Topic: O(pow(N,12))

24 October 2014 - 12:51 AM

So much for an 80 column limit.

In Topic: Terrain lighting artifacts

22 October 2014 - 12:26 AM

Wouldn't using GL_QUADS instead of GL_TRIANGLES cause the pixel shader to interpolate between four points?  I tried this, but the issue still exists.  


Quads are simply converted to triangles which is why GL_QUADS was removed from the OpenGL API.

In Topic: Scenes with large and small elements

21 October 2014 - 02:38 PM

Of course, it's unfeasible to render such a scene using metres as my base unit, as I have to specify the spacecraft's position in hundreds of thousands of metres relative to the centre of Earth, and using such massive numbers to position objects in Direct3D seems to cause problems.


Hundreds of thousands of meters doesn't sound like a whole lot, not if you are using 32-bit floats. If you were simulating the entire galaxy, I could see this being an issue, but you are only simulating Earth out to LEO.


Edit: Then again, now that I think about it you would only have accuracy to like 1/10th of a meter far away from the origin. If the origin is centered around the spacecraft then maybe it wouldn't be an issue. You don't need better than 1/10th of a meter accuracy for something >100,000 km away.


Also, it doesn't really matter if you are using meters, kilometers or millimeters as your base unit. This has no effect on the precision of the calculation when you are working with floating point numbers, as you are only changing the exponent.