gl.ReadPixels

Discussion on writing scripts for LuaAV

gl.ReadPixels

Postby caseymongoven on Wed Nov 11, 2009 10:13 am

Hi guys,

I was just looking at the opengl bindings for LuaAV and noticed that the gl.ReadPixels function has been commented out. I am interested in using glu.unproject to get mouse coordinates and I read somewhere that readpixels can be used to pass z. Is this true?

Casey
caseymongoven
 
Posts: 7
Joined: Tue Oct 06, 2009 6:06 pm

Re: gl.ReadPixels

Postby whsmith on Tue Nov 17, 2009 11:32 pm

Are you trying to figure out what the z value of glu.UnProject should be? Not exactly sure what you're asking.

wes
whsmith
 
Posts: 13
Joined: Sun Oct 04, 2009 12:18 pm

Re: gl.ReadPixels

Postby whsmith on Wed Nov 18, 2009 3:12 pm

Here's a sample script to answer your question. Basically it requires a ray-plane intersection.
wes
Attachments
opengl.pick.lua
(1.54 KiB) Downloaded 563 times
whsmith
 
Posts: 13
Joined: Sun Oct 04, 2009 12:18 pm


Return to LuaAV Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron