glDrawPixels possible?

Guiserver, GTK-server, OpenGL, PostScript,

glDrawPixels possible?

Postby ant » Mon Oct 24, 2011 9:36 pm

Is it possible to use glDrawPixels from a newLISP script? I want to display an image I've constructed in an array of RGB values.

If it is possible, could you point me to the documentation or an example?

If it isn't possible, am I trying to do something newLISP is not designed for?
Posts: 11
Joined: Mon Oct 24, 2011 9:29 pm

Re: glDrawPixels possible?

Postby Lutz » Tue Oct 25, 2011 7:13 am

Here is an example how to import functions from OpenGL: ... mo-lsp.txt

It does not contain the glPixelDraw import, but shows how to import other functions and how to setup a window to draw in.

For the data in const GLvoid * data, you would use a string buffer produced with the 'pack' function
from the data points. Depending on the data type specified in GLenum type, you would use the correct
formatting character in 'pack'.

See also: ... tml#import

and: ... tml#toc-23
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: glDrawPixels possible?

Postby ant » Tue Oct 25, 2011 7:39 pm

Hi Lutz, Thanks for the info. I'm trying it now but I haven't succeeded in getting anything on the screen yet. I'll keep at it. Ant
Posts: 11
Joined: Mon Oct 24, 2011 9:29 pm

Return to newLISP Graphics & Sound

Who is online

Users browsing this forum: No registered users and 2 guests