Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
EDITED, see below
I need an library to display graphics of music notation on a music making software. It will be Sibelius-like: Basically the user creates the sheet music and the app sends midi output.
I'm not looking for an library to display music notation, as for various reasons i must implement it myself. Also, the library i'm looking for must be cross-platform (should run at least on Windows and Linux).
The graphics will be vector-based or drawn with functions like "line(point1, point2);"
(Before continuing let me state that i'm new to C++ and most of my experience is with interpreted languages - PureData and Processing, mostly)
Now to the question:
I've found Cinder. You think Cinder is sutiable for the task? If no, you might skip 2 and 3.
I don't have experience with OpenGL. I couldn't actually figure out if Cinder uses OpenGL exclusively or if it uses it only on demand. My doubt here is, when using OpenGL libraries my application will only be able to run on computers with dedicated graphics cards?
Cinder doesn't have the hability to create GUIs like Qt or GTK+. Is it possible to integrade Cinder in another window, created by Qt/GTK+/SDL/etc ? I want something like Sibelius, where you have normal GUI (buttons, menus, etc) integrated in the notation graphics window.
If Cinder is not a good option, what might you recommend for that specific application needs? OpenCV? SDL? SFML?
EDIT:
I see this was marked as off-topic. Sorry, i'm new here. I've seen some posts asking for this kind of recomendation so i thought it was okay. Well, i will try to be objective and straight-forward
Question:
I need to draw music notation graphics, but i don't want to deal with low-level stuff (like Cinder, SDL, SFML, Ati-Grain). So, what are the other technologies available? That is, what are the other options?
What you are describing is a LOT of work and something impossible for someone with limited programming experience such as yourself. C++ is neither an easy language nor a language that forgives.. it's not just about learning the syntax (as is the case with processing or similar languages with automatic garbage collection) - it's also about managing memory and other resources, invariants, etc - leaving aside the complexities of linkage, compilation, etc: in turn this prerequisites that you have a thorough understanding of how computers work at a lower level.
Anyway, I'll try to answer your questions:
You could do this with cinder - this would probably mean having to re-invent the wheel - but you can do. I wouldn't say, however, that cinder is really suitable for such a task. This is meant for accelerated 2D/3D computer graphics. What you want is some more generic GUI library (maybe QT?). Regarding midi-support, you'll probably have to rely on some other library for this anyway.
Most computers these days do support openGL. Again you don't really need openGL for what you want to do.
Yes you can do this in theory - but it won't be easy and it's not really necessary for what you want to do.
OpenCV definitely NOT. This is for image processing - i.e. raster graphics - you need vector graphics. Let aside that OpenCV's Highgui is really slow on certain things so you'd have to use some other library for rendering anyway. I have no experience with the other libraries. My suggestion would be to either use some interpreted language such as python, luaAV or maybe SuperCollider (which does have built-in midi support by the way) which is far easier than C++, or to search for some open-source music-notation alternative (if there any) -> you can always build something of your own upon an existent code-base - reinventing the wheel is not necessary...
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm a relatively ok-ish programmer, but my main focus has been in application development with C# so far. I have almost zero experience with game development and 3d engines - I've begun reading up on how 3d Engines work in general, e.g. there was a wonderful guide explaining how to develop a very simple software-based 3D engine in C#. Very helpful, but that pretty much summarizes my whole experience with the topic.
Also, I haven't really been working with C++ much so far (even though I'm aware of the basic conceptual differences to C#, and would consider getting up to at least "sufficient" speed in that language manageable).
So anyway, out of pure personal interest, I'd like to play around with developing - or rather, learning how to develop - simple DirectX-based 3d Graphics Engines for educational purposes.
I'm simply interested in the graphics parts (no sound/animation/game states/networking or whatever, only very rudimentary input). Rendering some simple geometry, and then progressively learning how to extend this with more modern shading techniques would be fine.
I've already found some great resources for this. But before I dig into the topic: I know DirectX12 is around the corner, and seeing how much it seems to evolve the system, I'm really not sure if there are going to be many breaking changes to the API. Or in other words: I'm afraid that I start learning DirectX 11 stuff now, and in a few months from now it'll all be useless as DirectX 12 works in a significantly different way, from a programming point of view.
I'm not sure how much of this is already known, or if there are developer previous available to the broader public already. But if its possible to tell already: Would you guys recommend me waiting for DX12, or start with v11 as development will be very similar in the future anyway?
For the record, I know of course that learning DX11 won't hurt in any case. But I'm not in a rush, and if half of what I'd be learning now becomes obsolete in a few months, I'd prefer just waiting until then to slowly get started.
Think of DX12 as "DirectX without training wheels, without brakes, and at the moment maybe without tires".
It will be more than a 'few months' for DirectX 12 to have a rich set of tutorials, support libraries, best practices, rock-solid drivers, and widely deployed support in the operating system on end-users machines. It's "bleed edge" right now, and best consumed by GPU graphics programming experts actively working on titles and engines today who want to make sure it all works.
For everyone else, learn DirectX 11 at least for the next year or so, and possibly longer depending on the needs of your app, your personal skill level, and the focus of what you are trying to learn in the meantime.
What I can say is that learning to program DirectX 11 using the legacy DirectX SDK stuff like D3DX is a dead-end for DX12. Focus instead on DirectX 11 using 'modern' helpers like DirectX Tool Kit and DirectXMath for C++.
Anatomy of Direct3D 11 Create Device
The Care and Feeding of Modern Swap Chains
Direct3D Win32 Game Visual Studio template
DirectX SDK Samples Catalog
DirectX SDK Tools Catalog
Living without D3DX
DirectX SDKs of a certain age
UPDATE: DirectX Tool Kit for DirectX 12 is now available along with some tutorials. That said, it is best to learn Direct3D 11 first as Direct3D 12 is an API designed for graphics experts and is quite unforgiving for newbies. Knowing how to use DirectX Tool Kit for DX11 will naturally map to the DirectX 12 version if you want to go that route.
Most of what you will learn using DirectX 11 will be applicable if you switch to version 12.
In fact, for your purposes, you may not ever need to switch. DirectX 12 essentially trades off ease of use for CPU performance. It also requires Windows 10, so it's going to be more than a few months before it becomes widely used.
DirectX 9 is still widely used for making games, despite its age. I wouldn't recommend it if you're starting from scratch though.
Oh, and whatever you do, don't choose DirectX 10. DirectX 11 can do all the same things, on the same graphics cards and operating systems.
I'm just a beginner trying to understand the path to follow for creating graphical applications (not games!!). Since I'm very addicted to Windows I chosen to try DirectX as graphic library, with C++.
The point is: DirectX 9, 10, 11 (and further more to come from Microsoft..): which one do I choose? I know that programming in DX9 is forward compatible with DX10/11, but is it DX11 backward compatible with DX10/9? And I don't mean that solely for a programming level compatibility, but an actual runtime compatibility: if a user runs a DX11 made application on a DX9 environment, would it work just fine? If not, how may I make a DX "universal" application?
Also, an Off-topic question (answering that is fully optional): I read a lot of good about Qt and WxWidgets. Would you suggest to use one of those instead of DirectX? Right now I have no plans for portability on other operating systems, still, would it be better to get ready just in case I change my mind?
Many thanks to anyone who'll answer :)
Regarding your first question, you can code to DX11 and target DX9 level hardware. More information is available on this MSDN overview page.
Reading your second question, however, makes me wonder if you really want to be using DirectX for your purposes. DirectX is typically used for the Direct3D graphics and input APIs. You may find that WPF or GDI+ is acceptable (and in fact, WPF is accelerated by DirectX so you gain some of the performance benefits.)
Qt and wxWidgets are both portable UI SDK/libraries. You can certainly use these, however if your are targetting Windows platforms only, then the portability isn't of much use. If you are sticking with C++ over C#, then Qt is not a bad choice for a UI library.
Edit: If Win8 only, consider using a C++/XAML combo
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know this is probably a very subjective question, but I just want to start with the one which is the easiest and fastest to learn, so that I can get started with a small project of mine as fast as possible, it's a a little 2D game, to start with at least.. Which one would you recommend me to go with? And I'm using C++
First question: Are you on Windows? If not, use OpenGL.
If you're on Windows, this will come down to a matter of taste. The APIs are different, but the concepts required are very similar for both OpenGL and DirectX. Most things are supported on both, although they do work a bit differently.
Microsoft provides quite a few samples and a decent framework you can use for DirectX (9 or 10), which can make it easier to get started.
That being said, if you're targetting Windows Vista/Win7 only, moving to DirectX 10 may make life easier. A lot of the annoyances in DX9 and earlier were removed in DX10, and the API is a bit more clean.
That being said, if this is for a game, I'd recommend looking at using a middleware engine like Ogre instead of writing directly in DirectX OR OpenGL. This will make your life much simpler, especially while learning.
I haven't used DirectX, but OpenGL is fairly simple and there are some good beginner's tutorials at NeHe. Also, if you even want to go cross-platform, you'll need OpenGL.
However, DirectX isn't just a graphics library, you can also use it for sound, etc. so it's probably worth looking into.
If it's just 2D, then perhaps it might be worth looking into SDL, which is already cross platform and seems pretty easy to learn. There are many tutorials on the net, but one particular site I remember is Lazy Foo's SDL Tutorials. You can also mix OpenGL with SDL, there are tutorials for that as well.
If you don't want to use SDL, and you are on windows, I would recommend DirectX. I do recognize that the choice between them ultimately ends up in a flame war pretty much anywhere on the Internet, but my understanding is that DirectX is geared towards game developers, so you will find many utility libraries, functions, and classes that might facilitate various tasks. With OpenGL, you would have the ability to write cross platform code, provided that the helper functionality such as image loading is also cross platform (For which there are indeed cross platform libraries).
So my bottom line is: Both are fine, OpenGL gives you cross platform code (Provided you write it), and DirectX gives you more game development oriented tools and libraries.
If it's all about getting started as fast as possible, I'd recommend OpenGL on a NVidia GPU. You can throw almost anything at it and it will display something. However, if you want to achieve decent performance with low programming effort, I'd recommend Direct3D. There are too many ways to do things in OpenGL, and beginners will most certainly discover the slow paths first since they are covered by many ancient tutorials (see NeHe). Additionally, debugging OpenGL apps is painful, although tools like gDEBugger can help.
If you have some COM experience and it does not make your head hurt I'd recommend DirectX, just because SDK has a lot of good examples/tutorials right out of the box. If you better prefer more C-style programming or are confused with COM stuff then I'd say OpenGL.
As pointed out by several of other people, If you are planning to port your "Game" to other platforms other than windows, you better start using OpenGL.
If it is just a simple 2D game, and you won't need a 3D support for now, SDL would be a better choice, later you can combine "SDL" and "OpenGL" together. ( you can directly use openGL from SDL, it even has it's own header in SDL ).
At the same time, DirectX offers features that neither OpenGL, nor SDL can give you. OpenGL is way behind DirectX. [ OpenGL 3.0 is nothing more than an incremental update, the API hasn't changed much since 2.x ].
So if you are planning to write a game for windows, just use "DirectX", if not "OpenGL" and "Sdl".
Finally if you aren't looking for headaches just use a GameEngine, e.g. C4 Engine. Believe me when you go for 3D you have no choice, since there are so many topics that will need a lot of time to "Dig" and "Learn".
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have been wanting to give game programming ago for a long while and never got round to it, and i have finally decided to give it ago. I have decided to try and create a simple to 2D platform game. I have had a quick play with XNA and I do like it. What i am looking for tho is a comparison between XNA, directx, OpenGL. mainly the strengths and weakness between them. I have been a .net developer for the last 4 years and that's were my knowledge mainly is.
If you want to do Direct X, say hello to Win32 and COM as your new best buddies. You'll be spending lots of time early on learning ins and outs of the win32 API. DirectX with Win32 provides you all the features needed for sound, game input, and graphics display. You'll also be writing in C or C++, and you'll get to learn all about memory management and the C mindset - not something you should consider giving up lightly. Learning and using C as a language for a major project can be very illuminating, and make you thankful for modern programming language features and design elements. You aren't actually forced to use C or C++ for development here; there are various .NET wrappers and other language wrappers for Direct X, but if you've got .NET experience, you might as well use the framework made for .NET: XNA.
XNA is a much newer, .NET based set of tools. It provides many of the same features that straight use of Win32 and DirectX does (sound, input, etc) but natively on a managed platform. For most games (especially one when just starting out) you can get great framerates with an XNA game (even though a native app can give you more), and is very good for learning the ins and outs of game development -- you can't really go wrong. Most of the fundamental data structures you'll need (quad/oct trees, Model-view-controller architecture, handling of events, structure of your program) you will still need to learn and implement yourself, and doing it in .NET will most certainly be easier than in C and C++. As a nice side bonus, if you have an Xbox 360, XNA community games can, with some work, be released through Xbox Live marketplace. Basically, as a .NET developer, you would probably feel most comfortable here.
OpenGL is a cross-platoform library for drawing polygons. It has a different framework and API from Direct X, and does not provide any any OS interaction tools. There's packages that let you program in OGL in many different languages. However, as others have said, this will probably be just as much work as writing with Win32 and DirectX. For other features besides graphics (keyboard, mouse, joystick, audio) you could consider using a framework like SDL some of the missing DirectX features. There's a pretty decent community surrounding the library that can give you pointers and tips if you go this route.
More thoughts on this can be found in an almost identical article, here: Suggested Gaming Platform to Learn direct-x, C Open GL, or XNA.
XNA is going to be the easiest/quickest way to get a game up and running for the 360 or Windows platforms. It will allow you to continue developing in a way that you are already familiar (C#.NET) and it will provide you with a sizable framework that will take care of the commonly used stuff automatically. With this ease comes some limitations though, as you will be limited to only the aforementioned platforms and due to it being a large framework there will be a lot of overhead that will go largely unused causing performance hits, however with a simple 2D platformer, this probably isn't going to be an issue.
DirectX is going to limit you in platform as well, and is going to be a lot more complicated to learn and develop in. Also you will most likely be programming in C or C++ here. The advantages will be in performance, since you are handling everything you will be in control of everything and able to optimize everything for what you need. I would think that for a first game, you're going to be much better off starting with XNA and moving to DirectX after you've "outgrown" XNA. Especially with the goal of creating a simple 2D platformer.
OpenGL will allow your game to run on most platforms but will be as complicated (if not moreso) as DirectX (although I should mention there are graphic engines for OpenGL which are pretty simple to use like OGRE. You'll also be developing in C/C++ for OpenGL. Again I would think XNA would be the better choice until you feel you're ready for the next step.
If your experience has been mostly with .NET as you say, XNA would have the shortest barrier to entry although you won't get quite as good of performance as you can with other options. As you say that you're planning on making a 2D platformer, however (assuming that the implication here is "non-hardware intensive"), then XNA would be more than sufficient and probably the most suitable choice for your project.
DirectX doesn't mean you have to use native code, there's several managed wrappers out there. The performance loss is somewhere in the range of 1-3% of native DirectX, but considering you will save hours and hours of dev time and likely will never need that last 2% anyway, managed is the way to go.
See this example: SlimDX - a fully managed wrapper for DirectX in C#
One option is to write your engine in .NET but implement the renderer with C++/CLI. I'm doing this for one of my projects. XNA, OpenGL and DX are all too low-level for what I want. I don't want to write a renderer, I want to use an existing one. The Ogre3D wrapper, Mogre, appears to be a complete mess (not sure if it's the design of Mogre, Ogre3D or both), and most other wrappers are hopelessly out of date. Instead I'm implementing the renderer using C++/CLI and Irrlicht, which seems to be faster and more well designed than Ogre3D.
You may consider doing something like this.
I started out using DirectX but have now moved on to XNA, mainly because I want to be able to focus more on the actual gameplay and less on the technology behind the game. Sure, you'll still have to do some engine coding, but it helps out alot to have a framework that supplies ready made functions specifically made for game programming.