software rendering with opencl onto opengl 2d view [closed] - c++

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 want to build a little software rendering library, because I like the idea of voxels, and the possible other alternative methods of rendering. Call me naive.
Using vanilla c++, with codeblocks, on a win7 system but with cross-platform intent. Using glfw for window management.
My plan is to use the gpgpu for opencl (parallel) calcs, then using OpenGL (in 2D view) for cross-platform context management and frame display.
Thus using the gpgpu for accelerated calcs, but leaving it up to me to define what those calcs are for. And asking OpenGL to just draw my results on screen.
Is there any easier cross platform way of putting my own renderings to screen?
Is this proposed method awesome, or not?

glfw3, which is under development has access to native opengl contexts. you can use that to create an interop opengl context. I haven't tried it yet myself though.

Is there any easier way?
Maybe, but none that I'm aware of.
OpenCL supports OpenGL interop, which makes what you're trying to do very fast.
(i've used it myself, and it was fast, but maybe not as fast as I would have liked, but I used it in a inefficient way)
Is this awesome? Maybe, but remember that opencl can't use all the hardware that opengl can, so if possible, use opengl for graphics.

Related

OpenGL glBegin ... glEnd [closed]

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 wanted to know how badly my games will be affected by using glBegin and whatnot instead of GLSL and VBOs and VAOs and all that. They just look so difficult and ridiculous to achieve what I can do easier. What will the effect of my choices be?
Badly.
The direct mode API with glBegin() and glEnd() is deprecated, largely for performance reasons. It doesn’t really support data parallelism, and relies heavily on the CPU—requiring at least one function call per vertex. That adds up quickly.
The direct mode API might be simpler and more pleasant for you to use in small projects, but using VBOs scales better, both in terms of performance and maintainability. It’s much easier to manage data than it is to manage state.
Also, learning the new API means you’re up to date on how OpenGL is and should be used in the real world. If you’re looking to work in the games industry, for example, that’s just plain useful knowledge.
Some useful learning materials:
An Intro to Modern OpenGL
Learning Modern 3D Graphics Programming
OpenGL Tutorials for OpenGL ≥3.3

Is there any viable GPU accessing alternative to OpenGL [closed]

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'm looking to do some programming on the GPU but don't need any sort of 3D or high level graphics capability. Essentially all I need to do is call functions that loop through thousands of iterations very quickly. I started looking into OpenCL but it seems that support for that is much, much lower that OpenGL as I can use OpenGL ES even on mobile and WebGL on web. Web isn't that big of an importance to me at this point, but is there a viable alternative that has the wide support that OpenGL has but more used for calculation? I want something that will be able to run on as many computers and devices out there.
EDIT: I'm also looking for the best support of various graphics cards from AMD, Nvidia, etc.
OpenCL is supported by both main GPU manufacturers and is by far your best bet. The other alternative is CUDA. I think you would be better off asking a question along the lines of "How do I solve this problem using OpenCL?" than simply stating that it is not suited for the work you need done, as it is very hard to make recommendations based solely on the description above.
Please also note that OpenCL supports an embedded profile, which means it has some support on mobile devices. However the iPhone does not currently support this. It was rumored that it would be coming to iOS 6 but this seems not to have happened yet.
Also see this question which explains how android and OpenCL function together.
I guess for NVIDIA cards the best model to use is CUDA. It's pretty mature by now and very well supported. You can find many guides on the main site and they're well written so you should be able to pick it up quickly imo.

Win32 still best for Windows game development? [closed]

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'm looking to start a new project to work on in my free time that covers a lot of areas of Computer Science and I've decided on a game (most likely flight simulator or simple 2D side-scroller). Anyway, I do a lot of C#/Java development at work writing business applications so I'm looking to do a game in C++ (I have used C#/XNA for games previously).
However, I'm trying to find a good framework for C++ game development. I have used Qt before but don't believe this is suitable for what I am trying to achieve. Is Win32 and OpenGL still the best for C++ game development?
Also, I want to keep this pretty OO, any recommendations for wrapping the Win32 for game development? Or does OpenGL provide abstractions to help?
From what I've experienced, the Win API is a complete mess. I'd recommend using something like SDL and save yourself the trouble. As a bonus, this will also make it cross platform. You can also use OpenGL with SDL.
SDL is still a bit low level and has a C style API, so you'll need to write your own OO wrappers. I've heard that SFML and Allegro are popular alternatives but I have less experience with them.
SFML is probably the closest you can get. Most people using 2D rendering roll their own, and most using 3D go with either something like Irrlicht, or roll their own.
As for OGL, the OGL API is horrific- it's even worse than the Windows API. At least that is OO, C-style, instead of just plain old global-variables-up-wazoo.
Check out GLFW. It looks to be minimalistic (in a good way).

3D visualization of complex geometries in a GUI [closed]

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 11 years ago.
I would like to develop a small cross-platform for (structured) mesh generation software (similar to Gmesh) and possibly 3D pre/post processing (like Salome).
In order to make things easier I'd like to use already made libraries, to better focus on the development of what I need.
I need
1. geometrical modelling capabilities
2. GUI
3. 3D visualization.
I have been looking around but the whole workflow results a bit blurry.
I think pyGTK and GLADE are good choices for me ( because of the community and the very open license with respect to pyQt).
The modelling part could be handled by Open Cascade ( preferably pythonOCC) but for the visulization in a pyGTK widget I don't know what to do.
I was thinking to use openGL (PyGtkGLExt) but I understood that OpenGL is too low-level.
FreeCAD (http://goo.gl/V4FCW) uses Coin3D (I could use pyvy maybe) for this reason but a software like Gmesh uses directly OpenGL.
On top of that I saw that for scientific visualization, VTK would be probably better, but I don't understand whether it is based on OpenGL or not. In my opinion OpenGL is nice because it is supported by graphic card drivers making the whole software faster.
I should be able to render geometries built by pythonOCC into a pyGTK widget but what kind of libraries would be better to use? OpenGL alone (maybe to complex to program?)
Coin3D (or similar) to speed up the use of OpenGL?
VTK alone? VTK in combination with OpenGL?
Other combination and/or libraries?
Have you experience in this kind of software?
Do you have suggestion about it? Do you know tutorials where the combined used of these libraries is explained?

Is QT the right framework to use for simple 2D game in C++ [closed]

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 11 years ago.
I want to create a simple "Mario-like" 2D game. Nothing too fancy, just a some kind of plubmer walking and jumping, some bad guys, user interference, few levels. Is QT the right framework to use? My friend suggested me Irrlicht, but that seems much more for 3D stuff.
Thanks for your ideas!
I don't think that QT is the right tool for 2D game development in C++, but you can try SDL.
Also, for future game development questions, there's a better StackExchange web site where you can probably get better answers: Game Development.
Qt can be used to make very complicated animations and graphics scenes (2D and 3D). There are tiny examples included in the SDK that you can use to base your work on, but remember you'll be programming in Qt, instead of something a tad more general like OpenGL.
Check out SDL.
If you want a more OO API, check out SFML. SFML has more done for you in terms of design (a Sprite class, for instance).
Qt has a big library which provides a lot of features, you would be wanting to use Qt wholly rather than just for 2D drawing.
If you already know qt and are comfortable with it, then its way to go.