Re: Function set-gl-vertex-array in Guile-opengl

2019-02-09 Thread Luis Souto Graña
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

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-31 Thread Luis Souto Graña
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)

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-28 Thread Luis Souto Graña
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

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Luis Souto Graña
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 -->

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Daniel Llorens
> 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

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Luis Souto Graña
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

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Luis Souto Graña
You're right. I suposse I was missing the argument type, I thought that "type bv-or-pointer" was one thing. I'm in Manjaro. I just did: Unzip guile-opengl-0.10.tar.gz $ ./configure --prefix=/usr $ make $ sudo make install And glut works well with (use-modules (gl) (glut)) The example of a circle

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Daniel Llorens
> 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

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Daniel Llorens
> 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->pointer points) 3) >> You should call set-gl-vertex-array like this

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-26 Thread Catonano
Hi Luis, I hadn't guile-opengl installed, so I downloaded, built it and installed 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-ve

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-25 Thread Luis Souto Graña
I don't know how to get *#vu8(0 0 240 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240...* *from srfi-4. The coordinates are for a SquareAnnulus: https://github.com/slackmoehrle/Computer-Graphics-Through-OpenGL-2nd/blob/master/Chapter3/SquareAnnulus1/squareAnnulus1.cpp

Re: Function set-gl-vertex-array in Guile-opengl

2019-01-25 Thread Daniel Llorens
Hi Luis, I don't really have an answer to your question, but I wanted to point out that Guile already has make-f32vector, f32vector-set!, etc. You don't need to define your own. IMO it's not a good idea to use bytevector-xxx-set!/ref to operate on typed vectors unless you are type punning.