Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 16 Jan 2011
Offline Last Active Today, 03:21 AM

Posts I've Made

In Topic: OpenGL View Matrix that rotates the camera

19 April 2015 - 03:50 PM

Sorry currently I have no time ti explain this is a simple code that might help:


struct camera
    float radius = 1.f;
    float yaw = 0, pitch = 0;

    void update(vec3f& pos, vec3f& up)
        pos = vec3f(cos(yaw) * cos(pitch), sin(pitch), -sin(yaw) * cos(pitch)) * radius;

        up =
            vec3f(cos(yaw) * cos(pitch + half_pi<float>()),
            sin(pitch + half_pi<float>()),
            -sin(yaw) * cos(pitch + half_pi<float>()))

} g_camera;

Basically to compute the up and look at I trasform those yall and pitch from spherical coordinate system to R^3

Edit : the camera is orbiting around 0 so the look would be normalized(-pos)

In Topic: If Aliens Came To Earth, Would It Be Alright For Them To Abuse Humans?

18 April 2015 - 04:37 PM

Aliens who have any sense of morality should exterminate all humans for the good of the universe (before we're able to leave our planet). I wouldn't call this "abuse", but self-defence.


I don't think that humans are evil.There are just to many people on this planet and the morals and ethics aren't manageable in that huge sizes. All we need to do is to reduce our reproduction levels.

In Topic: Is there something equivalent to FEATURE_LEVEL in OpenGL?

14 April 2015 - 04:06 PM

Yes it is possible, but this feature is platform specific. See glx on linux and wgl on Windows. basically what you need to to is to specify GLX_/WGL/GL_MAJOR/MINOR version values while creating the context.

In Topic: [HLSL] Decreasing Shader Model from SM5 to SM2 (vs_5_0 to vs_4_0_level_9_3)

11 April 2015 - 11:38 AM

Have no experience with real WP devices, so I can't tell you for sure, but maybe you're allowed to use only one constant buffers, see if MSDN cuold give us something on that topic?

In Topic: [HLSL] Decreasing Shader Model from SM5 to SM2 (vs_5_0 to vs_4_0_level_9_3)

09 April 2015 - 06:16 AM

Well it depends on the number of unique instances that use skinning and the target platform.
If you have few models per fame that use skinning, then CPU skinning is a good choice.

Otherwise using a texture may sound a bit odd, but this techinque has been used in many games.


In most cases data shrinking isn't a good choce, because you're locking features form the artists.

Splitting mesh is a a tricky process, but if you can offload that work to an external tool what would save a lot a headaches.