I found the mistake. I only had to add two lines. It works.
(use-modules (gl) (glut))
(use-modules (gl contrib packed-struct))
(define-packed-struct vertices
(x float)
(y float)
(z float)
(r float)
(g float)
(b float))
(define vertices-square (make-packed-array vertices 4))
(pack ver
I think I almost have it. I made a minimal example with a square. It starts
but the square doesn't appear. If anyone finds where the fault is, please
let me know.
(use-modules (gl) (glut))
(use-modules (gl contrib packed-struct))
(define-packed-struct vertices
(x float)
(y float)
(z float)
Andy Wingo doesn't use f32vectors, he uses packed-struct.scm https://
github.com/guildhall/guile-opengl/blob/master/gl/contrib/packed-struct.scm
. There are bytevector-ieee-single-native-set in it.
It works because I wrote:
$ cd /home/spectrumgomas/guile-opengl-01.0/examples/particle-system
$ gui
Thank a lot, now at least I have clear f32vector structure.
El sáb., 26 ene. 2019 a las 16:39, Daniel Llorens (<
daniel.llor...@bluewin.ch>) escribió:
>
>
> > On 26 Jan 2019, at 17:05, Luis Souto Graña
> wrote:
> >
> > The structure of my byvector is:
> >
> > 30.0(float) --- IEE754 converter -->
> On 26 Jan 2019, at 17:05, Luis Souto Graña wrote:
>
> The structure of my byvector is:
>
> 30.0(float) --- IEE754 converter --> 0x41F0 (hexadecimal) --- little
> endian ---> F041 --- hexadecimal to decimal converter ---> 00 00 240 65
>
> But I didn't notice and there's a lot of z
The structure of my byvector is:
30.0(float) --- IEE754 converter --> 0x41F0 (hexadecimal) --- little
endian ---> F041 --- hexadecimal to decimal converter ---> 00 00 240 65
But I didn't notice and there's a lot of zeros before the next 00 00 240
65.
I have to study what is the structur
> it uust to see if I could reproduce this error you are running into
>
> Il giorno ven 25 gen 2019 alle ore 15:58 Luis Souto Graña <
> luissoutob...@gmail.com> ha scritto:
>
>> Hello, I'm trying to use the function set-gl-vertex-array in Guile-opengl
>> .
>&
> On 26 Jan 2019, at 13:52, Daniel Llorens wrote:
>
>
>
>> On 26 Jan 2019, at 02:33, Luis Souto Graña wrote:
>
>
,apropos set-gl-vertex-array
>>> (gl): set-gl-vertex-array#>> bv-or-pointer #:optional size #:key stride offset)>
>>>
>>>
(set-gl-vertex-array (bytevector
't understand the purpose of (* n 30) on your code. The original you
> link has (* n 4) which is what I'd expect for f32.
>
> Regards
>
> Daniel
>
>
>> From: Luis Souto Graña
>> Subject: Function set-gl-vertex-array in Guile-opengl
>>
the function set-gl-vertex-array in Guile-opengl .
> It needs a bytevector as an argument. I wrote this doing a copy-paste from
> here: https://github.com/marcomaggi/vicare/blob/master/attic/lab/gears.scm
>
> (use-modules (rnrs bytevectors))
> (use-modules (system foreign))
>
&g
has (* n 4) which is what I'd expect for f32.
>
> Regards
>
> Daniel
>
>
> *From: *Luis Souto Graña
> *Subject: **Function set-gl-vertex-array in Guile-opengl*
> *Date: *25 January 2019 at 11:36:33 CET
> *To: *guile-user@gnu.org
>
>
> Hello, I'm trying
> Subject: Function set-gl-vertex-array in Guile-opengl
> Date: 25 January 2019 at 11:36:33 CET
> To: guile-user@gnu.org
>
>
> Hello, I'm trying to use the function set-gl-vertex-array in Guile-opengl .
> It needs a bytevector as an argument. I wrote this doing a copy-p
Hello, I'm trying to use the function set-gl-vertex-array in Guile-opengl .
It needs a bytevector as an argument. I wrote this doing a copy-paste from
here: https://github.com/marcomaggi/vicare/blob/master/attic/lab/gears.scm
(use-modules (rnrs bytevectors))
(use-modules (system fo
13 matches
Mail list logo