comp.lang.ada
 help / color / mirror / Atom feed
From: rakusu_klein@fastmail.jp
Subject: Re: Interface To C Struct That Includes An Array
Date: Tue, 18 Sep 2018 01:19:28 -0700 (PDT)
Date: 2018-09-18T01:19:28-07:00	[thread overview]
Message-ID: <01166054-3971-4df6-8af4-f9fc4d8a30c4@googlegroups.com> (raw)
In-Reply-To: <b3f11b70-002a-490b-8a67-9df4b2aeecb8@googlegroups.com>

Probably you pass a link to the whole record somewhere where expected only a link to the data field. The other explanation of binary garbage in the string is that you get somwhere a raw uncutted data, because the aiGetMaterialString cuts the 32-bit prefix and corrects the length in aiString field by itself.

понедельник, 17 сентября 2018 г., 15:01:43 UTC+3 пользователь rog...@iinet.net.au написал:
>    pragma Convention (C_Pass_By_Copy, API_String);
It doesn't seems to be a good idea for me to copy a kilobyte of data on every call.

> The returned Assimp_Path is Length: 16, Data:  B000phoenix.pcx0000
> in which B is a series of four small zeros inside a rectangle.
> I haven't been able to find a syntactical explanation for the four small zeros inside a rectangle.
As I can remember, this icon stays for nonprintable characters.

>       function API_Get_Material_Texture (aMaterial : access API_Material_Tex;
>                                          Tex_Type  : AI_Texture_Type;
>                                          Index     : Interfaces.C.unsigned;
>                                          Path      : access Assimp_Types.API_String := null;
>                                          Mapping   : access AI_Texture_Mapping := null;
>                                          UV_Index  : access Interfaces.C.unsigned := null;
>                                          Blend     : access Interfaces.C.C_float := null;
>                                          Op        : access AI_Texture_Op := null;
>                                          Map_Mode  : access AI_Texture_Map_Mode := null)
>                                          return Assimp_Types.API_Return;
I also notice, that you forget the last argument "unsigned int * flags".

  parent reply	other threads:[~2018-09-18  8:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 12:01 Interface To C Struct That Includes An Array rogermc
2018-09-17 12:11 ` rogermc
2018-09-17 15:25   ` Lucretia
2018-09-17 22:35     ` Roger
2018-09-18  0:45       ` Roger
2018-09-18  1:19         ` rogermc
2018-09-17 12:26 ` gautier_niouzes
2018-09-17 13:28   ` Roger
2018-09-17 13:55     ` gautier_niouzes
2018-09-17 14:03       ` Roger
2018-09-17 15:24 ` Lucretia
2018-09-17 23:06   ` Roger
2018-09-17 16:29 ` Jeffrey R. Carter
2018-09-17 22:57   ` Roger
2018-09-18  0:53   ` Roger
2018-09-18  4:18     ` Roger
2018-09-18  8:19 ` rakusu_klein [this message]
2018-09-18 11:54   ` rogermc
2018-09-18 12:21     ` Egil H H
2018-09-18 12:24       ` rogermc
2018-09-18 18:55     ` rakusu_klein
2018-09-18 21:28       ` rogermc
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox