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
Related
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 9 years ago.
I've been lately starting to learn how to draw computer graphics with openGL. I've been seeing a lot of words that I don't know. Eg. Processing pipe, shaders, shader language, graphic buffer,... I have absolutely no idea how graphic processors work, but I wasn't able to find any books which would explain it in a simple manner. Could you please suggest some resources on how computer graphics work?
Interactive Computer Graphics: A Top-Down Approach With Shader-Based OpenGL
Edward Angel & Dave Shreiner, 6th edition
It's the most recent version of a pretty good textbook that goes all the way from basics of vision and creating 3D images to modern GPU shaders. (You do need to know how to program.)
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 need to know why OpenGL doesn't have circle or curve functions, unlike the rectangle and polygon built in functions.
Because GPUs don't generally have hardware-accelerated notions of those shapes for real-time rendering. Graphics hardware is designed around a pipeline for rendering triangles, which are the primitive graphics geometry (and by extension can usually create the trivial additions of quads and etc). Any other shapes (curves, generalized meshes, etc) are up to you to create and turn into things that the GPU can render.
As a result, "allowing" you to build e.g. circles yourself allows you to control how complex the geometry gets. You wouldn't want GL to decide for you how much stuff to generate when you need a "circle"-- it will depend on what you're doing, how much detail/smoothness you need, etc.
Since it's no fun to keep reinventing the wheel (har), there are lots of higher-level graphics libraries that you might end up using that can easily create those geometries for you. But they operate on top of pure GL.
I think at earliest days of computer graphics acceleration, the accelerator horsepower was a tad weak, so anything non-linear were considered costly. Curves happened to be non-linear in most cases.
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.
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.
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 9 years ago.
I have a great idea for a 3D game, but I do not want to start from scratch with OpenGL. I also do not want to reinvent the wheel. I found OGRE, and it seemed like it was perfect for my needs, except it lacked physics and audio. I do not need crazy graphics, shaders or high polygon counts, but the world will be very big, so it needs good scene or LOD management. I also will probably want to bring in rigged characters so skeletal biped animation support would be needed. Any suggestions would be greatly appreciated.
Thanks
Have a look at some of the answers from this question. You may find some useful libraries listed.
If you're open to alternatives to C++, you can check out this answer on the game development stack exchange website. The answer covers lots of options for game engines, physics engines and Graphics/Sound engines. Most listed here focus on C# (because of the question obviously), but some of them are wrappers for C++ libraries (you can always check out the native libraries that are being wrapped).
Old versions of the Quake engine are released under the GPL.