Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Real Programmers don't eat quiche. They eat Twinkies and Szechwan food.


programming / comp.lang.smalltalk.dolphin / Re: How to receive an array of structs from an external library?

SubjectAuthor
* How to receive an array of structs from an external library?Zenchess
+- Re: How to receive an array of structs from an external library?John Aspinall
+* Re: How to receive an array of structs from an external library?Zenchess
|+* Re: How to receive an array of structs from an external library?bruno.brasesco
||`- Re: How to receive an array of structs from an external library?bruno.brasesco
|`- Re: How to receive an array of structs from an external library?kikogregoris
+- Re: How to receive an array of structs from an external library?john c
`- Re: How to receive an array of structs from an external library?Zenchess

1
Subject: How to receive an array of structs from an external library?
From: Zenchess
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sun, 8 Sep 2019 17:30 UTC
X-Received: by 2002:aed:2469:: with SMTP id s38mr19844567qtc.190.1567963825369;
Sun, 08 Sep 2019 10:30:25 -0700 (PDT)
X-Received: by 2002:a25:c708:: with SMTP id w8mr13560092ybe.358.1567963825193;
Sun, 08 Sep 2019 10:30:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no583586qtl.0!news-out.google.com!c11ni497qtp.0!nntp.google.com!o24no583576qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sun, 8 Sep 2019 10:30:24 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2600:8804:1200:6600:3c1b:7241:455c:8a52;
posting-account=r2EEkwoAAADz3M0x3Szspui4wqseZF5h
NNTP-Posting-Host: 2600:8804:1200:6600:3c1b:7241:455c:8a52
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
Subject: How to receive an array of structs from an external library?
From: zench...@gmail.com (Zenchess)
Injection-Date: Sun, 08 Sep 2019 17:30:25 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
I'm trying to interface with a GLFW method: const GLFWvidmode* glfwGetVideoModes ( GLFWmonitor * monitor,
int * count
)

the method returns an array of GLFWvidmode structs.  I have defined the GLFWvidmode struct in dolphin, but how do I specify in the external method that I am receiving a structarray of glfwvidmode's?


Subject: Re: How to receive an array of structs from an external library?
From: John Aspinall
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 9 Sep 2019 07:13 UTC
References: 1
X-Received: by 2002:ac8:2641:: with SMTP id v1mr18147626qtv.75.1568013227107;
Mon, 09 Sep 2019 00:13:47 -0700 (PDT)
X-Received: by 2002:a25:c611:: with SMTP id k17mr14071818ybf.28.1568013226885;
Mon, 09 Sep 2019 00:13:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no2271477qtl.0!news-out.google.com!c11ni694qtp.0!nntp.google.com!o24no2271473qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 9 Sep 2019 00:13:46 -0700 (PDT)
In-Reply-To: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.203.67.95; posting-account=OQ6sIwoAAAC1iWrFEUhdmRsgEkeDOgOm
NNTP-Posting-Host: 85.203.67.95
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ea9564b6-a51b-418d-80ca-e825c255f26f@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: john.asp...@gmail.com (John Aspinall)
Injection-Date: Mon, 09 Sep 2019 07:13:47 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
I've not needed to do this myself but I think

StructureArray*

....may be what you need. You'd then need to send:

elementClass: GLFWvidmode

....to the resulting StructureArray to access its elements as GLFWvidmode instances.

Hope this helps.

John


On Sunday, September 8, 2019 at 6:30:26 PM UTC+1, Zenchess wrote:
I'm trying to interface with a GLFW method: const GLFWvidmode* glfwGetVideoModes ( GLFWmonitor * monitor,
int * count
)

the method returns an array of GLFWvidmode structs.  I have defined the GLFWvidmode struct in dolphin, but how do I specify in the external method that I am receiving a structarray of glfwvidmode's?



Subject: Re: How to receive an array of structs from an external library?
From: Zenchess
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 9 Sep 2019 21:38 UTC
References: 1
X-Received: by 2002:a0c:fbcb:: with SMTP id n11mr9329721qvp.144.1568065099908;
Mon, 09 Sep 2019 14:38:19 -0700 (PDT)
X-Received: by 2002:a25:838f:: with SMTP id t15mr5237812ybk.39.1568065099624;
Mon, 09 Sep 2019 14:38:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!o24no3654129qtl.0!news-out.google.com!c11ni745qtp.0!nntp.google.com!o24no3654123qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Mon, 9 Sep 2019 14:38:19 -0700 (PDT)
In-Reply-To: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2600:8804:1200:6600:3c85:82ad:af44:3164;
posting-account=r2EEkwoAAADz3M0x3Szspui4wqseZF5h
NNTP-Posting-Host: 2600:8804:1200:6600:3c85:82ad:af44:3164
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3b5d0782-ac75-47a8-a5c4-aeea456968fd@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: zench...@gmail.com (Zenchess)
Injection-Date: Mon, 09 Sep 2019 21:38:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 18
View all headers
Thanks John, worked perfect after setting the length: of the StructureArray to the length returned by the getVideoModes call.  I thought I'd never get this to work :)

  If anyone is interested in what I'm working on:  OpenGL Core profile (3.3) + GLFW for window creation, let me know and I'll do what I can to release it.  I've managed to follow some tutorials and render 1000 textured cubes and I get about 130 fps, (much higher fps like 6000 or so on simpler scenes).

  The only problem with me releasing it is I'm using some code for dolphin in opengl that was made by KikoST from this group, however I haven't been able to contact him and I don't know if it's ok to release it.  I could re-write everything myself but it's a major pain.

  My eventual goal here is to have a 3d engine, a 2d engine, and integration with OpenVR so I can make VR games from dolphin!

  I have the smalltalk bug, I hate using anything but smalltalk :)


Subject: Re: How to receive an array of structs from an external library?
From: bruno.br...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 10 Sep 2019 13:53 UTC
References: 1 2
X-Received: by 2002:a05:620a:159b:: with SMTP id d27mr29704901qkk.298.1568123635907;
Tue, 10 Sep 2019 06:53:55 -0700 (PDT)
X-Received: by 2002:a0d:c306:: with SMTP id f6mr8789193ywd.427.1568123635542;
Tue, 10 Sep 2019 06:53:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no5199168qtl.0!news-out.google.com!c11ni855qtp.0!nntp.google.com!o24no5199163qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 10 Sep 2019 06:53:55 -0700 (PDT)
In-Reply-To: <3b5d0782-ac75-47a8-a5c4-aeea456968fd@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=190.64.0.201; posting-account=9bXKwQoAAABPQazYnK93PaH66oPYo6yw
NNTP-Posting-Host: 190.64.0.201
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com> <3b5d0782-ac75-47a8-a5c4-aeea456968fd@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f2e4f96f-aec7-4641-8558-c35f0e5b306d@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: bruno.br...@gmail.com
Injection-Date: Tue, 10 Sep 2019 13:53:55 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Hi,

kikoST is from Argentina, his complete name is Jose Gregoris. But i was unable to contact him.
I sent a mail to two different accounts, one failed. Lets hope that the second account is still active.

This info come from a Smalltalk group in Argentina that i contacted today.

But it seems that his no active in the community.

If i have any news i will post it here...

regards,
bruno


Subject: Re: How to receive an array of structs from an external library?
From: bruno.br...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 10 Sep 2019 15:41 UTC
References: 1 2 3
X-Received: by 2002:aed:3e8d:: with SMTP id n13mr6726266qtf.116.1568130114891;
Tue, 10 Sep 2019 08:41:54 -0700 (PDT)
X-Received: by 2002:a25:848e:: with SMTP id v14mr1908418ybk.407.1568130114583;
Tue, 10 Sep 2019 08:41:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!o24no5413425qtl.0!news-out.google.com!q23ni110qtl.1!nntp.google.com!o24no5413415qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 10 Sep 2019 08:41:54 -0700 (PDT)
In-Reply-To: <f2e4f96f-aec7-4641-8558-c35f0e5b306d@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=190.64.0.201; posting-account=9bXKwQoAAABPQazYnK93PaH66oPYo6yw
NNTP-Posting-Host: 190.64.0.201
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
<3b5d0782-ac75-47a8-a5c4-aeea456968fd@googlegroups.com> <f2e4f96f-aec7-4641-8558-c35f0e5b306d@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d7299680-39e8-4daa-8671-41436191d244@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: bruno.br...@gmail.com
Injection-Date: Tue, 10 Sep 2019 15:41:54 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
View all headers
Hi,

I have contacted Jose Gregoris, this is his response (original in spanish - and translated to english). If you need the origianl mail i can resend it to you.
Summary: He allow the package to be published.

Spahish:
Hola Bruno !
Ni me acordaba de que habia echo eso. Dale con gusto. Hace mucho que deje de programar :(  .
Si le sirve a alguien que lo use y no tiene que poner nada al respecto mio  si no quiere
saludos

English:
Hi Bruno !
I didn't even remember that I had done that. Do it as you want.
It's been a long time since I stopped programming :(
If it useful for someone then uses it and even you don't have to put anything about it if you don't want to.
regards


Subject: Re: How to receive an array of structs from an external library?
From: kikogreg...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 10 Sep 2019 15:42 UTC
References: 1 2
X-Received: by 2002:ac8:724f:: with SMTP id l15mr5724531qtp.86.1568130147107;
Tue, 10 Sep 2019 08:42:27 -0700 (PDT)
X-Received: by 2002:a25:902:: with SMTP id 2mr5293797ybj.99.1568130146779;
Tue, 10 Sep 2019 08:42:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!o24no5414466qtl.0!news-out.google.com!q23ni110qtl.1!nntp.google.com!o24no5414462qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Tue, 10 Sep 2019 08:42:26 -0700 (PDT)
In-Reply-To: <3b5d0782-ac75-47a8-a5c4-aeea456968fd@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=158.46.48.166;
posting-account=WzcicQoAAAD6zzje4qefyts2yzecYnL1
NNTP-Posting-Host: 158.46.48.166
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com> <3b5d0782-ac75-47a8-a5c4-aeea456968fd@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6940be0b-b766-493b-85cd-69c8ed20e4db@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: kikogreg...@gmail.com
Injection-Date: Tue, 10 Sep 2019 15:42:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 27
View all headers
El martes, 10 de septiembre de 2019, 4:38:20 (UTC+7), Zenchess  escribió:
Thanks John, worked perfect after setting the length: of the StructureArray to the length returned by the getVideoModes call.  I thought I'd never get this to work :)

  If anyone is interested in what I'm working on:  OpenGL Core profile (3..3) + GLFW for window creation, let me know and I'll do what I can to release it.  I've managed to follow some tutorials and render 1000 textured cubes and I get about 130 fps, (much higher fps like 6000 or so on simpler scenes).

  The only problem with me releasing it is I'm using some code for dolphin in opengl that was made by KikoST from this group, however I haven't been able to contact him and I don't know if it's ok to release it.  I could re-write everything myself but it's a major pain.

  My eventual goal here is to have a 3d engine, a 2d engine, and integration with OpenVR so I can make VR games from dolphin!

  I have the smalltalk bug, I hate using anything but smalltalk :)

Hi  Zenchess


Use the code without problem

regards


Subject: Re: How to receive an array of structs from an external library?
From: john c
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 11 Sep 2019 12:40 UTC
References: 1
X-Received: by 2002:a37:696:: with SMTP id 144mr36711411qkg.184.1568205615333;
Wed, 11 Sep 2019 05:40:15 -0700 (PDT)
X-Received: by 2002:a25:838f:: with SMTP id t15mr10955836ybk.39.1568205614725;
Wed, 11 Sep 2019 05:40:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!o24no7883740qtl.0!news-out.google.com!c11ni959qtp.0!nntp.google.com!o24no7883730qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 11 Sep 2019 05:40:14 -0700 (PDT)
In-Reply-To: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=174.63.38.173;
posting-account=FxwEXgoAAADcSnrOjqy8Iwckyp5OTz8K
NNTP-Posting-Host: 174.63.38.173
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c0094a78-633d-42a5-a448-eb3290ca5075@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: jndbusin...@gmail.com (john c)
Injection-Date: Wed, 11 Sep 2019 12:40:15 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 3
X-Received-Bytes: 1427
X-Received-Body-CRC: 1172458232
View all headers

well done bruno!

john cummings


Subject: Re: How to receive an array of structs from an external library?
From: Zenchess
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 11 Sep 2019 14:19 UTC
References: 1
X-Received: by 2002:a05:620a:3d9:: with SMTP id r25mr3012795qkm.384.1568211577494;
Wed, 11 Sep 2019 07:19:37 -0700 (PDT)
X-Received: by 2002:a25:838f:: with SMTP id t15mr11322135ybk.39.1568211577204;
Wed, 11 Sep 2019 07:19:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no8094334qtl.0!news-out.google.com!q23ni192qtl.1!nntp.google.com!o24no8094332qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.smalltalk.dolphin
Date: Wed, 11 Sep 2019 07:19:36 -0700 (PDT)
In-Reply-To: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2600:8804:1200:6600:3c85:82ad:af44:3164;
posting-account=r2EEkwoAAADz3M0x3Szspui4wqseZF5h
NNTP-Posting-Host: 2600:8804:1200:6600:3c85:82ad:af44:3164
References: <c2f8d663-5e1d-461b-b649-e7001e70cb22@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bf9f25b7-4782-47d2-89db-223d9853eee9@googlegroups.com>
Subject: Re: How to receive an array of structs from an external library?
From: zench...@gmail.com (Zenchess)
Injection-Date: Wed, 11 Sep 2019 14:19:37 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
View all headers
Wow Bruno thank you very much!  Also thank you Kiko, hope all is well.


As for the packages, I am currently using the tutorial here: https://learnopengl.com/In-Practice/2D-Game/Breakout somewhat as a guide for a 2d game demo, then I'll release what I've got.  I'll also release with the 3d stuff I've been working on (even though I haven't gone through the lighting chapters etc), I'll try to clean up the classes a bit first though.

OpenVR is proving a little more difficult to interface with unfortunately.  I'll make a new post with that external interfacing problem.


1
rocksolid light 0.7.2
clearneti2ptor