Jump to content

  • Log In with Google      Sign In   
  • Create Account

cdoubleplusgood

Member Since 11 Jan 2013
Offline Last Active Oct 16 2014 08:12 AM

Posts I've Made

In Topic: Creating a Sphere from a Cube

15 September 2014 - 02:38 AM

Not quite sure if I understand you completely, but it seems to me that the underlying problem is this:

It is impossible to cover a sphere with undistorted squares, equilateral triangles, hexagons etc. E.g. with a subdivided cube, there will be 8 corners (the original corners of the cube) with 3 edges, but all other corners have 4 edges. If you start with an icosahedron and subdivide with triangles, you will have corners with 5 and corners with 6 edges.


In Topic: forget c++

15 September 2014 - 02:25 AM

Languages are overestimated.

 

Of course, C++ has its specific features (and problems). But after all, it's just a tool. Most programming and design principles are very similar to other C-ish languages, like C# or Java.

Sure, you will lose some skill if you don't practice - same as for any other type of ability.

So if you can land the job you're after - do it. If you need, you can continue with C++ any time later.


In Topic: c++ function pointers

11 July 2014 - 01:51 AM

I find The Function Pointer Tutorials to be a good resource. Pros: an easy read, has examples, talks about functors. Cons: old, doesn't cover std::function.

Also missing: lambdas, mem_fn, bind. In modern C++, especially lambdas are a "must know", IMO.

In Topic: c++ function pointers

11 July 2014 - 01:46 AM

I second SiCrane, If you want to know what it would look like without typedefs, though:

int AddOne(int a)
{
    return a + 1;
}

int (*GiveMeFunctionPointer())(int)
{
    return &AddOne;
}
Function pointer types are weird. It sort of goes around the function declaration.

 


In the "new" standard (C++11), you can use a type alias instead of typedef:

using PF = int(*)(int);

Or, without typedef or alias, C++11 allows trailing return types; the syntax may be somewhat clearer:

auto GiveMeFunctionPointer() -> int (*)(int)
{
    return &AddOne;
}

In Topic: Jumping over to DirectX?

24 June 2014 - 03:16 AM


You could buy the book '3D Game programming with DirectX11' by Frank D Luna

That's a great book; far better than any online tutorial I've seen.

With one exception: Luna uses D3DX. kunos already mentioned the DirectX toolkit libraries; these should be used instead in new code.


PARTNERS