Follow us on Twitter!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 28
Guests Online: 22
Members Online: 6

Registered Members: 82885
Newest Member: ConiBE
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

C++ cross-platform graphics library?

Xunxen
Member



Posts: 30
Location:
Joined: 06.03.11
Rank:
Apprentice
Posted on 19-03-11 04:12
Does anyone have any recommendations for a cross-platform compatible, C++ graphics library?
I've played around a bit with wxWidgets, QT, and Allegro, and was wondering if any of them are worth actually learning. Has anyone used Irrlicht or any other graphics library that you would recommend? Should I even bother learning any of these, or should I just stick with some OS specific graphics library (although the thought makes me die inside a little)?


Author

RE: C++ cross-platform graphics library?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 19-03-11 04:44
I have really only used QT and find it to be quite powerful (as do other large companies, apparently). It is fairly easy to learn and isn't too inefficient when it comes to execution time.


Quite frankly, what it comes down to is what you are going to be using it primarily for. Simply window forms? Or Animation forms? Or what?

You can google around to find the best uses of each library. WxWidgets has a nice little "compare to others" wiki up:

http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits
Author

RE: C++ cross-platform graphics library?

Xunxen
Member



Posts: 30
Location:
Joined: 06.03.11
Rank:
Apprentice
Posted on 19-03-11 05:41
I would like a library with the simple window forms just for playing around with code (I just write random programs, like the cash register program I'm writing), but my primary purpose is for creating games. I would probably be better off using Java for platform independent coding, but I never really cared much for Java. I don't like the implicit pointers and lack of unsigned data types, but I guess that could be a good option, too...


Author

RE: C++ cross-platform graphics library?

techb
Member



Posts: 384
Location:
Joined: 15.02.09
Rank:
Moderate
Posted on 19-03-11 11:31
OpenGl if you want to eventually get into games. The beauty with OpenGl is it is cross-platform and you can port it to mobile devices with OpenGl ES.


www.userbars.com/74460/665255/337-7865-ubda3219.gif
kbcarte.wordpress.com
Author

RE: C++ cross-platform graphics library?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 19-03-11 20:20
OpenGL is definitely a good choice for games because it is powerful, fast, and fairly easy to do simple things (although it can get quite a bit more difficult to do more complex things (no duh)).

I would highly suggest not using Java for coding games. There is a very good reason why you do not see many games written in Java. Although I would not cite the lack of "unsigned" as the reason* (or any other one specific thing), certain languages just have their strengths and weaknesses. Java is great for cross-platform, simple application development. Processor heavy or graphic heavy (or even "light" in some cases) applications do not run well in Java by nature. For games, I would recommend a more complex, OS specific language (such as C, C++, etc).

If you really want to code cross-platform applications, I highly suggest C# (I have recently taken a liking to it). It can execute at fast speeds (especially with certain optimization compilers), is easy to code (and read), and is becoming more and more cross-platform (even though its .NET, a lot of people don't realize .NET is cross-platform). There are some significant games that are written in C# (some XBox games, etc). Even a version of Quake was written in C# to show off its power!


To me, it sounds like you are in more of a debate about "which language to use" instead of "which library" to use. Focus on a language, and then narrow in on a library.

I hope this helps.

* = Unsigned datatypes aren't actually required to do standard operations in Java. This website can give you an idea about that: http://www.javamex.com/java_equivalents/unsigned.shtml
Author

RE: C++ cross-platform graphics library?

Xunxen
Member



Posts: 30
Location:
Joined: 06.03.11
Rank:
Apprentice
Posted on 20-03-11 00:51
With OpenGL, I'll still need to manage the windows, won't I?
And as for C# and .NET, I have a very strong aversion to anything Microsoft (though I will admit I never knew .NET was cross-platform). This is part of why I want cross-platform. While I personally don't like Microsoft technology, the majority of people do, or at least use it with a minimal of complaints, and I want my code to work for the anyone who would be interested, regardless of their OS preference. Regardless, I want portable code, so I'm willing to learn if it seems to be the best option, though I really want to stick with C++, as that's the language I'm most familiar with.


Author

RE: C++ cross-platform graphics library?

j4m32
Member

Your avatar

Posts: 81
Location:
Joined: 01.05.10
Rank:
Newbie
Posted on 20-03-11 00:57
Another library that does work on many platforms is GTK but this doesn't simplify anything more than QT or wxWidgets / insert facvourite windowing thingy-ma-doo-hick-here.

You can always go for SDL since that supports OpenGL, will work cross platform, doesn't have window specifics which allows you to write a graphical application that doesn't require any windowing specifics. However it does not have standard controls like you would expect of QT, GTK / whatever.

Jim,

Edited by j4m32 on 20-03-11 00:59
Author

RE: C++ cross-platform graphics library?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 20-03-11 03:50
Yes, with OpenGL, you will still have to manage the windows. There are some utilities/libraries that can make it easier (like GLUT for OpenGL), but generally any library that has more power and capabilities than you need will be too inefficiently complex for your needs (if that poorly worded sentence makes sense).


While I would generally agree with you about Microsoft products, I must say, their C# .NET development has been pretty damn good. I am definitely a Linux, open source, anti-Microsoft fanboy, but C# does so many things right and it actually makes me happy to program again (happy in the sense of: its not unusually difficult to do something easy and simple, but its not dummed down to the point of lack of applicability). And yes, a LOT of people don't know that C# .NET is cross platform now (due to open source development (Google "mono develop" and you will see). You can even write iPhone applications and the like in C# now! In my experience, C# is definitely the underdog in programming languages, but it is definitely something to take a look at.

Also, you do have to take into account that if you are planning on making a full-fledged game, most people (read: all) will be using Windows to run it. While it is great to make a game cross-platform, it is always better to code it with a sight on one specific OS and THEN mess with it to get it to work on other platforms. Because C# is a Microsoft creation and obviously Windows is as well, they work very well together. Due to the open source community, most (read: all but a few small things) C# code that works on Windows will work on Linux and Mac just as well (possibly some inefficiencies, but you have to make sacrifices)!


You can definitely stick with C++ if thats what you are most comfortable with! Don't let me talk you out of that at all. OpenGL is a fantastic library with some fantastic tutorials and documentation for C++.

OpenGL is used more for games (3D and 2D), virtual reality, etc. GTK and QT are for more graphical user interface programming. In my experience, Qt is way more portable and cleaner to use. I will let you decide:

http://www.wikivs.com/wiki/GTK_vs_Qt

I hope I am helping you with this decision :-)



Please note: I only have experience with OpenGL and Qt. I have personally never used GTK so I cannot speak from experience with it.
Author

RE: C++ cross-platform graphics library?

Xunxen
Member



Posts: 30
Location:
Joined: 06.03.11
Rank:
Apprentice
Posted on 20-03-11 08:44
I never got a chance to try out SDL. I meant to, but didn't get around to it.
I've always heard that GLUT is really only useful for trivial programs and for learning OpenGL in a cross-platform environment, specifically not needing to learn OS specific code to learn OpenGL.
I've looked around at some c# code, and it kind of looks like a mix of java, c++, and python, from the limited sample I've seen.
actually, doesn't .NET work with c++? Visual c++ is basically the same thing, isn't it?


Author

RE: C++ cross-platform graphics library?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 20-03-11 14:10
C# is mostly a mix of C++ and Java.

Yes, there are tons of other .NET languages (http://en.wikipedia.org/wiki/List_of_CLI_languages), but C# is the most used CLI language. C# was designed for CLI instead of designing the CLI for the language (like C++, etc), so you can imagine that it has perks when using C# in the .NET environment.
Author

RE: C++ cross-platform graphics library?

spyware
Member



Posts: 4192
Location:
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 20-03-11 14:21
http://www.fsf.org/news/dont-depend-on-mono



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
[center]�Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?� - Ebert[/ce
Author

RE: C++ cross-platform graphics library?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 22-03-11 04:51
I would have to seriously call bullshit on that article. Not only do I not believe that that will ever happen, it amazes me that it doesn't warn about other languages that Microsoft has invented (or reinvented) or the .NET framework in general (which is already largely in use). The uproar from a move to patent it would be devastating to many, many applications and development companies.

In addition, a language named "Vala" is in the early stages of development to mimic C# in almost all ways.

To ignore a great language because of a baseless fear is ridiculous.
Author

RE: C++ cross-platform graphics library?

Xunxen
Member



Posts: 30
Location:
Joined: 06.03.11
Rank:
Apprentice
Posted on 22-03-11 19:24
I still prefer c++. And to be honest, that does sound like something Microsoft would try... though it sounds more like something Apple would do.


Author

RE: C++ cross-platform graphics library?

spyware
Member



Posts: 4192
Location:
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 23-03-11 14:52
Raikia wrote:
I would have to seriously call bullshit on that article. Not only do I not believe that that will ever happen, it amazes me that it doesn't warn about other languages that Microsoft has invented (or reinvented) or the .NET framework in general (which is already largely in use). The uproar from a move to patent it would be devastating to many, many applications and development companies.

In addition, a language named "Vala" is in the early stages of development to mimic C# in almost all ways.

To ignore a great language because of a baseless fear is ridiculous.


You obviously didn't read the article.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
[center]�Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?� - Ebert[/ce
Author

RE: C++ cross-platform graphics library?

hellboundhackersok
Member



Posts: 353
Location:
Joined: 20.09.07
Rank:
Moderate
Warn Level: 95
Posted on 24-03-11 08:14
Definitely SFML!


i.imgur.com/qBWHo0R.png
Author

RE: C++ cross-platform graphics library?

Xunxen
Member



Posts: 30
Location:
Joined: 06.03.11
Rank:
Apprentice
Posted on 24-03-11 13:41
Hmmm, that looks very convenient. I am definitely going to check it out.