Results 1 to 4 of 4

Thread: A picture in a wall, without create a new object

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    spain
    Posts
    4

    A picture in a wall, without create a new object

    Hello. I need to know if there is a function that allow me to put an image in a face of an object, but not as a texture. I want to put an image with dimensions that arenīt power of 2 in a face of an object, like a picture in a wall. So, I need a fuction that paste this image in the object as a bitmap, not as a texture. Anybody can help me?
    Thank you.

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: A picture in a wall, without create a new object

    it is using a texture but its the obvious example
    glTexSubImage2D(..)
    no need to be powers of 2

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    spain
    Posts
    4

    Re: A picture in a wall, without create a new object

    I knew the function glTexSubImage2D(..), but this isnīt what I need, because it only can paste an image replacing a part of a texture, but in the range of the originally defined texture array. My problem is that I take a small array of texture and I repeat this texture for cover all the face of an object. Then, when I have cover all the face repeating the texture, I need to paste an image in a determined place of the face. With glTexSubImage2D(..), I can paste this image in the original small array of texture. Then, when I repeat this texture, the image is repeating too.
    Thank you, in any case.

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: A picture in a wall, without create a new object

    use 2 images one for the wall and the other for the picture position the picture in front of the wall or u could position it at the same z distance but make sure u use eg glDepthFunc(GL_LEQUAL).
    make the parts of the pictures textures u dont wanna see have zero alpha values and enable alpha testing

Similar Threads

  1. create dynamic object
    By new_beginner in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-22-2013, 04:43 PM
  2. Create Picture file format
    By guju in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 08-28-2002, 11:15 AM
  3. How to make an object move without moving the background picture
    By Wayne Linker in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-12-2002, 05:27 AM
  4. get 2D points and create 3D object
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-10-2001, 08:47 PM
  5. A picture in a wall, without create a new object
    By maski in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 01-13-2001, 05:13 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