Results 1 to 5 of 5

Thread: Render onto a texture and then show it.

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2009
    Location
    Milan, Italy
    Posts
    7

    Render onto a texture and then show it.

    My application draw some objects {like hundreds other ones ].
    Now I wish to draw exactly the same scene on a "texture" (from a different point of view -but this is not the point-) and then show this texture on the top-left part of my viewport, but i.e. in 200x200 pixels.
    Is this very difficult ????
    Does someone know where to find a very, very.... easy example for this ???

    Regards.
    Giovanni

  2. #2
    Member Contributor
    Join Date
    Oct 2001
    Location
    Germany
    Posts
    60

    Re: Render onto a texture and then show it.

    Best you use FRAME-BUFFER-OBJEKTS (FBO's)
    With this you can render into a FBO insted the Framebuffer. And then use this FBO as Texture. Very cool .

    If you understand FBO very easy too use.
    edit:
    tutorials:
    http://www.gamedev.net/reference/art...rticle2331.asp
    http://www.gamedev.net/reference/art...rticle2333.asp

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2009
    Location
    Milan, Italy
    Posts
    7

    Re: Render onto a texture and then show it.

    Excellent.
    Thanks

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2009
    Location
    Milan, Italy
    Posts
    7

    Re: Render onto a texture and then show it.

    My compiler report and error at these lines ..


    glGenFramebuffersEXT(1, @fbo);
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);

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

    Re: Render onto a texture and then show it.

    You have to dynamically initialize new entry points beyond GL 1.1 :
    http://opengl.org/wiki/Getting_start...and_extensions
    Libraries exists to simplify this a lot :
    http://opengl.org/wiki/Related_toolk...sion_libraries

Similar Threads

  1. lib3ds show 3d object with texture
    By revaldo666 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-28-2012, 04:09 AM
  2. How to use special effects to show texture?
    By kurt09 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-22-2009, 12:08 AM
  3. How Show texture with vertex array...?
    By Rondey in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-27-2009, 03:28 PM
  4. Replies: 0
    Last Post: 08-02-2006, 09:24 PM
  5. multitexture, second texture doesnt show
    By bumby in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 01-12-2005, 01:08 PM

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