Am 05.12.2011 13:30, schrieb ParticlePeter:
Hi David,
what a lovely Library, very useful for me right now. I am using Derelict and
have
just right now written my first Shader Projection Matrix ( as Uniform ). As far
as
I can see, there is no code for a Projection Matrix in your Lib ( ignore this
if I
have just missed it ), so the attached method should do it.
( I found the original code here:
http://www.geeks3d.com/20090729/howto-perspective-projection-matrix-in-opengl/ )
Now, a little embarrassing ... :-) I am with D for around 2 Weeks now, so ...
how
can I actually use your modules ?
I am using VisualD, in the prefs I added the Path to the source code, but I am
getting "cannot find symbol blah" when I build my project. Any idea why ? The d
files are found, but what do I have to import ?
Cheers, ParticlePeter
begin 644 linalg_project.d
M+R\@1F5E;"!F<F5E('1O('5S90T*#0IV;VED('!R;VIE8W0H(&9L;V%T(&9O
M=BP@9FQO870@87-P96-T+"!F;&]A="!Z;F5A<BP@9FQO870@>F9A<B`I("![
M#0H-"@EF;&]A="!025]/5D527S,V,"`](#`N,#`X-S(V-B`[#0H-"@EF;&]A
M="!X>6UA>"`]('IN96%R("H@=&%N*"!F;W8@*B!025]/5D527S,V,"`I(#L-
M"@EF;&]A="!Y;6EN(#T@+7AY;6%X.PT*"69L;V%T('AM:6X@/2`M>'EM87@[
M#0H-"@EF;&]A="!W:61T:"`]('AY;6%X("T@>&UI;CL-"@EF;&]A="!H96EG
M:'0@/2!X>6UA>"`M('EM:6X[#0H-"@EF;&]A="!D97!T:"`]('IF87(@+2!Z
M;F5A<CL-"@EF;&]A="!Q(#T@+2AZ9F%R("L@>FYE87(I("\@9&5P=&@[#0H)
M9FQO870@<6X@/2`M,B`J("AZ9F%R("H@>FYE87(I("\@9&5P=&@[#0H-"@EF
M;&]A="!W(#T@,B`J('IN96%R("\@=VED=&@[#0H)=R`]('<@+R!A<W!E8W0[
M#0H)9FQO870@:"`](#(@*B!Z;F5A<B`O(&AE:6=H=#L-"@T*"6UA=')I>%LP
M75LP72`]('<[#0H);6%T<FEX6S!=6S%=(#T@,#L-"@EM871R:7A;,%U;,ET@
M/2`P.PT*"6UA=')I>%LP75LS72`](#`[#0H-"@EM871R:7A;,5U;,%T@/2`P
M.PT*"6UA=')I>%LQ75LQ72`](&@[#0H);6%T<FEX6S%=6S)=(#T@,#L-"@EM
M871R:7A;,5U;,UT@/2`P.PT*#0H);6%T<FEX6S)=6S!=(#T@,#L-"@EM871R
M:7A;,EU;,5T@/2`P.PT*"6UA=')I>%LR75LR72`]('$[#0H);6%T<FEX6S)=
M6S-=(#T@+3$[#0H-"@EM871R:7A;,UU;,%T@/2`P.PT*"6UA=')I>%LS75LQ
M72`](#`[#0H);6%T<FEX6S-=6S)=(#T@<6X[#0H);6%T<FEX6S-=6S-=(#T@
',#L-"@T*?0``
`
end
Hi
Great you like gl3n. For a projection-matrix use: mat4.perspective or if
you want an orthographic: mat4.orthographic, unfortunatly ddoc ignores
this block (I think because of "static if(isFloatingPoint!mt)", it
begins here:
https://bitbucket.org/dav1d/gl3n/src/affe3816c7a4/gl3n/linalg.d#cl-1080
I don't know VisualD but you've normally to add the path to the files
(base dir, it is -Ipath/goes/here for dmd) and also each file, it could
look like this:
-Igl3n/ gl3n/interpolate.d gl3n/linalg.d gl3n/math.d gl3n/util.d my_prog.d
and in my_prog.d you import the parts of gl3n as follows:
import gl3n.linalg; // if you want linear algebra, vectors, matrices and
quats
import gl3n.math; // if you need math, normally you always do!
import gl3n.interpolate; // for interpolation functions
import gl3n.util; // to check for types
Hope this helps
- dav1d