Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 7
Registered: ‎05-08-2009
My Device: Not Specified

GLUtils.gluPerspective problem

Hi.

I have some openGL code:

 

gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadIdentity();
GLUtils.gluPerspective(gl, fov, aspect, znear, 20000f);
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

 

But when I run it GLUtils.gluPerspective throw IllegalArgumentException. But from API http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/opengles/GLUtils.html#gluPersp... Method throw "IllegalArgumentException - if gl is null.". But it is 100% not null. Where is problem?

 

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: GLUtils.gluPerspective problem

what is the value of "fov", "aspect", and "znear"?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.