View previous topic :: View next topic |
Author |
Message |
quartz
Joined: 02 Jul 2006 Posts: 35 Location: Florida, US
|
Posted: Thu Aug 16, 2007 9:37 pm Post subject: Using OpenGL extensions. |
|
|
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 |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
|
Back to top |
|
|
quartz
Joined: 02 Jul 2006 Posts: 35 Location: Florida, US
|
Posted: Mon Aug 20, 2007 5:38 pm Post subject: |
|
|
Thanks odeamus, I will check it out. _________________ -Will (Quartz) |
|
Back to top |
|
|
quartz
Joined: 02 Jul 2006 Posts: 35 Location: Florida, US
|
Posted: Mon Aug 20, 2007 8:55 pm Post subject: |
|
|
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 |
|
|
|