Closed Thread
Results 1 to 3 of 3

Thread: Using a Cube map for enviroment map with openGL

  1. #1
    Ewe Loon's Avatar
    Ewe Loon is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    49
    Rep Power
    0

    Using a Cube map for enviroment map with openGL

    Does anyone know if it is possible to render a gl_Texture_Cube_Map onto the inside of a cube to create a 360 degree environment

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    ETShost is offline Learning Programmer
    Join Date
    Nov 2009
    Location
    Flint, Michigan USA
    Posts
    48
    Rep Power
    0

    Re: Using a Cube map for enviroment map with openGL

    Indeed, it is possible. A gl_Texture_Cube_Map has six textures that must be mapped, each representing a face of the cube.

    Code:
       gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X, envRightTex);
       gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, envLeftTex);
       gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, envTopTex);
       gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, envBottomTex);
       gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, envFrontTex);
       gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, envBackTex);
       gl.glEnable(GL.GL_TEXTURE_CUBE_MAP);
    ETShost .com - Exceeding Innovation
    Dedicated ServersVPS • Web Hosting
    24/7 Support | 1-866-259-2934

  4. #3
    Ewe Loon's Avatar
    Ewe Loon is offline Learning Programmer
    Join Date
    Feb 2010
    Posts
    49
    Rep Power
    0

    Re: Using a Cube map for enviroment map with openGL

    I understand that part, My application has the cubemap loaded,
    but , how do i render the different faces onto the cube

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 51
    Last Post: 06-20-2011, 06:11 AM
  2. OpenGL help-movable cube
    By mebob in forum C and C++
    Replies: 9
    Last Post: 01-02-2011, 11:23 AM
  3. Multithreaded enviroment
    By joninty in forum C and C++
    Replies: 3
    Last Post: 10-31-2010, 04:18 PM
  4. Help in enviroment..~
    By R3.RyozKidz in forum C and C++
    Replies: 6
    Last Post: 10-22-2009, 02:40 PM
  5. A working enviroment
    By Milanzor in forum General Programming
    Replies: 3
    Last Post: 08-02-2009, 01:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

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