Menu

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.

Show posts Menu

Messages - Schranz0r

#61
Hi and welcome to GLBasic :)

1. You can set the screensize with the command SETSCREEN in code. (Press F1 to see the help)
2. GLBasic use SpriteFonts. To create one go to Tools->Font Creator. Give the font a name and save it under the folder "Media"

Here code on how to load it:

Code (glbasic) Select
SETCURRENTDIR("Media") //set current Dir to "Media"!
SETSCREEN 1920, 1080, FALSE  // here you set the screensize windowed

LOADFONT "myFont.png", 1  // load the font, and give a number
SETFONT 1  // load the font by that given number


WHILE TRUE // mainloop

PRINT "Hello, world!", 500, 500 // print out a string to test the font

SHOWSCREEN // swap buffers
WEND // back to the top of "while"
END
#62
Must be a plugin.
You break compatibility that way.
#63
It is not that hard. But not worth it to write a plugin for that.
#65
Newer versions of GLBasic are Steam only.
#66
Beta Tests / Re: 3D Demo
2020-May-11
Hi, 3D in the Raylib-Wrapper is not even started.
The Core is complete in now, yesterday is started the "Shapes-Module" :)
#67
Nice, maybe we can include it then into the Repo.
#68
For the functions i wrote a program, just a simple one...
I do the most part by hand :)
#69
@SnooPI:
I just start the Wrapper from Irrlicht-Engine, was never into it to complete it ^^

Update to Raylib:

All Core-Functions are now in!
See https://www.raylib.com/cheatsheet/cheatsheet.html for what's inside Core!
Only one function is skipped: void SetTraceLogCallback(TraceLogCallback callback);
I see no use, and didn't know how to do it in GLBasic atm. :)
#70
But, to make it work from the compiler i have to wrapp it in the Sourcecode (c/c++)...
And wrapp this in C++ is much easier then in GLBasic itself!

In Source: Add Lib, Include Headerfile

Pseudo-code:
Code (glbasic) Select

namespace Raylib{
    void SETSCREEN(int width, int height, bool fullscreen)
    {
        InitWindow(width, height, __GLBASIC__::project_name.c_str()); // didn't know the internal projectname... :)
        if(fullscreen)
            ToggleFullscreen();
    }
}


no need to wrapp the whole thing in a gbas file, simple direkt calls...
This way you can say to the compiler to use the Raylib:: and not the __GLBASIC__:: namespace for this functions
#71
Hi dreamerman,

if you like/can/want, you can help me with this :)
Have some other ideas in mind!  :x
#72
So i changed the way to handle things!
The Types from GLBasic are now the same as the Structs from Raylib.
All functions and Types related to Raylib starting with the prefix "RL_"

Sample Code:
Code (glbasic) Select
LOCAL Title$ = "Raylib for GLBasic!"

RL_InitWindow(800,600, Title$)
RL_SetTargetFPS(60)


LOCAL col_lightgray AS RL_Color
col_lightgray.Set(200, 200, 200, 255)

LOCAL col_raywhite AS RL_Color
col_raywhite.Set(245, 245, 245, 255)

LOCAL col_red AS RL_Color
col_red.Set(255, 0, 0,255)


LOCAL fnt_default AS RL_Font
fnt_default = RL_GetFontDefault()

LOCAL fnt_PermMarker AS RL_Font
fnt_PermMarker = RL_LoadFont("fonts/PermanentMarker.ttf")

WHILE NOT RL_WindowShouldClose()

RL_BeginDrawing()

RL_ClearBackground(col_lightgray)
RL_DrawText("Congrats! You created your first window!", 190, 200, 20, col_red)
RL_DrawTextEx(fnt_PermMarker, "Oh, hi...! I'm the new Font!", 200, 250, 40, 2, col_raywhite)

RL_EndDrawing()

WEND

RL_CloseWindow()
#73
It's Cross platform, so it should be fine on Android.  :good:
#74
HUHU,

i start a new Project, and it works nice so far! :)


GITHUB

This (https://github.com/SliverLIVE/Raylib-for-GLBasic) is a wrapper from this: https://www.raylib.com
Instructions on Github. Feel free to help on this!
I also need maybe a better way to handle the Structs (Font, Image, Texture, Vector4, Vector3...) in GLBasic...
Any suggestions are welcome :)
#75
Raylib 3.0 at the moment ^^
Already linked it static, it's Crossplatform-Ready :)