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
Developer
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified

Opengl ES texture matrix problems

I am having problems using the texture matrix to animate tracks on my tank models.  Basiclly it's just not working at all.  The texture coordinates aren't destoryed or anything, they just aren't animating.  Now normally I would assume it's a bug in my code but it works in the simulator, just not on device.  So I whipped up a sample so I could send it to the issue tracking but oddly enough the sample works on both the simulator and the device. 

 

Now I know that the simulator is using a PC driver to implement the rendering but this really makes it hard to find the problem.  I have spent over 6 hours writing a sample and then trying to break the sample and/or fix the game each BB boot. I am still unable to determine the problem.  Perhaps there is a limitation with that hardware that doesn't allow for the texture matrix to be used if another feature is being used?  I know early video cards had issues like this for user clipping planes. 

 

So my point is, who do you ask?  For that matter where can I get any information as to the fast paths for the gpu? 

 

Leigh

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: Opengl ES texture matrix problems

I tried doing a quick search but could not find what I think you are trying to get at so I can't find a sample that you can compare against.

 

Now correct me if I'm wrong but you are trying to animate a 2D texture over a piece of geometry?

 

Now is the code (not the sample) working or not on the device? If your sample is working then see what differences there are and try to get it working with the actual program.

---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.
Developer
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified

Re: Opengl ES texture matrix problems

Thank you for the response. 

 

Yes I am animating a 2d texture over geometry.  The code isn't working on the device but the sample is.  The problem is that the working code is a game which consists of around 100 files of java code and 3M of data.  So trying to find the difference is really hard.  The sample started out as a 2d quad with a texture and has turned into a full lit piece of geometry.  At some point the sample will become the game Smiley Happy

 

I am actually starting to think it's a waste of time since it's almost definitely a bug or shall we say oddity with the OS.  So when I ship it will still be there.  It's really frustrating since the sample works on device and simulator and the game only works on the simulator.

 

 

Highlighted
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: Opengl ES texture matrix problems

[ Edited ]

I wouldn't give up just yet, it's the little things that matter. I wasn't expecting it to be easy but I don't have enough experience with OpenGL ES to do this off the top head. I will try to do some searches and maybe some testing to try and help you but no guarantees. Good luck for now.

 

Update:

Ok, so I looked at a couple texture mapping tutorials. Mainly http://www.zeuscmd.com/tutorials/opengles/17-TextureMapping.php and just from looking at what is required I wonder how you do the animation. Do you change the UVs and then call glTexCoordPointer? If you do it in a different manner then I need to do some more research but that would/should (based on what I understand) work.

---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.