DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
| |
James :) (aka Madcow) Posts heaps 
     member is offline
![[avatar] [avatar]](http://www.avatarsdb.com/avatars/cool_cat.gif)
Sup
Joined: Mar 2006 Gender: Male  Posts: 1,735 Location: UK
|  | Re: ODE Plugin for Basic4GL « Reply #1 on Nov 4, 2007, 11:22am » | |
if someone could get ogre working as a plugin then it'll be sweet (i can't though i tryed but failed).
|
- James
There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
|  | Re: ODE Plugin for Basic4GL « Reply #2 on Dec 6, 2007, 4:43am » | |
New ODE.DLL and ODE Plugin for Basic4GL aviable.
For Download see first post. (please report any problems with the new version)
Joshy
|
(sorry for my bad English) I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. |
|
DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
|  | Re: ODE Plugin for Basic4GL « Reply #3 on Dec 12, 2007, 1:15pm » | |
New Version for testing aviable see first post.
Thanx Joshy
|
(sorry for my bad English) I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. |
|
James :) (aka Madcow) Posts heaps 
     member is offline
![[avatar] [avatar]](http://www.avatarsdb.com/avatars/cool_cat.gif)
Sup
Joined: Mar 2006 Gender: Male  Posts: 1,735 Location: UK
|  | Re: ODE Plugin for Basic4GL « Reply #4 on Dec 12, 2007, 5:17pm » | |
how did you do the shadows, any examples?
|
- James
There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
|  | Re: ODE Plugin for Basic4GL « Reply #5 on Dec 13, 2007, 1:25am » | |
Quote:| how did you do the shadows, any examples? |
| in short you can find it in "primitives.inc"
but here for you: The shadow is a plane projection in this case on the ground.
Init Light and ShadowMatrix
while True: clear screen/window/matrix drawground
enable shadow projection draw your scene in shadowcolor only
disable shadow projection draw your scene normal with colors and textures
SwapBuffers() wend
Joshy
dim LightPosition#(3) ' x,y,z,w dim ShadowMatrix#(3,3) ' 4x4 OpenGL dim ShadowColor#(2) ' r,g,b ' optional only to rotate the box dim xrot#,yrot#,zrot#
' enable Ligth0 and ' build ShadowMatrix Gosub InitOpenGL
while True glClear (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT) glLoadIdentity() glTransLatef (0,-3,-20) ' move the camerea ' draw the terain Gosub DrawGround
' enable shadow projection Gosub EnableShadow
' draw your whole scene in shadow color ' in this case simple a rotating box glPushMatrix() glTranslatef(0,3,0) ' move box over ground glRotatef(xrot#,1,0,0) glRotatef(yrot#,0,1,0) glRotatef(zrot#,0,0,1) glScalef(2,2,2) ' draw the box in shadow color Gosub DrawSolidBox glPopMatrix() ' disable shadow projection Gosub DisableShadow ' draw your whole scene again but now ' normal in any color or texture glPushMatrix() glTranslatef(0,3,0) ' move box over ground glRotatef(xrot#,1,0,0) glRotatef(yrot#,0,1,0) glRotatef(zrot#,0,0,1) glScalef(2,2,2) ' draw the box in this case in yellow glColor3f(1,1,0) Gosub DrawSolidBox glPopMatrix() ' make it visible SwapBuffers() xrot#=xrot#+0.3 yrot#=yrot#+0.7 zrot#=zrot#+0.9 WaitTimer(1000/50) wend end
' ################################################## ' # Init OpenGL Light0 and build the shadow matrix # '################################################## InitOpenGL: glEnable (GL_LIGHTING) glEnable (GL_COLOR_MATERIAL) glCullFace (GL_BACK) glEnable (GL_CULL_FACE)
LightPosition#=vec4(0,100,100,1) glEnable (GL_LIGHT0) glLightfv(GL_LIGHT0,GL_AMBIENT ,vec4(0.2,0.2,0.2,1.0)) glLightfv(GL_LIGHT0,GL_DIFFUSE ,vec4(0.6,0.6,0.8,1.0)) glLightfv(GL_LIGHT0,GL_SPECULAR,vec4(0.6,0.6,0.8,1.0))
ShadowColor#=vec3(0.2,0.2,0.2) ShadowMatrix#(0,0)=LightPosition#(1)' Y ShadowMatrix#(1,0)=LightPosition#(0)' X ShadowMatrix#(1,2)=LightPosition#(2)' Z ShadowMatrix#(2,2)=LightPosition#(1)' Y ShadowMatrix#(1,3)=1.0 ' ground Y normale points up ShadowMatrix#(3,3)=LightPosition#(1)' Y return
EnableShadow: glDisable(GL_DEPTH_TEST) glDisable(GL_LIGHTING) glColor3fv(ShadowColor#) glPushMatrix() glMultMatrixf(ShadowMatrix#) return DisableShadow: glPopMatrix() glEnable(GL_DEPTH_TEST) glEnable(GL_LIGHTING) glLightfv(GL_LIGHT0,GL_POSITION,LightPosition#) return ' ############################# ' # draw a unit 1 x 1 x 1 box # '############################# DrawSolidBox: glBegin(GL_QUADS) glNormal3f(0,0,1) glVertex3f(-0.5, 0.5, 0.5):glVertex3f(-0.5,-0.5, 0.5) glVertex3f( 0.5,-0.5, 0.5):glVertex3f( 0.5, 0.5, 0.5) glNormal3f(1,0,0) glVertex3f( 0.5, 0.5, 0.5):glVertex3f( 0.5,-0.5, 0.5) glVertex3f( 0.5,-0.5,-0.5):glVertex3f( 0.5, 0.5,-0.5) glNormal3f (0,0,-1) glVertex3f( 0.5, 0.5,-0.5):glVertex3f( 0.5,-0.5,-0.5) glVertex3f(-0.5,-0.5,-0.5):glVertex3f(-0.5, 0.5,-0.5) glNormal3f(-1,0,0) glVertex3f(-0.5, 0.5,-0.5):glVertex3f(-0.5,-0.5,-0.5) glVertex3f(-0.5,-0.5, 0.5):glVertex3f(-0.5, 0.5, 0.5) glNormal3f(0,1,0) glVertex3f(-0.5, 0.5,-0.5):glVertex3f(-0.5, 0.5, 0.5) glVertex3f( 0.5, 0.5, 0.5):glVertex3f( 0.5, 0.5,-0.5) glNormal3f(0,-1,0) glVertex3f(-0.5,-0.5, 0.5):glVertex3f(-0.5,-0.5,-0.5) glVertex3f( 0.5,-0.5,-0.5):glVertex3f( 0.5,-0.5, 0.5) glEnd() return
' ####################### ' # draw a ground plane # '####################### DrawGround: glColor3f(0.9,0.9,0.9) glBegin(GL_QUADS) glNormal3f(0,1,0):glVertex3f(-100,0,-100) glNormal3f(0,1,0):glVertex3f(-100,0, 100) glNormal3f(0,1,0):glVertex3f( 100,0, 100) glNormal3f(0,1,0):glVertex3f( 100,0,-100) glEnd() return
|
(sorry for my bad English) I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. |
|
DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
|  | Re: ODE Plugin for Basic4GL « Reply #6 on Dec 16, 2007, 8:16am » | |
Hello Madcow do you got it with my posted plane shadow matrix?
Joshy
|
(sorry for my bad English) I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. |
|
James :) (aka Madcow) Posts heaps 
     member is offline
![[avatar] [avatar]](http://www.avatarsdb.com/avatars/cool_cat.gif)
Sup
Joined: Mar 2006 Gender: Male  Posts: 1,735 Location: UK
|  | Re: ODE Plugin for Basic4GL « Reply #7 on Dec 16, 2007, 1:29pm » | |
ya
|
- James
There are 10 types of people in the world: Those who understand binary, and those who don't... |
|
DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
| |
DJLinux Global Moderator Plus
     member is offline
\_/?
![[homepage] [homepage]](http://s2.images.proboards.com/buttons/www_sm.gif) Joined: Apr 2008 Gender: Male  Posts: 734 Location: Germany NRW Essen
|  | Re: [1] ODE Plugin for Basic4GL « Reply #9 on May 2, 2010, 6:04pm » | |
Oh man i lost the plugin source code has anyone a old version with the /src folder ?
Joshy
|
(sorry for my bad English) I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. |
|
shadow008 Posts heaps 
     member is offline
![[avatar] [avatar]](http://www.wreckamovie.com/system/shot_medias/0000/1710/ninja_guitar_duel.jpg)
NINJAS WITH GUITARS! (you will never be as awsome as this)
Joined: Feb 2009 Gender: Male  Posts: 534
|  | Re: [1] ODE Plugin for Basic4GL « Reply #10 on May 2, 2010, 7:41pm » | |
darn... and i thought it was as easy as downloading it and looking for the source code... sry, i dont : (
|
.^^^^ ,-@.@-, ....~ ..--|-- ..../\ ...` `
Quit laughing, he will destroy you >:0 |
|