SGL (Simple GL)

Advanced game related topics
pjay
Enthusiast
Enthusiast
Posts: 173
Joined: Thu Mar 30, 2006 11:14 am

Re: SGL (Simple GL)

Post 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.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: SGL (Simple GL)

Post 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.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 634
Joined: Fri Dec 04, 2015 9:26 pm

Re: SGL (Simple GL)

Post by skinkairewalker »

Wouldn't it be possible to use your imgui module with the current ogre3d in purebasic?
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: SGL (Simple GL)

Post 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
The Stone Age did not end due to a shortage of stones !
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: SGL (Simple GL)

Post 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.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 634
Joined: Fri Dec 04, 2015 9:26 pm

Re: SGL (Simple GL)

Post 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?
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: SGL (Simple GL)

Post 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
The Stone Age did not end due to a shortage of stones !
jamirokwai
Enthusiast
Enthusiast
Posts: 772
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: SGL (Simple GL)

Post 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?
Regards,
JamiroKwai
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: SGL (Simple GL)

Post 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.
"Have you tried turning it off and on again ?"
A little PureBasic review
jamirokwai
Enthusiast
Enthusiast
Posts: 772
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: SGL (Simple GL)

Post 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
Regards,
JamiroKwai
Post Reply