Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - matty47

Pages: 1 [2] 3 4 5
16
I tried your code and if I type it as presented, that is with the function declaration before the main code I get
"DeclarationTest.gbas"(17) error : command not inside function or sub
I have noticed this before. It appears that you must place all function definitions after the main loop? - well that is my observation.
If I put the function definition after the main loop your code compiles and runs with no errors (in debug mode at least).
Hope this was of some help

17
Announcements / Re: GLBasic version 6 released
« on: 2008-Dec-19 »
Thanks for all the hard work and -Merry Christmas
Matthew

18
GLBasic - en / Windows Mobile 6.1
« on: 2008-Oct-15 »
Does GLBasic support the above platform? Looking at purchasing a smartphone with this operating system (320 x 240 display) and wondering if I can use GLB to make programs for it?
Thanks
Matthew

19
GLBasic - en / Re: NewtonSDK collisions
« on: 2008-Sep-14 »
Hi,
Yes you pointed out the fix fix here
http://www.glbasic.com/forum/index.php?topic=2108.0
Thanks
Matthew

20
GLBasic - en / Re: Newton Physics OS X (PPC)
« on: 2008-Aug-04 »
Sorry probably made a mistake in what I said.:S The module includes a libnewton.a for each platform and compiles this into the executable. I compiled a physics example for linux and when I ran ldd on the executable libnewton.so was not listed so I assumed (probably incorrectly) that the library had been statically linked. I will try on a windows machine later and see what happens.
Thanks for the reply
Matthew

21
GLBasic - en / Re: Newton Physics OS X (PPC)
« on: 2008-Aug-03 »
Can GLBasic link static libraries? Under Klepto's 3d module for Blitzmax he links Newton statically thus doing away with the need to call a dynamic library. If GL can do this how do I set it up?
Thanks
Matthew

22
GLBasic - en / Newton Physics OS X (PPC)
« on: 2008-Jul-26 »
I believe that GLBasic uses the Newton Library as a dynamic library rather than statically linking. I have the libraries for Windows and Linux, but am not sure how to obtain / make the library for OS X. I am trialling on an Emac with System 10.5 installed. XCode is installed (Although I don't profess to really know how to use it). Has anyone used Newton and GLBasic on OS X? If so could you please give some advice on how to get Newton working or post the newton.dylib somewhere for download.
Thanks for your patience
Matthew

23
GLBasic - en / Re: Newton Error
« on: 2008-Jul-17 »
Thanks for the quick reply
 =D

24
GLBasic - en / Newton Error
« on: 2008-Jul-17 »
Hi, I have been fiddling with the Newton examples and am sure that the dddCollision sample worked previously however now when I compile and run this file the ball drops throught the "ground" object. I am sure that I have note changed the code but here it is anyway
Code: (glbasic) [Select]
LOCAL dtime
LOCAL org[] // just a dummy
LOCAL force[]

X_LOADOBJ  "ground.ddd", 0
LOADSPRITE "ground.bmp", 0
X_LOADOBJ  "sphere.ddd", 1
DIM force[3]

// initialize Newton Engine
NewtonCreate()

// default material
NewtonMaterialSetDefaults( 1, .9, .2, .9, .9)

ball = NewtonCreateSphere(.8, .8, .8, org[])
// position ball
NewtonBodySetPosition(ball, 0,12,3)
// enable dynamics
NewtonConvexCollisionCalculateInertialMatrix(ball, 1)
// enable gravity for ball
NewtonBodySetForceAndTorqueCallback(ball)
NewtonBodySetGravity(ball,0,-9.81,0)
NewtonBodySetAutoFreeze(ball, FALSE)


// solid, static ground
ground = NewtonCreateDDD(0, 0)

WHILE TRUE
NewtonUpdate(GETTIMER(), 6)
force[0] = -MOUSEAXIS(0)*3
force[2] = -MOUSEAXIS(1)*3
NewtonBodyAddTorque(ball, force[])
X_MAKE3D 1,100, 45
X_CAMERA 20, 20, -10, 0,0,0

X_AMBIENT_LT 0, RGB(255,255,255)

X_SCALING .8, .8, .8
NewtonDrawBody(ball, 1,0)
X_SCALING 1,1,1
X_SETTEXTURE 0,-1
NewtonDrawBody(ground, 0,0)
SHOWSCREEN
WEND

Using version 5.322
Thanks
Matthew

25
Announcements / Re: GLBasic, 2008/2009 plans
« on: 2008-Jul-16 »
Your move to allow better application development is exciting news, especially if you keep cross platform compatability in the process - looking forward to the first changes.
Matthew

26
Bug Reports / Re: Compiling for OSX
« on: 2008-May-29 »
Hi,
sorry if I am hassling but has anyone got an idea if the inline does not work for osx?
Thanks greatly
Matthew

27
GLBasic - en / Re: Apps on Mac OS x
« on: 2008-May-24 »
Thanks , sorry for posting on the wrong forum. Clicked the wrong one  :noggin:
Matthew

28
GLBasic - en / Apps on Mac OS x
« on: 2008-May-24 »
Hi, can anyone tell me what are the required frameworks on os x to run glbasic apps? I tried running an executable and found that it required SDL. I installed the SDL.Framework in my home directory and next time apparently libpng was needed. To save trial and error can anyone tell me what I need to install
Thanks greatly for any help you can give.
Matthew

29
Bug Reports / Re: Compiling for OSX
« on: 2008-May-24 »
OK. Did a bit more testing and I think that the error is being generated by some Inline code included by someone to change the falloff of the light.
First bit
Code: (glbasic) [Select]
INLINE
    };// namespace
    extern "C" void __stdcall glLightf(int, int, float);
    namespace __GLBASIC__ {
ENDINLINE
followed a bit later by
Code: (glbasic) [Select]
IF o.constant > 0 OR o.linear > 0 OR o.quadratic > 0
INLINE
    #define GL_LIGHT0 0x4000
    #define GL_CONSTANT_ATTENUATION 0x1207
    #define GL_LINEAR_ATTENUATION             0x1208
    #define GL_QUADRATIC_ATTENUATION          0x1209
    glLightf(GL_LIGHT0+iLight, GL_CONSTANT_ATTENUATION,  o.constant);
    glLightf(GL_LIGHT0+iLight, GL_LINEAR_ATTENUATION, o.linear);
    glLightf(GL_LIGHT0+iLight, GL_QUADRATIC_ATTENUATION, o.quadratic);
ENDINLINE
ENDIF
If I comment out these sections the code compiles and links without errors although I have not tried the application on a mac yet.
Is Inline broken on the osx compiler? as the code compiled and executed ok when making a windows app.
Hope this is of some help
Thanks
Matthew

30
Bug Reports / Re: Compiling for OSX
« on: 2008-May-23 »
Hi Gernot, I did some further testing. Other programs including 3d ones seem to compile OK however anything using the Entity code from the snippets forum produces the same error. The code for the Entity system is on the forum. I tried using the one straight from the forum. Made a project, added the Entity code file and main program was just [ DEBUG "Testing"]. Code failed to link with the errors above.
Thanks
Matthew

Pages: 1 [2] 3 4 5