Search found 1445 matches

by angros47
Aug 21, 2019 10:31
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

I hope this could help: https://stackoverflow.com/questions/34497195/difference-between-format-and-internalformat "iFormat" is the internal format (how data are stored in the video memory). GL_RGBA and GL_FLOAT are related to the pixel data used to created the texture (a pointer to these d...
by angros47
Aug 20, 2019 18:48
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

https://quickfileshare.org/Z1n/openb3d-test.zip

If you don't have the compiler, try this
by angros47
Aug 20, 2019 18:37
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

Oh, I understand now. Yes, UpdateNormals works only with meshes, and not with terrains. It's a bug I forgot to fix. To fix it, in functions.cpp, replace the function UpdateNormals with: void UpdateNormals(Entity* ent){ Mesh* mesh=dynamic_cast<Mesh*>(ent); Terrain* terr=dynamic_cast<Terrain*>(ent); G...
by angros47
Aug 20, 2019 14:51
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

Your program should be modified in this way: var sun=createpivot() var sun1=CreateLight( 1,sun) RotateEntity sun1,90,0,0 PositionEntity sun1,0,-100,0 LightColor sun1, 255,255,255 AmbientLight 64,64,64 and you must add, in the main cycle, after TurnEntity sun,-.5,0,0 the line: PositionEntity sun, Ent...
by angros47
Aug 18, 2019 10:10
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

Directional lights (the ones created with CreateLight(1) ) are not affected by their position, only by their direction. Commands like "PositionEntity" or "MoveEntity" have no effect on how the light looks like, only "RotateEntity" and "TurnEntity" will produce...
by angros47
Aug 15, 2019 22:27
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

Terrain functions (CreateTerrain, and LoadTerrain) are already available.

Your error seems to depend on wrong type assignment, you must check the declare of CopyEntity, and the line when you wrote DIM plane
by angros47
Aug 15, 2019 17:48
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 941
Views: 150816

Re: MiniB3d for FreeBasic

That bug is caused by an issue in capping of the volumetric shadow (it is one of the known downsides of the Z-fail algorithm used: shadows must be capped, or that effect will happen). Normally, OpenB3D should take care of building and capping the volumetric shadows automatically, but sometimes it mi...
by angros47
Aug 07, 2019 21:31
Forum: General
Topic: Quadra decimal
Replies: 8
Views: 395

Re: Quadra decimal

If you want to store a single variable, you would always need to use at least one byte, even if such a variable would need only two bits (there are no pointers for memory areas smaller than one byte) If you want to create an array, it would make more sense: such a data type could work to represent a...
by angros47
Aug 05, 2019 19:39
Forum: General
Topic: Using "PRINT #" and "INPUT ()" on binary files
Replies: 24
Views: 879

Re: Using "PRINT #" and "INPUT ()" on binary files

I verified for sure that, at least under Windows and DOS (not under Linux, at least in my test) GET# and INPUT() produce different results (and they may also change the position in different ways) if the file has been opened FOR INPUT or FOR BINARY
by angros47
Aug 02, 2019 23:12
Forum: Windows
Topic: Simplest way to play a MP3 file on Windows
Replies: 0
Views: 467

Simplest way to play a MP3 file on Windows

If I want to play a MP3 file called myfile.mp3 , this is all the code needed. #include "Windows.bi" #Include Once "crt/string.bi" #include "win/mmsystem.bi" ?mciSendString("open myfile.mp3 type mpegvideo alias song1", NULL, 0, 0) ?mciSendString("play song...
by angros47
Aug 02, 2019 15:00
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 12
Views: 1516

Re: Audio library for FreeBasic - Features

a simple SID playing routine where nice for my project, but i think open and play MP3 files easy where a must have if it is not to mutch work. No. I think MP3 should stay outside of the SFX library, just as JPG are not included in the GFX library. also a easy to use 3D sound positioning/playing whe...
by angros47
Aug 01, 2019 19:26
Forum: General
Topic: The text and attribute pages in gfx mode ?
Replies: 3
Views: 294

Re: The text and attribute pages in gfx mode ?

No, there is not. I looked for that, too, when I was looking for a simple way to achieve text output in OpenGL mode (before I patched the graphic library, I hoped to implement a console mode similar to the one of Basic4Gl.... after implementing the complete rendering on OpenGL mode, I dropped that i...
by angros47
Jul 31, 2019 22:17
Forum: Community Discussion
Topic: Audio library for FreeBasic - Features
Replies: 12
Views: 1516

Re: Audio library for FreeBasic - Features

Ok, after a long time, I finally managed to have a prototype of what I had in mind: https://sourceforge.net/projects/freebasic-sfx-library/files/ WAV and midi files are supported, they can be read and written, and the library provides some primitives to modify them, or to create new ones from scratc...
by angros47
Jul 30, 2019 10:08
Forum: General
Topic: Using "PRINT #" and "INPUT ()" on binary files
Replies: 24
Views: 879

Re: Using "PRINT #" and "INPUT ()" on binary files

Ok, found it... in the original Quick Basic help file: INPUT$ Function Details Syntax INPUT$(n[,[#]filenumber]) The n is the number of characters (bytes) to read from the file. The filenumber is the number used to open the file. If the file is opened for random access, the argument n must be less th...

Go to advanced search