Simple Windowed OpenGL Framework - for OpenGL beginners

Developed or developing a new product in PureBasic? Tell the world about it.
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post by Violet »

Oh, I didn't know that PeekS() has more than one Parameter. Didn't read the Manual on this...

First I just turned off Unicode Support. That fixed it.
best regards,

Violet
Wladek
User
User
Posts: 98
Joined: Mon Feb 23, 2009 4:01 pm
Location: Poland
Contact:

luis

Post by Wladek »

Thanks for this. Now OpenGL is very easy for me.
Thanks x 3 :D
xaby
User
User
Posts: 16
Joined: Tue May 15, 2007 12:41 pm
Location: Germany - Berlin

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by xaby »

Love it, thanks a lot for this. Great job.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by luis »

xaby wrote:Love it, thanks a lot for this. Great job.
Hey, nice to see someone is still finding this useful :)

BTW, I'm now developing a library (opposed to this bunch of mixed code) to facilitate the use of OpenGL with PureBasic.

The goal is to to be able to write tech demos and maybe simple games with it (and again learning stuff while developing it).

My current idea is to make enough of the core functionalists, then release it in SOURCE form for the other PB users and if someone end up with using it I'll like to hear from them some feedback, suggestions, and criticism.

Then continue to develop it adding new features and release it again, and so on.

I don't really know if it will be of some interest to anyone else, because I'm doing this following my needs and my personal ideas about what it's nice to have or not and not trying to make it a general purpose lib. But anyway, having the source, you could simply cut away what you don't like, keep the core functions and build on that. Or simply learn some ideas from it if you are just starting.

For now I wrote some of the core, the mouse and keyboard routines, and now I'm starting with texturing, some timers, and fonts. Ah, it will be a flat api, no objects, and only for Windows. All written in PB from scratch, at least for now.

The name will be SGL (Simple GL).

Yes, PB has already a lot of nice 2d/3d commands, and yes I'm re-inventing the wheel, but this will be my wheel and having the sources I could always alter and expand it easily.

When the time will come I'll put an announce in this same section of the forum. Don't hold your breath :)
Last edited by luis on Fri Aug 30, 2013 11:32 am, edited 2 times in total.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by electrochrisso »

Hi Luis, I am just getting into a bit of 3D and would be interested in your development of SGL 8)
I have been playing around with Blender & Delgine, and SGL would be a good addition too. :)
PureBasic! Purely the best 8)
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by em_uk »

awesome stuff!
----

R Tape loading error, 0:1
infratec
Always Here
Always Here
Posts: 7580
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by infratec »

Hi Luis,

I have some problems with your redirected link:
http://web.newsguy.com/lmgava/pbforum/swof/SWOF.zip

The server could not be found.

Bernd
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by luis »

em_uk wrote:awesome stuff!
Thanks, you are welcome. The code is a little ugly but still... can be useful to understand some initial concepts.
infratec wrote: The server could not be found.
Works here, try again and if doesn't work PM me and I'll give you a different temporary link :)
"Have you tried turning it off and on again ?"
A little PureBasic review
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by Zach »

I think it would be a great idea, if you had the time to really develop it and at least bring it up to par with what PB offers, while keeping it easy to use.. A good alternative to learning really complex stuff like OGRE, etc.

And having control over the source would probably make it easy to guarantee the same experience over all platforms that use OpenGL.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by luis »

Zach, actually I'm doing it but it proceeds very slowly because programming it's just one of my interests and so sometimes I got carried away by something else for a while, but SGL is definitively something I want to work on in time.
Since I'll continue to work on in it for years to come (I hope) and since it will never be really finished I cannot say "I'll release it when it's done", so I decided from time of time I'll make available what I've done up to that point, in source form.

Two important remarks about what you wrote: it's opengl based, so much of the code is potentially portable but I'm writing it for windows because that's the OS I use, I don't have really interest in developing for Linux, and I don't have a MAC.
It's not a replacement for OGRE. This because OGRE is mainly 3D oriented and is quite high level, especially the PB "port". In my intentions SGL 1.0 will be a low level layer meant to be used *together* with low level opengl commands, to simplify programming for the opengl programmer using PB. Further versions will build upon that to make a 2D engine for games/demos (hiding opengl completely and relying on the SGL substrate), and as the last step probably will also contain some support for 3D, including some kind of model support, skeletal animation etc. All these in 100% PB code, without using any third party lib.

I'm doing this for myself to learn something, solve problems, and have fun, AND because I want to use something done the way I like it, with a source I know perfectly and I can enhance in time without problems. I will share the code only because can be of help/interest to someone, this is not something I hope will compete with some other product or anything like that.
I'll do my best to make it nice, but it's something relatively new to me so even if it it will be great for me, could be crappy for you.

Thanks
Last edited by luis on Mon Jun 05, 2023 11:33 am, edited 1 time in total.
"Have you tried turning it off and on again ?"
A little PureBasic review
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by Zach »

I wasn't suggesting you make something to compete with other software, I was just saying it would be nice if it reached that point and turned out really easy to use in comparison. That's all.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by luis »

I didn't think you were suggesting it. It was just part of my soliloquy. :wink:
Last edited by luis on Mon Jun 05, 2023 11:31 am, edited 5 times in total.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by Lunasole »

Just a great examples, such a good start with OpenGL for me. Thanks :)

[it still works fine with newer PB versions, just needed to fix path]

Code: Select all

IncludePath "..\.\demos\data"
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Simple Windowed OpenGL Framework - for OpenGL beginners

Post by Lunasole »

Also there is a small bug within LoadAvailResolutions procedure, appeared on my 2nd PC (a 12 years-old dinosaur ^^): this should be -1 to avoid error raising in some cases

Code: Select all

SelectElement(G_lstAvailRes(), lPos - 1)
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Post Reply