OpenGL Texture mapping
From: Alfredo Macias (alfredom_at_sbceo.org)
Date: 12/16/04
- Previous message: Alex R. Mosteo: "Re: Efficiently setting up large quantities of constant data"
- Next in thread: tmoran_at_acm.org: "Re: OpenGL Texture mapping"
- Reply: tmoran_at_acm.org: "Re: OpenGL Texture mapping"
- Reply: Martin Krischik: "Re: OpenGL Texture mapping"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Dec 2004 10:45:14 -0800
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> <RM83 8.3, 8.7:3>
Any ideas why this code is not compiling?
Any help would be greatly appreciated.
- Previous message: Alex R. Mosteo: "Re: Efficiently setting up large quantities of constant data"
- Next in thread: tmoran_at_acm.org: "Re: OpenGL Texture mapping"
- Reply: tmoran_at_acm.org: "Re: OpenGL Texture mapping"
- Reply: Martin Krischik: "Re: OpenGL Texture mapping"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]