Basic4GL
« [1] ODE Plugin for Basic4GL »

Welcome Guest. Please Login or Register.
Jul 30, 2010, 5:10pm




Basic4GL :: BASIC4GL Boards :: DLL/Plugin Creation :: [1] ODE Plugin for Basic4GL
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: [1] ODE Plugin for Basic4GL (Read 2,089 times)
DJLinux
Global Moderator Plus
*****
member is offline



\_/?


[homepage]

Joined: Apr 2008
Gender: Male
Posts: 734
Location: Germany NRW Essen
 [1] ODE Plugin for Basic4GL
« Thread Started on Oct 27, 2007, 7:19am »

Get ODEPlugin if you like.
ODEPlugin.zip

Joshy
test01.png
[image]
test02.png
[image]
test03.png
[image]
test04.png
[image]
test05.png
[image]
OpenDE Homepage:
http://www.ode.org


Extract the zip archive to your HD
try out test01.gb - test05.gb

ODE Userguid:
http://ode.org/ode-latest-userguide.html

ODE wiki:
http://opende.sourceforge.net/wiki/index.php/Main_Page

« Last Edit: Dec 4, 2009, 11:40pm by DJLinux »Link to Post - Back to Top  IP: Logged

(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]

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).
« Last Edit: Nov 4, 2007, 11:23am by James :) (aka Madcow) »Link to Post - Back to Top  IP: Logged

- 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]

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
Link to Post - Back to Top  IP: Logged

(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]

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

Link to Post - Back to Top  IP: Logged

(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]

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?
Link to Post - Back to Top  IP: Logged

- 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]

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
« Last Edit: Dec 13, 2007, 2:24am by DJLinux »Link to Post - Back to Top  IP: Logged

(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]

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
Link to Post - Back to Top  IP: Logged

(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]

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
Link to Post - Back to Top  IP: Logged

- 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]

Joined: Apr 2008
Gender: Male
Posts: 734
Location: Germany NRW Essen
 Re: ODE Plugin for Basic4GL
« Reply #8 on Nov 5, 2008, 7:50pm »


Oct 27, 2007, 7:19am, DJLinux wrote:
Get ODEPlugin if you like.
http://alice-dsl.net/d.j.peters/basic4gl/ODEPlugin.zip

here are the right links (www in front)
http://www.alice-dsl.net/d.j.peters/basic4gl/ODEPlugin.zip
test01.png
[image]
test02.png
[image]
test03.png
[image]
test04.png
[image]
test05.png
[image]
Link to Post - Back to Top  IP: Logged

(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]

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
Link to Post - Back to Top  IP: Logged

(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]

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 : (
Link to Post - Back to Top  IP: Logged

.^^^^
,-@.@-,
....~
..--|--
..../\
...` `

Quit laughing, he will destroy you >:0
   [Search This Thread][Send Topic To Friend] [Print]

Google
Webbasic4gl.proboards.com
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Report Abuse | Mobile