Page 3 of 3

Re: SGL (Simple GL)

Posted: Mon Dec 04, 2023 7:02 am
by pjay
This is a spectacularly well written library & clearly a lot of time and effort has gone into it - thanks for sharing it with us Luis. 8)

I think all it's missing is a simple 'comfort' layer with some general Setup(), Load/CatchTexture() & Render() routines built-in to the library, as people new to graphics programming who load sample #1 may be put off with the 200+ lines of code used to demonstrate a textured cube.

Re: SGL (Simple GL)

Posted: Mon Dec 04, 2023 12:48 pm
by luis
Hi pjay, thank you,

I know the examples require still a lot of setup code, even if less compared to naked OpenGL, but this library is to simplify OpenGL programming, nothing more.
My intention was to make a sort of GLFW but easily usable in PB (offering keyboard and mouse input, windowing, etc) while adding something more to the base GLFW (easier debugging, shaders loading/execution/error handling, facilitate texture loading, facilitate implementation of font rendering, some system info) without going overboard.
It does all that, but it's directed to OpenGL programmers or people learning OpenGL, so some things have no place inside this lib. As I said I consider SGL probably finished here.

Re: SGL (Simple GL)

Posted: Sat Jan 06, 2024 10:55 pm
by skinkairewalker
Wouldn't it be possible to use your imgui module with the current ogre3d in purebasic?

Re: SGL (Simple GL)

Posted: Sat Jan 06, 2024 11:29 pm
by StarBootics
skinkairewalker wrote: Sat Jan 06, 2024 10:55 pm Wouldn't it be possible to use your imgui module with the current ogre3d in purebasic?
Probably not, simply because the luis's module uses a BatchRenderer to render the GUI. As far as I know the Ogre implementation used in PureBasic don't have that.

Best regards
StarBootics

Re: SGL (Simple GL)

Posted: Sat Jan 06, 2024 11:44 pm
by luis
skinkairewalker wrote: Sat Jan 06, 2024 10:55 pm Wouldn't it be possible to use your imgui module with the current ogre3d in purebasic?
Maybe you forgot but you asked the same thing in July :)

I paste my previous answer because nothing is changed
It's just a demo of how it's possible to implement a IMGUI in OpenGL, it's not remotely complete or really usable for something serious.
That being said, when Ogre is set to use OpenGL I suppose it could be possible to make this work, but certainly not without some modifications and frankly does not sound like a good idea to me.
If I needed something like this for "PB Ogre" I would just follow the same principles shown in this demo and implement it using the PB Ogre command set.
But again, I can't stress it enough: it's not a finished product... a library.
It's just a demo implemented using this library (SGL) to test a concept and test the library itself.
The good thing is you have the source.

Also as StarBootics mentioned, the module uses a batch renderer (another demo for the SGL library) and this would not fit easily with using PB Ogre at the same time. You can use the same concepts outlined in the module to handle the "gadgets" and to decide when to draw and what, that part should stay the same but the batch renderer input data should be translated to PB Ogre drawing commands.
I'm not familiar with it, so I can't help.
And if there is not a concept for buffering drawing calls in it, it would end up being probably slower... but I simply don't know.

Re: SGL (Simple GL)

Posted: Mon Jan 22, 2024 5:07 am
by skinkairewalker
happy New Year to everybody,
luis wrote: Sat Jan 06, 2024 11:44 pm Maybe you forgot but you asked the same thing in July :)

I paste my previous answer because nothing is changed
Sorry, I had forgotten... xD

So the problem with purebasic not supporting modules like this is because it currently doesn't support opengl?

With the new implementation of Purebasic 6.10, perhaps it is not possible to use the Cimgui library to embed it in directx 9 or something along those lines?

Re: SGL (Simple GL)

Posted: Mon Jan 22, 2024 10:30 am
by StarBootics
skinkairewalker wrote: Mon Jan 22, 2024 5:07 am So the problem with purebasic not supporting modules like this is because it currently doesn't support opengl?
No, a BatchRenderer need to be integrated into OGRE engine in order to work. As far as I know the OGRE implementation used in PureBasic don't support that.

Best regards
StarBootics

Re: SGL (Simple GL)

Posted: Mon Jan 22, 2024 1:56 pm
by jamirokwai
Hi Luis,

looks great! I'd be interested to work with this library :-)
Do you think, a MacOS-version would be a lot of work?

Re: SGL (Simple GL)

Posted: Mon Jan 22, 2024 4:36 pm
by luis
jamirokwai wrote: Mon Jan 22, 2024 1:56 pm Do you think, a MacOS-version would be a lot of work?
Hi, it wouldn't be a lot of work, you need to compile GLFW for macOS (wasn't OS X just a while ago ? they can't stick to a name) and update the glfw importer (contained in SGL).
Plus, you need to double check the functions in SGL dealing with system stuff to see if you need to change something there (probably very little if anything).

But I will not be the one doing it because I don't have a Mac and I don't particularly like to work or even use a Mac, sorry!
If someone wants to do it is more than welcome to fork it on github and if he has any questions about the code I'm here.

Re: SGL (Simple GL)

Posted: Mon Jan 22, 2024 5:05 pm
by jamirokwai
luis wrote: Mon Jan 22, 2024 4:36 pm
jamirokwai wrote: Mon Jan 22, 2024 1:56 pm Do you think, a MacOS-version would be a lot of work?
Hi, it wouldn't be a lot of work, you need to compile GLFW for macOS (wasn't OS X just a while ago ? they can't stick to a name) and update the glfw importer (contained in SGL).
Plus, you need to double check the functions in SGL dealing with system stuff to see if you need to change something there (probably very little if anything).

But I will not be the one doing it because I don't have a Mac and I don't particularly like to work or even use a Mac, sorry!
If someone wants to do it is more than welcome to fork it on github and if he has any questions about the code I'm here.
Hi Luis,

great, thanks for the hints. I will have a look during the week.
There IS a compiled lib for macOS (OS X, macOS X, whatever), so I will start there.

Cheers