[Haskell-cafe] a textured quad/triangle

Vlad Lopatin madjestic13 at gmail.com
Wed Oct 22 21:19:29 UTC 2014


Thank you, Oliver and Schell,

Thanks to combined wisdom of both of you, I was able to produce the
following thing:
tutorial (wip)
<https://github.com/madjestic/Haskell-OpenGL-Tutorial/tree/master/tutorial10>

https://github.com/madjestic/Haskell-OpenGL-Tutorial/tree/master/tutorial10


I hope, when finished, some future noob may find it helpful.
Cheers,
Vlad

On 21 October 2014 13:12, Oliver Charles <ollie at ocharles.org.uk> wrote:

> During 24 Days of Hackage last year, I wrote some basic code to get a
> spinning triangle on screen, using VBOs and shaders. You can find the code
> for this at
> https://github.com/ocharles/blog/blob/master/code/2013-12-02-linear-example.hs
> .
>
> To do texturing, it's not much more complicated. My toy "hadoom" project
> (a Doom-like engine in Haskell) uses texturing - but obviously there's more
> code to wade through there. I think the relevant stuff will be
>
> * Loading:
> https://github.com/ocharles/hadoom/blob/420597915f115d608192cfb32e6087f7e9044732/hadoom/Material.hs#L21
> * Binding:
> https://github.com/ocharles/hadoom/blob/420597915f115d608192cfb32e6087f7e9044732/hadoom/Material.hs#L84
> * Using in a shader:
> https://github.com/ocharles/hadoom/blob/420597915f115d608192cfb32e6087f7e9044732/shaders/fragment/solid-white.glsl#L48
>
> You'll have to do some grep'ing to see how it all fits together. You'll
> also need to add UV coordinates to the triangle.
>
> Hope this provides enough information to help you get started. If you're
> comfortable on IRC, you might want to swing by #haskell-game on Freenode,
> where we're trying to build a Haskell game/graphics dev community.
> - ocharles
>
> On Tue, Oct 21, 2014 at 11:24 AM, Vlad Lopatin <madjestic13 at gmail.com>
> wrote:
>
>> Hello,
>>
>> I am looking for a working example of texture binding, using VBOs and
>> OpenGL4+ standard.  A textured quad/triangle would be great.  Does anybody
>> have one?
>>
>>
>> Regards,
>> Vlad
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141022/ec4b0277/attachment.html>


More information about the Haskell-Cafe mailing list