Forums - Adreno SDK unable to delete ATITC texture?

3 posts / 0 new
Last post
Adreno SDK unable to delete ATITC texture?
Anton_Averin
Join Date: 29 Mar 11
Posts: 4
Posted: Tue, 2011-04-05 06:02

Hi all

couldnt find a forum about Andreno SDK so posting my question here.

I'm trying to implement ATITC texture loading and rendering and I have a poing in my loading process where already loaded texture should be deleted and recreated again.

First, for some reason AdrenoSDK returns '2' as a first texture name after calling 'glGenTextures' the first time. That's a bit strange, but doesnt seem to be a real problem.

Here is the real thing: I create 2 textures (call glGenTextures/glBindTexture/glCompressedTexImage2D for each miplevel). First texture gets name '2', second gets the name '3'.

Then I process some data, do some stuff, make some textures, and, finally, try to delete these 2 textures and recreate them.

Call to glDeleteTextures(1, &pointerToFirstTexture) result in glError 1281 - which is really strange cuz by OpenGL specs it's possible only if 'n' parameter is < 0. glIsTexture(pointerToFirstTexture) returns 'true'.

Call to glDeleteTextures(1, &pointerToSecondTexture) finished correctly.

And if we ignore glError on first delete attempt call to glGenTextures() right after that result in name '2', like texture doesnt' exists at all.

And, well, I'm a bit confused. I've tried to delete first texture right after creation - no gl errors. I've checked that GL context is current to the thread that deletes textures - everything is correct. And, all these routine works perfectly for PVR textures on Palm SDK.

Does AdrenoSDK delete textures in runtime without noticing me? Ignoring delete error doesnt help, btw, cuz attempt to create 10th texture fails with another glError.

 

  • Up0
  • Down0
Anton_Averin
Join Date: 29 Mar 11
Posts: 4
Posted: Wed, 2011-04-06 00:02

Further investigation shows that AdrenoSDK fails on call to glDrawArrays a bit late in code (but in the same run() tick)

Checked same source code on PowerVR SDK - first call to glGenTexture correctly returns '1' as texture name. And no glErrors on glDrawArrays, no problems deleting created textures. Everything seems to work fine. Except PVR logic and textures are used.

Tried enabling PVR loading routine on AdrenoSDK, just to be sure I havent introduced an error by ATITC loading process. Same errors on glDrawArrays (which is not connected to textures at all).

Is there any other emulator I can test ATITC on? Cuz AdrenoSDK seems to have problems.

  • Up0
  • Down0
Steve L (not verified)
Posted: Thu, 2011-07-07 14:24

 

Try adding a number of glGetError calls after creating the textures, and trying to find the first instance that glGetError doesn’t return GL_NO_ERROR. 

Also of note:

glGenTextures returns n texture names in textures. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to glGenTextures. 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.