TinyGL for FreeBASIC.

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: TinyGL for FreeBASIC.

Post by dodicat »

Yea, thanks D.J.Peters.
My wheels are black if I disable GL_COILOR_MATERIAL.
It could be the monitor of course. (Ebay)
Thanks anyway, nice library.
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Re: TinyGL for FreeBASIC.

Post by greenink »

test3 can't be stopped on my system. Linux AMD64. Well it can be stopped by pulling the power cord. Maybe it is just a video card driver issue.
I don't really have the motivation and time to write my own programming language but what I can do is add a lot of functionality to Lua. Like for example this setup for doing engineering equations: http://www.hamady.org/comet.html
I'm on the lookout for simple, easy things to add. And, at the same time I should try to make all those things consistent and interoperable.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: TinyGL for FreeBASIC.

Post by D.J.Peters »

greenink wrote:test3 can't be stopped on my system. Linux AMD64.
Well it can be stopped by pulling the power cord.
Maybe it is just a video card driver issue.
You can add a SLEEP 10 before WEND.
It's only missed for FPS measurement you know.

Or doesn't your system support the fullscreen mode at all ?

Joshy
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: TinyGL for FreeBASIC.

Post by dodicat »

Greenink
Same with Win 10 64 bit O.S.
Full screen is unobtainable for any screen setting at 16 (or 8) bits in either fbc compiler, i.e. 32 or 64 bit.
I get a complete freeze, but luckily it exits the program after about 30 seconds.
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Re: TinyGL for FreeBASIC.

Post by greenink »

I don't need full screen, really. Also it is a priority (for me) to keep away from large libraries that have steep learning curves and use up a lot of time.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: TinyGL for FreeBASIC.

Post by D.J.Peters »

New upload all libs 32/64-bit are static for Windows and Linux
fbImage for texture loading are included also.

Can someone tell me the FPS, CPU and OS from gears.bas please ?

Joshy
dafhi
Posts: 1645
Joined: Jun 04, 2005 9:51

Re: TinyGL for FreeBASIC.

Post by dafhi »

win7 64
i5 4210u - 920 fps

win7 64
i7 7700hq - 1310 fps
Last edited by dafhi on Oct 27, 2017 11:59, edited 1 time in total.
dafhi
Posts: 1645
Joined: Jun 04, 2005 9:51

Re: TinyGL for FreeBASIC.

Post by dafhi »

I'm itching to write a new ray tracer. i did anti-aliasing where first pixel ray points at random spot, and remaining pixels use same offset. my buffers are r,g,b singles and I simply add the result each frame

i have a hard time with many APIs. how easily could this general approach be done in GL?
Last edited by dafhi on Oct 27, 2017 6:40, edited 2 times in total.
h4tt3n
Posts: 698
Joined: Oct 22, 2005 21:12
Location: Denmark

Re: TinyGL for FreeBASIC.

Post by h4tt3n »

This is great Joshy, just what I need for rendering in my light weight 2D game engine.

I like how you can render openGL stuff and at the same time use native fb gfx.

My Lenovo laptop:
OS: Win10
CPU: AMD A10
GPU: AMD Radeon R6 series
FPS: ~650-850 (kept fluctuating)

My ThinkCentre tabletop:
OS: Win10
CPU: Intel i5
GPU: Nvidia GeForce GT 730
FPS: ~1000-1500 (also fluctuating)

Edit:

The getDepthBuffer.bas test snippet caused a crash.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: TinyGL for FreeBASIC.

Post by D.J.Peters »

@dafhi thank you for testing
FB TinyGL is primary for rastering triangles and quads, colored or textured.
For ray tracing you need ray and matrix stuff I posted many of them in the past.

@h4tt3n of course it's perfect for 2D and sprites also.
(rotating, scaling, independent moving background layers and so on ...)

There is one limitation in this version all kinds of images
are scaled up or down to 256 x 256 pixels and internal I use "only" 16-bits per pixel.
But you can put more than one image in one texture or you don't use all pixels at all.
Primary you have to save your 2D images as 256x256 pictures.
Ask if you need support.

In near future I will rewrite a new software engine in pure FB with some more optimized stuff via inline assembler.

Joshy
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: TinyGL for FreeBASIC.

Post by D.J.Peters »

h4tt3n wrote:Edit: The getDepthBuffer.bas test snippet caused a crash.
Thank you for testing should be fixed now.
please try again.

Joshy
lmemsm
Posts: 1
Joined: Mar 22, 2019 17:51

Re: TinyGL for FreeBASIC.

Post by lmemsm »

D.J.Peters wrote:
There is one limitation in this version all kinds of images
are scaled up or down to 256 x 256 pixels and internal I use "only" 16-bits per pixel.
But you can put more than one image in one texture or you don't use all pixels at all.
Primary you have to save your 2D images as 256x256 pictures.
Ask if you need support.
I've been experimenting with PicoGL which is a fork of TinyGL. Ran across your post on the fbTinyGL fork. I downloaded it and am comparing differences. If you're interested, I would really love to discuss some design issues regarding TinyGL. In PicoGL, I finally figured out how to get power of 2 sized textures working up to 2048. I'm using 32 bit internal mode so that alpha blending works. Just added some support for glTexSubImage2D. Made a fix to the lighting code so that the gears demo shows proper colors. Have made several other changes based on various forks and my own modifications/fixes in order to add missing functionality and fix issues. Would love to compare notes and share TinyGL fixes/patches if you're interested.
Post Reply