Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL software rendering alternatives

I need to software render OpenGL in Windows and have already found about Mesa3D, which doesn't provide DLLs and I'm having some pain to build... Are there alternatives available?

like image 357
Bruno Kim Avatar asked May 03 '12 12:05

Bruno Kim


People also ask

Is OpenGL software or hardware?

OpenGL is both hardware and software, Mannel says. "We have an OpenGL implementation entirely [in] software," he says. "It works, but it runs incredibly slowly." Hardware is faster.

What is OpenGL used for?

It is commonly used to make UI animations more responsive or to handle embedded video or to draw vector graphics – really any visual element you put on the screen is fair game for OpenGL. OpenGL is becoming increasingly ubiquitous and understanding how to leverage its incredible power is a must for developers.


2 Answers

That depends on what OpenGL version you wish to accelerate. Depending on your needs, there are some alternatives available. I've listed those I'm aware of below:

OpenGL 1.0 & 1.1

Windows (since Windows NT 3.5) actually includes an OpenGL software implementation to begin with. If you haven't installed any other software rasterizer, this ought to be your default implementation. The Microsoft software rasterizer supports either OpenGL 1.0 or 1.1, depending on your platform, but will not accelerate anything newer than that. If your desired OpenGL version is covered by 1.0 or 1.1 (however unlikely), the solution should be sufficient. I'm unsure as to what extent the default Windows OpenGL software implementation covers the OpenGL ES 1.x frameworks through its OpenGL 1.0 or 1.1 support.

OpenGL 1.4

Furthermore, in Windows Vista, Microsoft included an emulation layer which may translate OpenGL into Direct3D; thus supporting up-to OpenGL 1.4. Additionally, this should mean that Windows Vista (and up?) runtimes may accelerate most parts of OpenGL SC. I've never used this emulator myself, and was quite surprised to hear about it, but it may be of interest to someone having to run one of these old frameworks in a Windows environment. Note that the standard Windows OpenGL software rasterizer (OpenGL 1.0 or 1.1) is also included in Windows Vista and above.

OpenGL ES 2.0

Additionally, there's the ANGLE project which accelerates WebGL and OpenGL ES 2.0 by translating OpenGL ES 2.0 invocations to DirectX 9 and 11. Their development notes also mention that an OpenGL ES 3.0 solution is in the works. Never having used ANGLE, I cannot offer a verdict.

OpenGL 3.1

In addition to those mentioned above, Mesa 3D (which supports up to OpenGL 3.1) feature three software implementations:

  • swrast
  • softpipe
  • llvmpipe

Since I know very little of swrast (the original Mesa project software rasterizer) and softpipe (a reference driver) I'll refrain from going into these. The third implementation, llvmpipe, and probably the one that may interest you the most, is a high-speed software implementation that uses multithreading and JIT compilation to speed up simulation with native- and SIMD instructions.

like image 114
Caterpillar Avatar answered Sep 28 '22 06:09

Caterpillar


I have used Swiftshader from Transgaming for a production project before and I must say, it was brilliant. A tad costly, but brilliant.

like image 21
Ani Avatar answered Sep 28 '22 07:09

Ani