Java-Gaming.org
Java4K - to go         Javadoc:
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources or peek at the official java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Apply transparency to glCallList  (Read 843 times)
0 Members and 1 Guest are viewing this topic.
Offline davicente

JGO n00b
*

Posts: 13



« on: 2010-07-22 06:45:23 »

Hi:

I´m working with heavy lists. And I want to change the transparency of all elements of the list. Now I´m deleting and creating the list again, what is very inefficient and it works very slow. The question is if it is possible to apply a global transparency to one list just before I draw it  ( glCallList ).

Regards.
Offline ryanm
« League of Dukes »

JGO Strike Force
*****

Posts: 788
Medals: 4


Used to be bleb


« Reply #1 on: 2010-07-22 07:21:38 »

There's no way to alter what is in the display list after it has been defined. The only way to alter the colour of what is rendered is to make the glColor or glMaterial calls before glCallList, and ensure that the display list contains no glColor/glMaterial calls itself. This is probably not an option for you.
I'm assuming that you're specifying vertices and colours in immediate mode (glBegin/End blocks). You should consider moving to VBOs - they will keep the data in VRAM as with a display list, but you can also alter it at will.
Offline davicente

JGO n00b
*

Posts: 13



« Reply #2 on: 2010-07-22 07:31:24 »

I suppose I have no choise.
Thanks for your quickly answer.
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.107 seconds with 21 queries.