comp.lang.ada
 help / color / mirror / Atom feed
* AdaSDL and glTexImage2D
@ 2003-01-29 10:09 Stefan Soos
  2003-01-29 20:15 ` Chad R. Meiners
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Soos @ 2003-01-29 10:09 UTC (permalink / raw)



Hello,

I'm doing some programming in Ada with the thin binding to the SDL
library. I'd like to create some textured objects, but there I run
into some problems. My texture data is stored in an SDL surface:

Image : SDL.Video.Surface_ptr;

The actual data can be read from Image.Pixels. Now, I'd like to call
glTexImage2D:
         glTexImage2D (GL_TEXTURE_2D,
                       0,
                       GLint (GL_RGBA),
                       GLsizei (Width), GLsizei (Height),
                       0,
                       GL_RGBA,
                       GL_UNSIGNED_BYTE,
                       GLubyte_Array (Image.Pixels));
but this doesn't work. How can I convert Image.Pixels (wich is
actually defined as System.Address) to an array of GLubyte?

Thanks in advance and bye,
Stefan

-- 
include/asm-mips64/unistd.h:    
/* These are here for sake of fucking
lusercode living in the fucking believe
having to fuck around with the syscall interface themselfes.  */



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-30  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-29 10:09 AdaSDL and glTexImage2D Stefan Soos
2003-01-29 20:15 ` Chad R. Meiners
2003-01-30  9:52   ` Stefan Soos

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