FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using OpenGL extensions.

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
quartz



Joined: 02 Jul 2006
Posts: 35
Location: Florida, US

PostPosted: Thu Aug 16, 2007 9:37 pm    Post subject: Using OpenGL extensions. Reply with quote

I was wondering if anyone has use Derelict's OpenGL extensions before. I am trying to get shadow maps to work using:
http://www.paulsprojects.net/tutorials/smt/smt.html

I am not all sure what steps to do.

I have the import statements:
Code:

import derelict.opengl.extension.arb.depth_texture;
import derelict.opengl.extension.arb.shadow;
import derelict.opengl.extension.ext.shadow_funcs;


and I also tested using:
Code:

   if (!ARBDepthTexture.isEnabled()) {
      writefln("\n****** GL_ARB_depth_texture not enabled ********\n");
      return false;
   }
   if (!ARBShadow.isEnabled()) {
      writefln("\n****** GL_ARB_shadow not enabled ********\n");
      return false;
   }
   if (!EXTShadowFuncs.isEnabled()) {
      writefln("\n****** GL_EXT_shadow_funcs not enabled ********\n");
      return false;
   }


I even removed the import statements and nothing changes. Its as if the imports aren't really doing anything.

but when I run my code shadows don't seem to appear. The only thing I question in my code so far is when I am supplying the texture coords. I am using the helix library.
Code:

...
Vector4f r1 = Vector4f(c1.x, c2.x, c3.x, c4.x);  // getting row.
...
      glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
      glTexGenfv(GL_S, GL_EYE_PLANE, r1.ptr);


Is there anything else I need to do in order for the shadow extensions to work?

Thanks. Quartz
_________________
-Will (Quartz)
Back to top
View user's profile Send private message
odeamus



Joined: 21 Feb 2006
Posts: 78
Location: Helsinki, Finland

PostPosted: Fri Aug 17, 2007 2:26 am    Post subject: Reply with quote

You need to call DerelictGL.loadExtensions() before using the extensions.
http://svn.dsource.org/projects/derelict/trunk/docs/gl.html
Back to top
View user's profile Send private message
quartz



Joined: 02 Jul 2006
Posts: 35
Location: Florida, US

PostPosted: Mon Aug 20, 2007 5:38 pm    Post subject: Reply with quote

Thanks odeamus, I will check it out.
_________________
-Will (Quartz)
Back to top
View user's profile Send private message
quartz



Joined: 02 Jul 2006
Posts: 35
Location: Florida, US

PostPosted: Mon Aug 20, 2007 8:55 pm    Post subject: Reply with quote

I reviewed my code again and I am calling the loadExtensions(). I reviewed the link mentioned and I added a call to the loadVersions() just in case i wasn't getting OpenGL 1.5.

My next step will be to try the Red book's simpler version of 2-pass shadow mapping and see if that works instead.

After that i may just try and find something really simple to see if extensions are working period.

i have a Linux box with an Nvidia NV30 (cheap quadro FX540) card so i know my card can do shadow mapping easily.
_________________
-Will (Quartz)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group