INLINE calls

Previous topic - Next topic

Kitty Hello

you can make linux dll's (they are called .so (shared object) as well. But that might give you headache as well.
You can get the headers for each compiler and put it in the correct directory. I'll attach the headers that came with the GCC version here. Wait.

bigsofty

Quote from: GernotFrischYou can get the headers for each compiler and put it in the correct directory. I'll attach the headers that came with the GCC version here. Wait.
That's a very good idea... :)

May I suggest you consider packaging these with GLBasic as there kinda essential for anyone doing in-line C above DLL header integration...
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

http://www.glbasic.com/files/headers.rar copy these in the platform directory. It should get you going.

bigsofty

Thanks for the help Gernot, downloading now...
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

bigsofty

Great so far... works like a dream, thanks again Gernot... and as bonus all I need now to play with OpenGL is "#include ", no more cut and paste! :D

This should be definite option for anyone using the inline C ;)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

bigsofty

Are these header files still OK to use?

Mac OSX has been added since then and there are no header files in the 'platform' to support it?

Also, do these files need to be updated with each version of GLBasic?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

These headers are win32 only, IIRC. Do you need mac headers?

bigsofty

Quote from: GernotFrischThese headers are win32 only, IIRC. Do you need mac headers?
Well, my game expands a little on the GL support and uses some other inline C, so I suppose yes, if I want to eventually port it to Mac and other platforms. To be honest I was going to do the win32 version first and then convert to other platforms.

It would be nice if this was part of the official distribution and supported, it really does add a lot to the extendibility of GLBasic. I think its one of those relatively 'hidden' features that no other of the  gamebasics offer that is incredibly powerful once harnessed.

As a request, as part of the cross-compile process could a remark be put on the end of the generated 'c' source line, saying what GLBasic line is being processed...

So for example...

This error...

C:/DOCUME~1/Dad/LOCALS~1/Temp/glbasic/gpc_temp4.cpp:50: error: `GLuints' does not name a type

Would become this error...

C:/DOCUME~1/Dad/LOCALS~1/Temp/glbasic/gpc_temp4.cpp:50: error: `GLuints' does not name a type // From: OpenGL.BAS, Line: 22

This would allow in-line programmers to locate the correct line in the Glbasic source where error was produced,

Just a suggestion.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

OK. We've already started on an OpenGL wrapper. If only I could find it....

bigsofty

An "OpenGL wrapper"? That sounds interesting?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

bigsofty

Quote from: GernotFrischOK. We've already started on an OpenGL wrapper. If only I could find it....
OpenGL Wrapper for GLBasic? Any info? If its a lib that can allow me to insert OpenGL commands directly into my GLBasic source, without having to resort to in-line C, then that would be REALLY helpful! :D
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

Yes, yes. Oh dear. I'm so short on time these days.
I'll really really have a look now.

bigsofty

Any luck Gernot? ;)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

My laptop's screen is dead. I'll have to see if I can find time after fixing it this week. So, so sorry.

bigsofty

Ah bummer, no problem Gernot, I hope its not a bad problem...
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)