World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 03-04-2011, 08:22 PM   #1
peterdn1
Senior Member
 
Join Date: Feb 2007
Posts: 143
peterdn1 is on a distinguished road
Default request for null check in DrawContextImpl.drawUnitQuad

I am frequently getting the following exception from my icons layer. My work around has been to check that the texCoords are not null. Would it be possibly to add this check to this method.

Thanks
-Peter
SEVERE: Exception while rendering icon
java.lang.NullPointerException at gov.nasa.worldwind.render.DrawContextImp l.drawUnitQuad(DrawContextImpl.java:513)


public void drawUnitQuad(TextureCoords texCoords)
{
if(texCoords!=null){
GL gl = this.getGL();
gl.glBegin(GL.GL_QUADS);
gl.glTexCoord2d(texCoords.left(), texCoords.bottom());
gl.glVertex2d(0d, 0d);
gl.glTexCoord2d(texCoords.right(), texCoords.bottom());
gl.glVertex2d(1, 0d);
gl.glTexCoord2d(texCoords.right(), texCoords.top());
gl.glVertex2d(1, 1);
gl.glTexCoord2d(texCoords.left(), texCoords.top());
gl.glVertex2d(0d, 1);
gl.glEnd();
}
}
peterdn1 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use "GetMap" request jurio Developers' Corner 1 02-23-2010 06:21 PM
Compute bbox for GetFeatureInfo request ? sgeindre Development Help 2 06-02-2009 11:42 AM
Tile request to Lat/Lon peterdn1 Development Help 2 05-17-2008 04:42 PM
RE: Map Projection Plugin Request + 10Seven Add-on & Script Development 4 08-19-2005 04:18 AM
Small Feature Request List Kdee Suggestion Box 3 09-29-2004 08:13 PM


All times are GMT +1. The time now is 09:04 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.