comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Strange behaviour of IDLgrPolygon
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Strange behaviour of IDLgrPolygon [message #92232] Tue, 03 November 2015 13:16 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi guys,


Why in the following example the polygon only appears while we are clicking a mouse?

;; ------------------------------------------------------------ ----------
model = obj_new('IDLgrModel')

f = filepath('people.jpg', subdir=['examples', 'data'])
ali = read_image(f)
texture = obj_new('IDLgrImage', ali)

tcoords = [[0.0, 1.0], [0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
polygon = obj_new('IDLgrPolygon', tcoords, polygons=[4, 0, 1, 2, 3], $
color=[255, 255, 255], $
texture_map=texture, texture_interp=1, $
texture_coord=tcoords)

model->add, polygon

xobjview, model
;; ------------------------------------------------------------ ----------

I don't see the logic...
Thank you in advance for you help,

nata
Re: Strange behaviour of IDLgrPolygon [message #92233 is a reply to message #92232] Tue, 03 November 2015 16:27 Go to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Tuesday, November 3, 2015 at 2:16:19 PM UTC-7, nata wrote:
> Hi guys,
>
>
> Why in the following example the polygon only appears while we are clicking a mouse?
>
> ;; ------------------------------------------------------------ ----------
> model = obj_new('IDLgrModel')
>
> f = filepath('people.jpg', subdir=['examples', 'data'])
> ali = read_image(f)
> texture = obj_new('IDLgrImage', ali)
>
> tcoords = [[0.0, 1.0], [0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
> polygon = obj_new('IDLgrPolygon', tcoords, polygons=[4, 0, 1, 2, 3], $
> color=[255, 255, 255], $
> texture_map=texture, texture_interp=1, $
> texture_coord=tcoords)
>
> model->add, polygon
>
> xobjview, model
> ;; ------------------------------------------------------------ ----------
>
> I don't see the logic...
> Thank you in advance for you help,
>
> nata

IDL 8.5 on Window 7-64 properly displays this properly, using hardware rendering.

If you switch to software rendering and the image then displays correctly, the implication is that you may need an updated driver for your graphics card.

Jim P.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: not an IDL question.... scrolling in nedit
Next Topic: Re: how to read the block data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:17:34 PDT 2025

Total time taken to generate the page: 0.00362 seconds