Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Oct 2009
Offline Last Active Jan 10 2013 03:44 AM

Posts I've Made

In Topic: Best language to start programming in?

03 December 2012 - 12:58 PM

I would recommend C++ (specifically, the C++11 standard) as a good place to start off. It's not a hard language to learn. What makes it hard are features that beginners just don't need to worry about. The standard library contains many gems, and there are a plethora of GUI, physics, graphics, etc. libraries available to you as well.

Another benefit with C++ is that, later on, you can expose your library via .dll/.so and interface every language that can load them (Java, Python, Lua, C, D, whatever). That said, why not start with Java and target Android. If you download the package that Google offer, you are good to go. Eclipse makes learning Java exceptionally easy and what you learn from Java, you can take with you to C++, for example.

Point is, make a decision that suits your needs. We will pretty much just tell you what we like based on our experiences - that is, after all, what a general consensus is ;)

In Topic: Change the compiler of c++ 11

28 November 2012 - 04:01 AM

-snip -

FYI, Microsoft released CTP about a month ago (http://blogs.msdn.co...uture-of-c.aspx) that supports variadic templates and few more nice features of C++11. They haven't yet updated Intellisense so its a bit weird because you will get syntax error in some places but it will compile. I used it in my main project for a while and didn't encounter any errors.

It can be downloaded from here: http://www.microsoft...s.aspx?id=35515

I'm not sure when these changes will be incorporated into main version but lets hope it will be soon Posted Image

Thanks! =D

Worth noting, though, that the standard library is NOT updated with this CTP. This means that the following won't work:
std::vector< int > my_ints = {1, 2, 3, 4, 5}; // won't compile

// Neither will this...
for(auto i: {1, 2, 3, 4, 5})
	std::cout << i << ' ';

since that relies on library features... Still, getting closer!! At least now I can begin prep-ing my g++4.7 projects for MSVC a little at a time

In Topic: Change the compiler of c++ 11

25 November 2012 - 01:15 PM

I really can't recommend against
enough. Especially when you can have highly portable functions available to you in the standard library.

I prefer to use something like:
void pause_console(char const* message)
   std::cout << message << std::flush;
   std::cin.ignore(std::numeric_limits< std::streamsize >::max(), '\n');

Benefits? Independent of IDE in use and is platform independent.

Incidentally, the MSVC compiler in VS2012 is perfectly fine. I would recommend sticking with it on the Windows platform. In fact, the only reason I use g++ on Windows is to experiment with variadic templates among other things that VS doesn't yet support. For the simple stuff, though, don't sweat over compiler differences too much. Your results should be the same regardless.

In Topic: Is there any software could show the information about the capabilities of cards

27 October 2009 - 02:32 AM

You can check the device capabilities in your code as well. It's very easy to do with DirectX. All you have to do is create an instance of the D3D9CAPS structure - if using DirectX9.0c. Lets call it 'caps'.

Then call Device->GetDeviceCaps(&caps); From here it's just a case of saying

if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0))
// Check for shader model 1_1

There is a whole list of things in the D3D9CAPS structure! Just look at d3d9caps.h for the full list ;)

It should be noted that it's important to not just return NULL and bail from the application. You should check for the next stage down and get something on screen for the user! Don't leave them with nothing because they chose to not have a high end GPU like you and me hehe.

Hope this helps!