From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,baa28c83dcb4b216,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!Spring.edu.tw!news.nctu.edu.tw!feeder.seed.net.tw!attdv1!ip.att.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: "Alfredo Macias" Newsgroups: comp.lang.ada Subject: OpenGL Texture mapping Date: Thu, 16 Dec 2004 10:45:14 -0800 Organization: Lockheed Martin Corporation Message-ID: NNTP-Posting-Host: 134.116.5.79 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:6999 Date: 2004-12-16T10:45:14-08:00 List-Id: Hi all, I'm working on an Ada project that renders 3D graphics. While I'm using openGl with no problems for 3D graphics, I'm trying to implement texutre mapping. I'm getting the code for texture mapping from a working CPP project. However, I'm having trouble getting the translated code to compile in Ada. Here is the code: -------------------------------------- type Unsigned_Char_Type is new Interfaces.C.Unsigned_Char; type Pix_Color_Type is array (1 .. 3) of aliased Unsigned_Char_Type; type Data_Buffer_Type is array (Positive range <>) of aliased Pix_Color_Type; Width : Integer := 256; Height: Integer := 256; Data : Data_Buffer_Type; ------------------------------------ Gl.GlTexImage2D( Gl.Gl_TEXTURE_2D, Gl.Glsizei(0), Gl.Pixelformatenm'(Gl.Gl_Rgb), Gl.Glsizei(Width), Gl.Glsizei(Height), Gl.Glsizei(0), Gl.Pixelformatenm'(Gl.Gl_Rgb), Gl.Pixeldatatypeenm'(Gl.Gl_Unsigned_Byte), Gl.Glpointer (Gl_Pointer_Conversions.To_Pointer (Data(1)(1)'Address))); ----------------------------------------------------- This is the nasty message I recevie from the compiler; which tells me close to nothing. (A also tried without type casting, but got the same message) 1/2: COMP graphics.platforms.renderers(body) rsd/adalib 2498: Gl.GlTexImage2D( ---------------- ... 2509: (Data(1)(1)'Address))); ---------------------- >>> SEMANTIC: Unresolvable expression <8.3, 8.6:28> Any ideas why this code is not compiling? Any help would be greatly appreciated.