MiniB3d for FreeBasic

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

Which OS version are you using?
RonGranger
Posts: 8
Joined: Jan 24, 2016 17:20

Re: MiniB3d for FreeBasic

Post by RonGranger »

I am using Linux Mint 17.3 (Ubuntu).
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

32 or 64 bit?

If you use 64 bit, you might need to recompile the library from source.

Also, can you run the OpenGL examples included with FreeBasic?
RonGranger
Posts: 8
Joined: Jan 24, 2016 17:20

Re: MiniB3d for FreeBasic

Post by RonGranger »

fbgrx_opengl.bas:

Code: Select all

Aborting due to runtime error 1 (illegal function call) at line 14 of fbgfx_opengl.bas::()
glfw-splitview.bas:

Code: Select all

fbc -exx -w all "glfw_splitview.bas" 
glfw_splitview.bas(16) warning 39(0): Redefinition of intrinsic
glfw_splitview.bas(17) warning 39(0): Redefinition of intrinsic
but it worked aswell.

and others worked normally.

I am using the 32bit-compiler.

Code: Select all

FreeBASIC Compiler - Version 1.04.0 (10-01-2015), built for linux-x86 (32bit)
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

Can you compile and run this?

Code: Select all

screen 18,  32, , &h10002 
sleep
if it doesn't work, your FB installation might be incomplete.
RonGranger
Posts: 8
Joined: Jan 24, 2016 17:20

Re: MiniB3d for FreeBasic

Post by RonGranger »

I see the black screen.
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

Ok: what happens with this simple example:

Code: Select all

#include "openb3d.bi"

screen 18, 32, , &h02	

	
Graphics3d 640,480,32,1,1

var cube=createcube()



moveentity cube,0,0,5

var camera=createcamera(0)
renderworld
flip
sleep 
RonGranger
Posts: 8
Joined: Jan 24, 2016 17:20

Re: MiniB3d for FreeBasic

Post by RonGranger »

I see the grew cube...

Just a small question: fbgfx_opengl.bas failed, what is different there?
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

One difference is the MULTISAMPLE flag... The other is the usage of the constant (my example uses literal &h02, while fbgfx _ opengl uses a constant defined in fbgfx.bi. ... have you changed it?)

Otherwise, I have no idea. Anyway, if you can see the cube it means that OpenB3D works
RonGranger
Posts: 8
Joined: Jan 24, 2016 17:20

Re: MiniB3d for FreeBasic

Post by RonGranger »

I changed nothing... May be I copied some libraries into wrong places or missed /installed some wrong libraries from the package administration...
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

I don't know... anyway, it looks like it's not an issue of OpenB3D (since you got it working), but of your FreeBasic installation: maybe in the Linux subforum you could get more help. Good luck!
Westbeam
Posts: 239
Joined: Dec 22, 2009 9:24
Contact:

Re: MiniB3d for FreeBasic

Post by Westbeam »

Is it possible to get the "AlignToVector"-function ?
I tried to add it in the header, since I found the function in the sourcecode in "entity.cpp":

Code: Select all

declare function AlignToVector cdecl alias "AlignToVector" (byval ent as any ptr, byval x as single, byval y as single, byval z as single, byval axis as integer =3 ,byval rate as single=1) as integer
But it can't find it. The compiler says "(.text+0xa34): undefined reference to `AlignToVector'"

I'm using the newest version of the library (1.1) on Linux.
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

Because I forgot to add the function in "functions.cpp"
leopardpm
Posts: 1795
Joined: Feb 28, 2009 20:58

Re: MiniB3d for FreeBasic

Post by leopardpm »

just tried to download... Windows Defender found malware from sourceforge...

Code: Select all

Name: Trojan:Win32/Tulim.A!plock

Category: Trojan

Description: This program is dangerous and executes commands from an attacker.

Recommended action: Remove this software immediately.

Items: 
file:C:\Users\Public\Documents\PlayBasic\Projects\Iso Vox Test Area\Voxel Render and Edit (FB)\OpenB3D 1.1 for FB win32\openb3d.dll

Get more information about this item online.
is this download OK or is it really infected?
angros47
Posts: 2321
Joined: Jun 21, 2005 19:04

Re: MiniB3d for FreeBasic

Post by angros47 »

It's a false positive.

Anyway, if you want to be 100% sure, you can rebuild the library from the source code using Mingw GCC.
Post Reply