Re: GPU programming in Forth
- From: "Charles Melice" <cm@xxxxxxxxxxxx>
- Date: Fri, 13 Jan 2006 21:46:40 +0100
<jpai@xxxxxxxxxxxxxx> a écrit dans le message de news:
1137142729.890444.168360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have a project in need of more speed and with parallel
> characteristics that I envision will benefit from GPU usage. While I
> am
> reading materials about GPU, I would appreciate some pointers to the
> information about GPU programming in Forth as my project is written in
> Forth. Can I access GPU directly from Forth or I still need to go
> though OpenGL or DirectX?
In OpenGl, "OpenGL Shading Language" (glslang) shaders programs,
have to be send to the GPU only using the OpenGL API.
So you have to go though OpenGl.
But you can write the interface in Forth to quickly test
shader programs. Here is a pseudo word to do that.
: TEST_SHADER ( zFragmentShader zVertexShader -- flag )
0 locals| shader zVertexShader zFragmentShader |
false
gl_HaveExtensionGlSLang? -EXIT
CreateShaderProgram dup to shader -EXIT
shader zVertexShader CompileVertexShader -EXIT
shader zFragmentShader CompileFragmentShader -EXIT
shader LinkShader
ExposeScene ;
Charles
> Any information regarding this topic will be
> appreciated.
>
> Thanks in advance!
>
.
- References:
- GPU programming in Forth
- From: jpai
- GPU programming in Forth
- Prev by Date: Re: RfD: One-time file loading
- Next by Date: Re: RfD: One-time file loading
- Previous by thread: Re: GPU programming in Forth
- Next by thread: Re: GPU programming in Forth
- Index(es):
Relevant Pages
|