GLSL Standalone Shader Compiler [closed] - opengl

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 2 years ago.
Improve this question
I've been looking for standalone shader compiler in Linux - for example, to compile source code from shadertoy.com. I found some - like shadertoy-master or shadertoy-view-master repositories on github, but they don't work. Is there any way to compile shader source code as easily as c++ code?

ShaderToy.com, as far as I can tell, uses GLSL. You don't compile GLSL shaders offline; you give the source to OpenGL at runtime.
Shaders need to run on a wide variety of devices and GPUs. nVidia GPUs are unlikely to use the same machine code as AMD GPUs, or Intel Integrated Graphics, or the CPU if software rendering is being used. The only way to ensure that the shader can be ran is by giving the shader source to the implementation at runtime and letting it compile the shader to whatever format it needs.
Newer versions of OpenGL include the ability to precompile shaders, to speed up loading. The compiled code is implementation specific, though, and thus not cross-platform. Even if you try to load the compiled shader on the same computer you compiled it on, there's still no guarantee it will work, so you still need to bundle the GLSL source code.

You can download mesa and build with passing the -Dwith_tools=[glsl] to generate glsl_compiler.

Related

Software-only openGL32.dll? [closed]

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 3 years ago.
Improve this question
I have multiple machines that do not have openGL capable graphics controllers (or at least not for the OS I am using), and I am trying to run various softwares which require openGL32.dll to be present and working. I only need openGL version 1.4 compatibility.
My question: Is there some sort of software-only emulation for openGL that I can use to run these? I have heard of MESA, but all I need is the dll, and MESA seems to require that I build everything manually.
I am running Windows 10 x86_64
I'm pretty surprised that a machine running Windows 10 does not have a GPU capable of supporting OpenGL-1.4 – most likely you simply don't have the proper drivers installed and that's all your troubles. OpenGL dates back almost 15 years; that was before shaders where are thing.
The default Windows installation does not ship with fully featured OpenGL drivers, because Microsoft in all their wisdom decided, that they'd strip perfectly working OpenGL drivers from the drivers installed through Windows automatic driver installation.
To get full and proper OpenGL support you absolutely must download the drivers directly from your GPU vendors website and install those. Open up the "Hardware Manager", look for "Graphics adapter", there you find the name of it. Type the name plus "driver Windows" into the little box of Google and it will carry you to the right place.
Mesa3D seems to publish its own versions of it: https://fdossena.com/?p=mesa/index.frag

GPU programming on Clojure? [closed]

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 1 year ago.
Improve this question
I'm wondering what if any GPU integration libraries exist for Clojure?
I've seen examples of this that involve hand-rolling OpenCL code, but I'm specifically I'm looking for something similar to Anacoda accelerate, which translates Numpy Python expressions to CUDA code relatively seamlessly.
I'm open to either OpenCL or Cuda approaches.
here is a project that recently started on github https://github.com/JulesGosnell/clumatra. Its seems more like an experiment and its quite impressive!
There is a Google Summer of Code project proposal to add a GPU matrix implementation to core.matrix:
http://dev.clojure.org/display/community/Project+Ideas
Once completed, this project would allow large vector/matrix expressions to be optimised and executed on GPUs.
Disclaimer: I'm a possible mentor for this project.
clojureCL was released a few months after this question was posted. It looks like it offers a more idiomatic interpretation of the standard interface, but it is not a tool that would transform Clojure math / vector operations into OpenCL operations (I think that that is what the OP is looking for?)
[ClojureCL] brings a lot of power, but do not expect it to be an easy ride if you’ve never programmed anything on the GPU or embedded devices. With ClojureCL, it is not [as] difficult as in C (OpenCL Hello World in C is a hundred lines of source code, in ClojureCL it’s only a few), ...
The good news is that you can use any OpenCL book to learn ClojureCL, and we even provide ClojureCL code for the examples used in the OpenCL in Action book.
An old topic but now we have clojurecuda, which is a wrapper on JCuda!
It won't give you automagic speedup on things but at least Neanderthal is a higher level library for linear algebra.

Virtual machine with support for OpenGL [closed]

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 2 years ago.
Improve this question
We have an application that we want to compile, auto-build and auto-test on an virtual machine. The virtual machine "provider" has to be able to be cross-platform as we require this operation to be executed on both windows and several linux distrubtions at the same. Our application is
dependent on OpenGL, and require a rather new version of OpenGL in order to work properly.
We have decent experience with Oracles Virtual Box, where we are able to perform the above action with some effort, since we can hardware acceleration through the host-machine.
However it is somewhat limited as it is quite demanding on the host-machine, and it is not really well-suited for many virtual boxes running at the same time.
So ideally a solution could be Amazon EC2 cloud computing, but here we run into the 'usual' problem with, that we might be able to get a linux distribution (for instance Ubuntu) up and running with ease, but hits a very hard wall once we want to start installing some OpenGL drivers in order to be able to compile and test our application. Even mesa-drivers is impossible to get up and running to a degree that one can run glxinfo or glxgears.
We can't be the only one facing this problem, so what do other do ?
Even mesa-drivers is impossible to get up and running to a degree that one can run glxinfo or glxgears.
Mesa should always be able to fall back to swrast or llvmpipe. However for anything that uses GLX to work you need an X server. Instead of using Kdrive based servers (like Xvfb) I recommend using the regular Xorg server with the dummy driver. You'll have to write an xorg.conf for that.

What would be a good library to draw to the screen in c++? [closed]

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 1 year ago.
Improve this question
I am creating simulation that models how an gas behaves in a container. I have collision checking set up, however I would like to draw the data on screen to make sure it is working correctly
All I need is a simple way to draw simple shapes such as circles to the screen using c++. these shapes do not have to look great, just function.
I may want to move my simulation from 2D to 3D in the future as well - so a library that has 3D capabilities would be good.
Remember I will be looping through and drawing several hundred gas molecules, so fast would also be good.
I am fairly new to c++ as a language so go easy. My IDE/compiler is VS 2010 Professional.
I have already used google - but I can not find any good installation guide for installing the library. So an installation guide would be a big plus
Look at SDL with SDL_gfx. You can then switch to SDL/OpenGL to do 3D.
I would recommend OpenGL, it's easy to use for your task. Also it's cross-platform and you can easily switch to 3D.
OpenGL is one possibility, though there are also other libraries built on top of OpenGL that might be useful as well.
Edit: OpenGL itself is installed as part of the OS. Headers and libraries for OpenGL 1.1 are included with VS 2010, so if you don't need newer features, you're already set. If you want to use newer functions, you probably want to use GLEW or GLEE.

Performance Profiling of OpenGL Shaders [closed]

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 3 years ago.
Improve this question
Is there a tool available that can do performance profiling of OpenGL shaders?
nVidia PerfWorks can. They also have FX Composer, which includes some profiling with a graphical front-end (but FX Composer is now basically discontinued--you can still download it, but it's no longer being updated).
AMD/ATI's GPUPerfAPI and GPUPerfStudio provide similar capabilities. They also have GPU ShaderAnalyzer to do static analysis, but I believe it's restricted to DirectX shaders, not OpenGL.
If you run on Nvidia hardware there is also Nsight for Visual Studio resp. the standalone Nsight Graphics.
AMD's GPUPerfStudio even works without AMD hardware but you only get the API tracer (and the static shader analyzer if you use DirectX). The frame debugger and profiler tools depend on their hardware of course.
For Intel there is GPA. It doesn't support shader micro profiling though.
There is also the static (i.e. does not require hardware) Intel Shader Analyzer but not sure if it provides more than just the assembly: http://shader-playground.timjones.io/749ef0d908128a0ae8a824b93381bbf1
RenderDoc does not really have profiling capabilities at this point due to lack of time.
But some Intel perf counters for OpenGL have been added recently.