Hi,

Using OpenGL to draw something that will end up on paper might prove
somewhat complicated. As for "translating" a shader to something cpu
bound, since a shader is more or less a program in some language that
"has some remote parentness with C", you could probably do it. But the
most pragmatic way, IMHO, is to understand what the program does and
rewrite it. If you really want to leverage OpenGL's power, I know it
allows you to render "in memory" so you could draw things on a virtual
screen, grab the output, and you're set. To some extent, recent OpenGL
with shaders is more or less a generic way to harness the power of
massive parallel, dedicated hardware, and it's very versatile. But
complex as well.

If you are not a graphics guru, I'd advice you to use a plain simple
native Go library, there are several candidates, one is :

https://github.com/llgcode/draw2d/

Have a nice day,

Christian.

On 06/20/2016 05:02 PM, bluebl...@gmail.com wrote:
> <https://lh3.googleusercontent.com/-bPOQJTHF8Js/V2gEJqUg5jI/AAAAAAAAACI/lg6cWG0cJqo0tFl4wsuDYF2w4kycTbRPACLcB/s1600/blank.png>
> 
> 
> I am attempting to generate a random starfield, in go. This is something
> that will need to printed on actual paper, but that is another issue and
> I only mention it to give some context for what I am doing here: Using
> go to create graphics to pair with something I'm already doing in go
> (I've been through several iterations of trying to use the go parts I
> have with numerous variations of tex/latex templates using asymptote,
> and I reached a point of frustration where I figured why not just do it
> all in go, as it seems less a problem than I originally thought -- but
> opens a new set of problems to solve, one of the biggest is that I know
> nothing at all about graphics, let alone how to apply graphics in go).
> 
> Cosmic1 from: 
> https://gist.github.com/thrisp/1ed1785ac6a902585595fb8cb52f0a16,
> generates the above it is the first thing that even roughly approximates
> what I want to do.
> 
> Any thoughts, or help cleaning that up. Maybe tell me why exactly I
> can't directly translate an opengl shader to something cpu bound(which I
> suspect is a thing, I may need to do more that I can't see right now).
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to golang-nuts+unsubscr...@googlegroups.com
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
Christian Mauduit
uf...@ufoot.org
http://www.ufoot.org
int q = (2 * b) || !(2 * b);

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to