Results 1 to 2 of 2

Thread: transparent sphere with GLUSPHERE

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2008
    Posts
    1

    transparent sphere with GLUSPHERE

    I need a simple sphere to be drawn with transparency and lighting enabled. Is it true, I cannot use GLSPHERE for that? I need to order all quads (?) from back to front for drawing, right? GLSPHERE draws them the same way every time, regardless of the camera position? Or is there any workaround for that?

    thanks, haymo

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: transparent sphere with GLUSPHERE

    You can do it by enabling culling, and using two draw calls - one with glFrontFace(GL_CW) and another with glFrontFace(GL_CCW). First draw call will draw back faces of sphere, and second one front faces, therefore you will get transparent sphere with correct polygons rendered from back to front.

Similar Threads

  1. Drawing a transparent glass sphere
    By jenny_wui in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-09-2010, 02:59 PM
  2. Render a trimmed sphere ? (a quarter of sphere)
    By HaVyThoai in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-07-2007, 12:05 PM
  3. gluSphere
    By GreenCat in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-10-2005, 11:26 AM
  4. gluSphere (?)
    By Vlasko in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-27-2002, 07:04 AM
  5. overlaying transparent and non transparent bitmaps
    By dodgyposse in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-13-2000, 01:35 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