This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Textures in OpenGL ES


Textures in OpenGL ES

Postby CountZero » Aug 22, 2007 @ 11:02pm

CountZero
pm Member
 
Posts: 21
Joined: Aug 3, 2007 @ 11:02pm


Re: Textures in OpenGL ES

Postby kuroneko » Aug 23, 2007 @ 7:25am

kuroneko
pm Member
 
Posts: 14
Joined: Mar 27, 2007 @ 5:38am


Postby edge » Aug 23, 2007 @ 8:40am

Hi Countzero,

Kuroneko is correct, you need to re-upload the texture after it is changed. Also, you need to set the cleardata parameter to false when using UploadTexture().

I'm afraid it will have a negative impact on performance, because the uploading takes some time. While uploading, the texture is converted to an optimized layout which is one of the reasons texture uploading is slow.
Last edited by edge on Aug 24, 2007 @ 12:05pm, edited 1 time in total.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby CountZero » Aug 23, 2007 @ 9:04pm

Thanks, that fixed the problem but hit the framerates signficantly. What causes the overhead in the UploadTexure method? Is it just a wrapper for glTexImage2d() ?

Cheers!
CountZero
pm Member
 
Posts: 21
Joined: Aug 3, 2007 @ 11:02pm


Postby edge » Aug 24, 2007 @ 10:07am

Hi Countzero,

Yes, the overhead is caused by glTexImage2D, because it needs to re-arrange the pixel layout (for render optimization purposes).

The speed of texture uploading can also differ between OpenGL (ES) implementations.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


OpenGLES texture disappears

Postby fuzzychicken » Sep 14, 2007 @ 4:16am

Hi all,

I am also trying to use Opengles (glGenTextures & glTexImage2D) just to load and render my own texture on N95. It works fine just a first few seconds. After that, when the small Edgelib introduction window (at the bottom) disappears, my texture disappears at the same time, and there is nothing more on the screen.

Another problem is that the edgelib characters change to blocks on screen, with their texture updated to my own texture.

I don't know how to make Opengles work with Edgelib properly. What could be the problems?

Thank you in advance.
fuzzychicken
pm Member
 
Posts: 5
Joined: Sep 14, 2007 @ 3:56am


Postby edge » Sep 14, 2007 @ 7:47am

Hi,

Can you tell me if you're binding the texture before rendering?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby fuzzychicken » Sep 14, 2007 @ 3:08pm

fuzzychicken
pm Member
 
Posts: 5
Joined: Sep 14, 2007 @ 3:56am


Postby edge » Sep 17, 2007 @ 2:46pm

Hi,

I think the initial problem is caused by the blending option. The OpenGL renderer sees your texture as 100% transparent and doesn't render it.

I recommend turning the blending option on before rendering the font, and turning it off when rendering your own models.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron