×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2007
    Posts
    9

    problem with loading textures

    I am using the OpelnGL texturemanager class supplied with S60 3rd sdk
    utilities.h and utilities.cpp. However when i try to run my program i get user error or system error messages debending how I modify the code.

    The cpp code that causes the error looks like this:

    Code:
       iTextureManager = CTextureManager::NewL ( size.iWidth,size.iHeight,
        FRUSTUM_TOP, FRUSTUM_BOTTOM, FRUSTUM_RIGHT, FRUSTUM_LEFT, FRUSTUM_NEAR );
    
    // Pushing the textures into the loading queue.
    _LIT(KAsteroidTexture, "c:\private\E1CDC3AC\texture.jpg"); //this causes user 11 error
    _LIT(KAsteroidTexture, "texture.jpg"); //this causes system error -12
    iTextureManager->RequestToLoad(KAsteroidTexture, &iAsteroidTexture );
    
    
    //Start to load the textures.
    iTextureManager->DoLoadL();
    my pkg file looks like this:
    Code:
    ; Installation file for AsteroidsS60 application
    ;
    ; This is an auto-generated PKG file by Carbide.
    ; This file uses variables specific to Carbide builds that will not work
    ; on command-line builds. If you want to use this generated PKG file from the
    ; command-line tools you will need to modify the variables with the appropriate
    ; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
    ;
    ;Language - standard language definitions
    &EN
    
    ; standard SIS file header
    #{"AsteroidsS60"},(0xE1CDC3AC),1,0,0
    
    ;Localised Vendor name
    %{"Vendor-EN"}
    
    ;Unique Vendor name
    :"Vendor"
    
    ;Supports Series 60 v 3.0
    [0x101F7961], 0, 0, 0, {"Series60ProductID"}
    
    ;Files to install
    ;You should change the source paths to match that of your environment
    ;<source> <destination>
    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\AsteroidsS60.exe"        -"!:\sys\bin\AsteroidsS60.exe"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\AsteroidsS60.rsc"        -"!:\resource\apps\AsteroidsS60.rsc"
    "$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\AsteroidsS60_reg.rsc"    -"!:\private\10003a3f\import\apps\AsteroidsS60_reg.rsc"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\AsteroidsS60.mif" -"!:\resource\apps\AsteroidsS60.mif"
    "..\inc\texture.jpg"    -"!:\private\E1CDC3AC\texture.jpg"
    
    ; Add any installation notes if applicable
    ;"AsteroidsS60.txt"        -"!:\private\E1CDC3AC\AsteroidsS60.txt"
    
    ;required for application to be covered by backup/restore facility 
    "..\sis\backup_registration.xml"		-"!:\private\E1CDC3AC\backup_registration.xml"

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: problem with loading textures

    Both errors are pretty conventional:
    User 11: "This panic is raised when any operation that moves or copies data to a 16-bit variant descriptor, causes the length of that descriptor to exceed its maximum length."
    -12: KErrPathNotFound
    If you would have tried to understand how CTextureManager works, you would already know that you should pass the path to the ConstructL (the very first argument, hard to miss I think), and only filenames should be passed to RequestToLoad.
    So the User 11 panic signs that texture names cannot hold full filenames (MAX_TEXTURE_NAME is 20 in the .h file), and -12 signs the missing path in your second try.

  3. #3
    Registered User
    Join Date
    Feb 2007
    Posts
    9

    Re: problem with loading textures

    Quote Originally Posted by wizard_hu_
    Both errors are pretty conventional:
    User 11: "This panic is raised when any operation that moves or copies data to a 16-bit variant descriptor, causes the length of that descriptor to exceed its maximum length."
    -12: KErrPathNotFound
    If you would have tried to understand how CTextureManager works, you would already know that you should pass the path to the ConstructL (the very first argument, hard to miss I think), and only filenames should be passed to RequestToLoad.
    So the User 11 panic signs that texture names cannot hold full filenames (MAX_TEXTURE_NAME is 20 in the .h file), and -12 signs the missing path in your second try.
    Now I understand what causes the user 11 error but not what causes the system -12 error. To my understanding CTexturemanager does not require the the texure path as first paramater like you said. If no path is given CTexture manager uses application's private directory as the location for all textures, and my textures are loaded there in the pkg-file. Underneath is sample code form sdk and no path is given to CTexturemanager.


    Code:
    	// Construct a texture manager that uses the application's private
    	// directory as the location for all textures.
        iTextureManager = CTextureManager::NewL ( iScreenWidth, iScreenWidth,
                                                  FRUSTUM_TOP, FRUSTUM_BOTTOM, FRUSTUM_RIGHT, FRUSTUM_LEFT, FRUSTUM_NEAR,                               
                                                  this );
    
        // Pushing the textures into the loading queue.
        _LIT(KHubbleTexture, "nasa_hubble.jpg");
        _LIT(KOGLESTexture,  "ogles.jpg");
        iTextureManager->RequestToLoad(KHubbleTexture, &iNasaHubble );
        iTextureManager->RequestToLoad(KOGLESTexture,  &iOpenGLES );
    
        //Start to load the textures.
        iTextureManager->DoLoadL();

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: problem with loading textures

    You are right indeed. In this case -12 might indicate that your private path is not \private\E1CDC3AC... However your installation succeeds I think.
    Could you install on the memory card/hard drive and check (in pendrive mode) that the file is there?
    You might want to re-check that your UID is E1CDC3AC.

Similar Threads

  1. Compilation series 60 3rd edition
    By asmobease in forum Symbian
    Replies: 3
    Last Post: 2006-09-10, 14:08
  2. Problem with loading mbm on emulator
    By vrs666 in forum Symbian
    Replies: 4
    Last Post: 2006-03-10, 09:17
  3. Problem with Image loading for Canvas
    By rsantossio in forum Mobile Java General
    Replies: 2
    Last Post: 2003-02-28, 00:24
  4. problem to send a service loading message push for 8310
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-05-06, 12:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×