Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


Language for 3d graphics


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 turetto87   Members   -  Reputation: 101

Like
0Likes
Like

Posted 03 October 2013 - 07:11 PM

Hey there, as a "new" programmer I was wondering what language would be better to learn graphics programming.

I was able to learn a bit about C language in the last month at a cs101 level and also I have been playing with python and pygame,

I was wondering if it would be better to learn 3d graphics with OpenGL using python or would be better if I learn some c++ and use that.

 

I wonder because I want to continue in the field of game logic but also I want to learn more about 3d graphics and got interested in buying a serie of books about it that sadly use c++ in all of them, would I be able to use python while following the c++ books or is better is I use c++ and forget about python ?

 

My explaination skills are not so great so sorry for that mess,  thank for any help on explaining me this



Sponsor:

#2 mawigator   Members   -  Reputation: 393

Like
0Likes
Like

Posted 04 October 2013 - 02:51 AM

OpenGL is originally in C. In other languages, it will look very similar (the same names of the functions etc).

However one of the important limitations in graphics is number of state calls

(now very important in mobile environments, less on desktops). As some of the calls must go

through system switch it may take a long time. In interpreted languages you will add additional

time for the interpretation (so it may be less efficient). But, this should be profiled, for being sure.

Maybe, start with Python and if it will be too slow, rewrite graphics to C and embed it in the Python?


Edited by mawigator, 04 October 2013 - 02:52 AM.


#3 hdlopesrocha   Members   -  Reputation: 145

Like
0Likes
Like

Posted 04 October 2013 - 09:39 AM

You can try C# with XNA, you will find that a lot of crazy math is already implemented (Matrix operations, collisions, 3DModels...)
I started with Allegro (C ), then OpenGL(C/C++), then XNA(C#) which for me was the easier one.


Edited by hdlopesrocha, 04 October 2013 - 09:42 AM.


#4 Goran Milovanovic   Members   -  Reputation: 1104

Like
0Likes
Like

Posted 04 October 2013 - 11:07 AM


In interpreted languages you will add additional
time for the interpretation (so it may be less efficient). But, this should be profiled, for being sure.
Maybe, start with Python and if it will be too slow, rewrite graphics to C and embed it in the Python?

 

I've written Python programs that call OpenGL functions - I've yet to encounter a situation where Python execution speed was of any relevance in the overall framerate profile.

 

Typically, slowdowns tend to stem from improper OpenGL usage, like changing GL state for every single triangle.


+---------------------------------------------------------------------+

| Game Dev video tutorials  ->   http://www.youtube.com/goranmilovano |
+---------------------------------------------------------------------+

#5 Krohm   Crossbones+   -  Reputation: 3171

Like
0Likes
Like

Posted 07 October 2013 - 01:27 AM

My two cents.

Stay away from dynamic languages - they don't maintain their promises. The lack of adequate type information might not be a problem for the compiler/interpreter but it is a damn problem in terms of documentation which results in higher mental processing by your side. I think it's worth noticing that documentation tools are quite behind.

 

Stay away from basic C, its amount of automation (lack of dtors and ctors) is definitely too low. "Core" C++ (inheritance, some light templating) will get you very far and with some basic C++0x the language is fairly efficient in terms of expressiveness.

 

If the books you're planning to buy are C++, you have to get C++. Otherwise, you'll just waste your efforts in translating the notions, instead of acquiring them.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS