Results 1 to 3 of 3

Thread: Draw only a part of something

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    2

    Draw only a part of something

    Hello,

    I'm going to explain my particular case for a better understanding of my problem :
    I use OpenGL for 2D drawing in my application, with some 3D animations.

    I'm currently designing the GUI, and I got an issue with displaying the content of a dragged window : when the user drag the bar, I would like a nice scrolling of the content of the window, as the one of your browser; however, I don't know how to render this with OpenGL.

    With a basic 2D library, I would draw all the content of the window acording to the place of the drag bar in an image buffer, and display the correct part of the buffer to the screen.
    But with OpenGL, I don't know to solve this problem.

    Is there anything in OpenGL for storing a draw in a buffer without rendering it, and manipulate it ?

    Thank you

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    325

    Re: Draw only a part of something

    You can render the window content to a texture and only show the parts you're interested in (in this case manipulating the texturecoordinates should be sufficient).
    Look up render to texture and offscreen rendering.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    2

    Re: Draw only a part of something

    Thank you very much menzel

Similar Threads

  1. Rendering terrain - multiple draw calls or draw whole VBO?
    By rakketh in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 07-19-2013, 02:26 PM
  2. How do I draw separate triangles (not attached) in one draw call?
    By Spankenstein in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-04-2012, 05:48 AM
  3. draw part of VBO?
    By supagu in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 04-18-2007, 05:09 PM
  4. How to draw part of sphere,cylinder or disk?
    By Mickey008 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-04-2004, 11:02 PM
  5. Custom projection matrix: part ortho, part frustum
    By joelsk in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 11-30-2000, 07:01 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