Results 1 to 4 of 4

Thread: problem about the glTexImage2D

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2009
    Location
    beijing
    Posts
    11

    problem about the glTexImage2D

    my opengl version is 2.0.
    i want to render a scene into a win32 dibsection and there is a RGBA texture whose size is 256*170 , when i set the 32bits image as a texture using the glTexImage2D, it reports 1282 error code,but when i change the bitmap to windows ,it works well.who can tell me how to upload an non-pow-of-2 image as a texture when rendering into a bitmap

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: problem about the glTexImage2D

    Problem is that "win32 dibsection" does not use hardware acceleration, only old software GL.
    See the wiki page on FBO for modern render to texture.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2009
    Location
    beijing
    Posts
    11

    Re: problem about the glTexImage2D

    thanks for reply , but there is still a problem
    here is my procedure about using fbo for the offscreen rendering:
    1 create fbo in initialization stage
    2 switch framebuffer to my new fbo
    3 rendering scene
    4 readpixel from fbo to the dibsection

    but i find that in the every time between two frames ,the client area of windows show some rubbish content in a short time , is there any approach can avoid this dirty flash? thanks

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2009
    Location
    beijing
    Posts
    11

    Re: problem about the glTexImage2D

    thanks the above problem has been resolved, this is caused by a swapbuffer call

Similar Threads

  1. about glTexImage2D problem
    By jebe7282 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-12-2013, 02:45 AM
  2. glTexImage2d 2 pxl texture problem
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 05-12-2004, 03:56 AM
  3. problem with glTexImage2D ?
    By HanWu in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-15-2003, 05:59 PM
  4. problem with glTexImage2D()
    By dilectio in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 11-21-2002, 08:32 PM
  5. Problem with glTexImage2D
    By GregR in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-12-2000, 12:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean