×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    2

    Unhappy Something wrong with glTexImage2D glTexSubImage2D

    Hi ALL,
    I am having some trouble about OpenGL ES on my Nokia 5230, I have downloaded a SuperNES code and try to write a OpenGL ES display plugin for it, the screen the programme generate is a buffer 256 * 240 with a color type GL_UNSIGNED_SHORT_5_6_5, I need to update the texture frequently and map it to a QUAD, I create a texture object 256 by 256 using following code:
    glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB,
    256, 256, 0,
    GL_RGB, GL_UNSIGNED_SHORT_5_6_5, NULL);

    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

    And then update it using code:
    glBindTexture( GL_TEXTURE_2D, textures );

    glPixelStorei(GL_PACK_ALIGNMENT,4);

    glTexSubImage2D (GL_TEXTURE_2D, 0, 0,
    256, 240, 0, GL_RGB,
    GL_UNSIGNED_SHORT_5_6_5, source);

    It does not work, but when I use glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB,
    256, 256, 0,
    GL_RGB, GL_UNSIGNED_SHORT_5_6_5, source); it worked perfectly except for very ******* slow speed, compare to DMA, I feel so sad.

    Do you guys have any suggestions? Does the function work on 5233 @ all. I try it on Windows platform, it works, but it is OpenGL not ES of course.

    Thanks very much.

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

    Re: Something wrong with glTexImage2D glTexSubImage2D

    Note that S60 5th edition devices have no hardware acceleration for Open GL. I can not decide what a SNES emulator does with Open GL, but if it is used for scaling the bitmap only, consider reverting to CBitmapContext::BitBlt for the first approach.

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    2

    Re: Something wrong with glTexImage2D glTexSubImage2D

    Quote Originally Posted by wizard_hu_ View Post
    Note that S60 5th edition devices have no hardware acceleration for Open GL. I can not decide what a SNES emulator does with Open GL, but if it is used for scaling the bitmap only, consider reverting to CBitmapContext::BitBlt for the first approach.
    does 5th device have full ogl es 1.1 support?even though it might be slow.thankyou anyway.

  4. #4
    Registered User
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    305

    Re: Something wrong with glTexImage2D glTexSubImage2D

    glTexImage2D glTexSubImage2D works fine on N8(Symbian3) and SE Vivaz, SAMSUNG(Symbian S60 5th)
    I didn't test it on 5230(Symbian S60 5th) as it has no GPU. you will get around 1fps !
    And all works fine on emulator

Similar Threads

  1. Replies: 2
    Last Post: 2010-11-02, 11:07
  2. Something is wrong with editing contacts
    By b0ssY in forum Symbian
    Replies: 1
    Last Post: 2007-07-12, 03:52
  3. something wrong with my Nokia6600?
    By fly2048 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-12-28, 02:54
  4. Something wrong with the connection
    By carmi_n_rama in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-02-26, 18:49
  5. Something wrong with tables in Nokia 6600?
    By jarips in forum Browsing and Mark-ups
    Replies: 3
    Last Post: 2003-12-30, 11:40

Posting Permissions

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