Go Back   EQEmulator Home > EQEmulator Forums > Archives > OpenEQ > OpenEQ::General Discussion

OpenEQ::General Discussion General discussion related to the OpenEQ Project

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 12-10-2004, 06:29 AM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

I can't speak for the new files, but when dealing with WLD (or what you plan on turning into WLD) in OpenGL you have to set it to use emissive lighting. This wouldn't be so bad except for the problem that, when dealing with alpha transparency, OpenGL likes to throw out the alpha value when you use the glColor4ub() command to set the color. My solution is to cache the last-set alpha value and switch to normal lighting mode with glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE) to change it whenever I encounter a triangle with a different alpha value, then change back with glColorMaterial(GL_FRONT,GL_EMISSION). Generally the only three alpha values you ever run across are 0, 128, and 255, so it's not too bad, especially if you do a two-pass rendering process like I do where you first render only the triangles with alpha=255 and then render anything not 255 in the second pass. I have to warn you though that glColorMaterial is very expensive to use in terms of time (according to the docs on msdn) and must be used as sparingly as possible.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:41 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3