Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DirectX Removal & OpenGL for DBP

Author
Message
MX7
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location:
Posted: 4th Jul 2004 20:36
I thought this might be of interest to some of you.

There are two major modifications to DarkBASIC Pro underway. The first mod, NoDX,
is a COM intercept library, which permits a DBP program to run without DirectX 9 present.
The second, DarkGL, allows for OpenGL-based rendering under the control of DBP code.



Download the DarkGL/NoDX demo here: http://unchained.dbspot.com/gldemo/ (217 KB, zipped)

I'm aware that most DBP users have DX 9.0b installed on their systems, so you may have to
borrow Grandma's PC if you need absolute proof that it runs without it.

Some key points:
The OpenGL surface is part of the main window created by DBP. It is not an overlay/child window.
Objects are not mananged by DBP, they are assembled using primitives.
The OpenGL commands are issued in the DBP source like so:



The smallest 3D app I was able to create with the regular DX-based DBP was no less than 4.5 MB.
The OGL demo above is around 1/8 of that size, at 568 KB.

If you want to know more about this work, or would like to participate in it, check it out:
http://dbp-unchained.tk/
http://unchained.dbspot.com/

Questions? Comments?

I almost forgot to say hi.
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 4th Jul 2004 20:44
Wow.

That looks really good.

Unfortunatly, I am in no position to test this out untill I can get at my school computers ( 2 weeks away ).

But untill then, I'll be sure to follow this thread

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Everwhat Studios
20
Years of Service
User Offline
Joined: 28th Apr 2004
Location: UK
Posted: 4th Jul 2004 21:14
Cool! I would be very interested to see how this pans out and possibly use it in the future

The forum user formerly known as Kangaroo2.
If the apocalypse comes, email me
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 4th Jul 2004 22:06 Edited at: 4th Jul 2004 22:07
Very clever...

I knew that no 2D/3D/Multimedia functions would work without DX9, but I didn't realise that it was possible to remove the requirement for simple programs.

I'm going to sticky this temporarily as a lot of users will find it interesting.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 4th Jul 2004 23:16
that is amazing work!!

seems like a hell of a workaround, and the openGL code is probably a bit convoluted, but still very, very impressive!!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 4th Jul 2004 23:18 Edited at: 5th Jul 2004 00:16
Heh.

OGL in DBP - Round 3.

*Ding*


Edit: I'll retract that cynical statement, after looking at your website it looks as if you've actually done a bit of research before heading off blindly. Although you're the first to disable DirectX (Raven will be angry at being beaten to it ) previous people have gotten much more of OpenGL working in DBP although I suspect you won't have any problems with that anyway.

The main thing is that currently DirectX 9 is well above OpenGL, I know I'd use DX over OGL if I had the choice. Although OGL has the advantage of portability and there's no huge runtime library that needs downloading, it's still a fair distance behind DX in terms of graphics quality which seems to be the only important thing these days. Shaders are the wave of the future and HLSL is doing much better then OGL in that area as well as others. Until OpenGL 2.0 comes out, at least. Well, I better leave it there because this will probably set off a huge OGL vs DX war! lol.

On the other hand, small Indie developers like the DBP community are probably looking for compatibility, speed and a smaller download size rather then graphics power. So you could be doing a very good thing.


"Computers are useless they can only give you answers."
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 5th Jul 2004 00:50
Looks incredible....ly complex

Runs very fast and very smoothly. Well done!

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 5th Jul 2004 02:48
Fascinating ... good job.

Have a


The new developer network updates and beta downloads kick ass.
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Jul 2004 02:57
great job!
cheers


* DBP_NETLIB_v1.4.3 - July, 2004 * Click Logo
Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 5th Jul 2004 03:27 Edited at: 5th Jul 2004 03:28
Bugger, thats three people doing (or have attempted) OpenGL for Dark Basic.

*You (and you've got it to disable DX9, nice)
*Blivvy (who's put work on his plug-in on hold)
*Me (working on adding every function listed in the gl.h,glu.h,glaux.h files)

Guess we're all really determined to get OpenGL running in DBPro

Looking good.

Cheers,
Preston

[Edit] Hold on, didnt Blivvy call his plug-in DarkGL? Name conflict.


Intel Celeron 1.3 Ghrz 512MB Ram NVIDIA GeForceFX 5200 128MB
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Jul 2004 03:36
Blivvy calls his DBGL.
I'm not exactly worried about being beaten to unhooking Dx here, as Mx7 has been working on this problem alot longer and he isn't doing it alone. There are quire a number of far more experienced individuals working on these.

Thankfully now Mx's is now working really I can go by his information and a little tinkering of my own and save a good few months off my development time.
Quite impressive though, as I thought you were still a little way off getting this working

SoulMan
21
Years of Service
User Offline
Joined: 22nd Nov 2002
Location: In a house somewhere on the planet earth
Posted: 5th Jul 2004 03:38
Here's something you need to consider with OpenGL.
If you were to get a fully working version that supported all the commands of DarkBasic Pro, then it might be possible to get it working in Linux or even yet on a Macintosh. While both systems are not equal to playing games on a PC with Windows, they can surely provide for that niche market at least.
SoulMan

This is as backwards as is This
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Jul 2004 03:41
Quote: "Here's something you need to consider with OpenGL.
If you were to get a fully working version that supported all the commands of DarkBasic Pro, then it might be possible to get it working in Linux or even yet on a Macintosh. While both systems are not equal to playing games on a PC with Windows, they can surely provide for that niche market at least.
SoulMan"


While that *might* be possible, simply because DirectX is no longer in the picture doesn't mean the Windows dependancy is gone.
Using through Darwine or Wine will more than likely work now without it, you still won't be able to have fully working linux version without basically replacing the complete engine.
Which really it would be far easier simply to create another compiler specifically for Linux/MacOSX.

Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 5th Jul 2004 05:20
Quote: "The main thing is that currently DirectX 9 is well above OpenGL, I know I'd use DX over OGL if I had the choice. Although OGL has the advantage of portability and there's no huge runtime library that needs downloading, it's still a fair distance behind DX in terms of graphics quality which seems to be the only important thing these days"


I'm not so sure. OGL can support anything you like via its extensions system. On my PCs, OGL graphics look slightly nicer colourwise but DX9 has come a long way from the early days of Microsoft's API.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 5th Jul 2004 05:22
look really interesting

heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 5th Jul 2004 05:41
Magnificent, MX7!

Peace, the anti-Bush.
HZence
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 5th Jul 2004 06:43
If I used Open-GL, I'd be a happy guy.

Frankly though I don't even know where to download OGL from, did a search (years ago, though) and I couldn't find a download location!


Team EOD :: Programmer/Storyboard Assistant
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 5th Jul 2004 06:53
@HZence: http://www.opengl.org

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 5th Jul 2004 07:23
@HZence

It comes with your PC already, you don't need to download it.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Jul 2004 10:22
Quote: "It comes with your PC already, you don't need to download it."


Drivers, but there are also the libraries you must include like glut32.dll if you use them.

MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 5th Jul 2004 13:40
Very nice job MX7. It's good to see OpenGL coming to DB.

Soon enough, DBP may become multi-platform.



A book? I hate book. Book is stupid.
(Formerly known as Yellow)
ifman1
20
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 5th Jul 2004 14:33
What, no one defending OGL vs DX??? What a bunch of pansies.... You can pretty much do anything in OGL that you can do in DX. Sure, the shaders aren't built in yet... 1.4 and 1.5 have access to them. Stop by OpenGL.org periodically and see what them guys are doing with shaders. Hell, there's a reason John Carmack does all his work in OpenGL.

Actually I don't care either way, Windows is convenient so DX is fine, but I couldn't let Exeat off that easy. This is great stuff guys. Using OGL will finally let us get some low level vertex and pixel control in our programs. Awesome. And if someone gets GLUT working, then there's a GUI built in. But this does seem like a lot of trouble for little or no reason. Is anyone actually planning an OpenGL project? Or is this just being done to be done?

DBPro's made out of PEOPLE.... PEOPLE.......!!!!!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Jul 2004 03:38
Quote: "What, no one defending OGL vs DX??? What a bunch of pansies.... You can pretty much do anything in OGL that you can do in DX. Sure, the shaders aren't built in yet... 1.4 and 1.5 have access to them. Stop by OpenGL.org periodically and see what them guys are doing with shaders. Hell, there's a reason John Carmack does all his work in OpenGL."


Perhaps because OpenGL isn't such a big deal when it is just a function wrapper.
The way that this is doing the NoDx, is quite frankly a raw hack; Intercept the call to create Dx and just don't do anything cept tell it that it's created (when it isn't).
You still technically have Windows dependancy here.

OpenGL is quite frankly one of the most annyoing languages to use, sure it's an open format which is small. Without an engine though, no-one is going to use it end of story.

Why? Because people are using DBP to NOT have to deal with the api's directly. I could wrapper the entire DirectX9 API if i chose to (infact to achieve certain things at work that's exactly what we did), but no one would use it because they don't want to take ages to setup cameras, create windows, initilise buffers.

Create Object Plane, is a single command for around 30lines of DirectX Code, the same goes for OpenGL.
I am all for a plugin as OpenGL 1.5 has just as many features as DirectX 9 (Shaders are built-in, either asm or glsl), but without an engine you can give everyone all the features you like. They're going to say 'nuts to that!'

Carmack is a poor example for OpenGL btw, because he also doesn't use C++ (or rather don't program OO in C++); simply because he believes that C is more than powerful enough.

Really with Blivvy's OpenGL, Prestons OpenGL and now Mx7's OpenGL, we have 3 OpenGL Engines in development. Question is are we actually going to see any of them? So far this is the only one i've seen working, and what it is doing could be coded up with an hr using raw OpenGL32.dll commands.

Tell you what, I wish when we loaded DLL we didn't have to use Call DLL to use the functions, we could just use them normally. Would save alot of time and effort.

Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 6th Jul 2004 04:21 Edited at: 6th Jul 2004 04:22
Quote: "So far this is the only one i've seen working, and what it is doing could be coded up with an hr using raw OpenGL32.dll commands."


Raven, have you seen my LLRGT post? And the demo's at my website?

http://www.dannywartnaby.co.uk/rgt/index.php?board=22;action=display;threadid=3893

http://www.neowolfgames.tk - Look in the projects area, I have a couple of downloads there. Sorry about the freewebs slow as a snail download speeds though.

I've had mine working for a while now. I just never made anything good in it yet. Though, I did decide to restart and do the commands in order Working hard at getting em all in though.

Cheers,
Preston


Intel Celeron 1.3 Ghrz 512MB Ram NVIDIA GeForceFX 5200 128MB
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Jul 2004 04:45
Quote: "OpenGL is quite frankly one of the most annyoing languages to use, sure it's an open format which is small. Without an engine though, no-one is going to use it end of story."


OpenGL is not a language, its an API.

Quote: "Carmack is a poor example for OpenGL btw, because he also doesn't use C++ (or rather don't program OO in C++); simply because he believes that C is more than powerful enough."


That doesn't make sense whatsoever, just because Carmack chooses not to use C++ does not inherently make him a poor programmer. All GameCube games are written in plain C with OpenGL, and that doesn't stop them from being good.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
ionstream
19
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 6th Jul 2004 05:24
Wait, DBPro is going to have DirectX removed for OGL? Or is DarkGL another program?

Quote: "Create Object Plane, is a single command for around 30lines of DirectX Code,"


Lemme see,

D3DXCreatePolygon(...)
D3DXLoadTextureFromFile(...)
SetTexture(...)
Draw().
That should do it.


Anyways, what about input? OpenGL doesnt have device input functionality (as far as I know), and DInput is of course with DirectX.

... and the fluffy kitten played with the ball of string, all through the night.
On a lighter note, a local Kwiky-Mart clerk was brutally murdered last night.
Preston C
20
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 6th Jul 2004 05:29
Yeah, if DirectX is disabled, then input, music, and video will be disabled. Leaving nothing but an OpenGL Graphics Engine and the other commands that aren't DirectX based. Though, it would be simple to get keyboard input in the plugin using windows messages. Mouse input shouldnt be too hard either. Its the music and video though that would be the problem.

Thanks to Blivvy and Robk though , I don't have that problem with my plug-in, input and music works fine, and so should video

Cheers,
Preston


Intel Celeron 1.3 Ghrz 512MB Ram NVIDIA GeForceFX 5200 128MB
HZence
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 6th Jul 2004 06:16
Quote: "It comes with your PC already, you don't need to download it."


I see...

Well it certainly didn't come with my old Compaq. Then again, Compaqs suck.

Quote: "What, no one defending OGL vs DX"


It's preference. Your end-user might have OGL installed, but not DirectX, so why not make a version of your program compatible with both? Seems logical to me.


Team EOD :: Programmer/Storyboard Assistant
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Jul 2004 06:32
Quote: "OpenGL is not a language, its an API."


no it is a language, if you decide to use the precompiled API then that's upto you.

Quote: "That doesn't make sense whatsoever, just because Carmack chooses not to use C++ does not inherently make him a poor programmer. All GameCube games are written in plain C with OpenGL, and that doesn't stop them from being good."


i never said that Carmack was a bad programmer. what I said was he was a bad example, and he is. Carmack is a very traditional programmer who prefers to have access of a language and programming system over automation to lighten the workload.
this makes him a truely awesome program and a very good imspiration but a terrible example for a bunch of people who are using a RAD Tool.

And NO, Programmers do NOT have to use C for the GameCube, nor do they have to use OpenGL.
Codewarrior is the standard development platform for the Cube and it uses C/C++ Programming Compiler; you can also use .Net Managed DirectX for the GameCube (it was released back in August 2003), just so happens to be what Renderware is now based on for pure platform compatibility.

Quote: "Well it certainly didn't come with my old Compaq. Then again, Compaqs suck."


Windows 95b -> XP come with OpenGL 1.1 Installed as standard, but that is only OpenGL32.dll which contains the function declarations *only*

Your graphics card Drivers will be what include the actual functionality; if your graphics card doesn't support OpenGL then neither does Windows. That simple.

Linux you have to install (and rebuild the kernel) with GLX in order to use OpenGL, this is usually instructed by your graphics card drivers and usually graphics card specific. GLX is the Crossplatform library of functions for OpenGL, this must be linked if using OpenGL when on an Alternative OS Machine.
MacOS/X Comes with it installed as default, but again you need graphics card drivers to support it.

SCI_CO
20
Years of Service
User Offline
Joined: 20th Apr 2004
Location: USA
Posted: 6th Jul 2004 07:36 Edited at: 7th Jul 2004 04:36
Hello,

looks good
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 6th Jul 2004 08:22
Quote: "Quote: "OpenGL is not a language, its an API."

no it is a language, if you decide to use the precompiled API then that's upto you."

Nonesense. The L in OpenGL stands for Library not Language. And a library is NOT a language.

Play Nice! Play Basic!
JoelJ
20
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 6th Jul 2004 15:39
Quote: "...Using through Darwine..."

-Raven

i spell my name without the E thank you very much

anyone sick of this image yet?
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Jul 2004 20:31
- As they say Raven, you have been 0wned. Just accept it when you make a mistake and have the grace not to argue.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
M00NSHiNE
20
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 6th Jul 2004 22:13
I wondered this not long ago. What's the best API for doing hardware accelerated 2d? I was in favour of DX8 (for compatibility, this isnt a DBPro project mind) but had a look at using OGL. It seems theres much less support for OGL - by that I mean less developers seem to use it unless theyre aiming for cross-platform.

Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 7th Jul 2004 04:00
2D OpenGL you'd probably be better off using SDL.

Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 8th Jul 2004 04:08
Wow, this turned into something like the 14th Raven-0wnage when I wasn't even looking...

On topic. All I want is to be able to display ASCII in OGL-- can that be done yet ...?


Shooting for Eternium Man.
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 8th Jul 2004 06:44
Quote: "Wow, this turned into something like the 14th Raven-0wnage when I wasn't even looking..."

why are you always searching for trouble with raven?

Good job MX7, can't wait to see more



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 8th Jul 2004 06:59
Quote: "why are you always searching for trouble with raven?"

Actually it's a) not trouble but having a laugh while reading Raven's statements (the so called Raven moments) and b) you really don't need to search them.

Play Nice! Play Basic!
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 8th Jul 2004 07:04
why am I even trying...



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 8th Jul 2004 10:00
:: shrugs :: Probably best just to not get involved Mussi, Empty is quite frankly just a troll of this forum. So I've decided to take a new stance and ignore him, wish that god damn ignore user feature was finished like Rich said he would what... almost a year ago now.

No doubt hear something back like "it's in the new forum", which is all well and good; but we're not using the new forum, so really i don't give a stuff what is in it until I am using it.

btw, if anyone wants to know why if you open it up you can't see the OpenGL plugin... that's cause MX is using it natively right now by manually including and calling the functions.
Really isn't that hard to achieve.

Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 8th Jul 2004 15:08
um I dont really know what so great but.. Why is Open GL so great or better then DX9?

A 1 man team
EVIL SIG!
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 8th Jul 2004 18:04
C'mon guy's could we take this discussion else-where?

Like the general board please?

This post was for the announcment of a thirdparty application that can help to utilise OGL for DBP instead of DirectX, not for a debate about which is best, OGL or DirectX.

Thank You.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Jul 2004 18:36
My question is .... Will there be a commercial version of this?

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 8th Jul 2004 20:32
Quote: "This post was for the announcment of a thirdparty application that can help to utilise OGL for DBP instead of DirectX, not for a debate about which is best, OGL or DirectX"


Which begs the question of, "Why isn't this in the Work In Progress forum?", use your lock-weilding mod powers Jess and lock this thread!

Lol, I'm kidding of course, but honestly, if it was a less interesting project then it probably would have been locked for being posted here.


"Computers are useless they can only give you answers."
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 8th Jul 2004 20:49
Quote: "My question is .... Will there be a commercial version of this?"


Depends on your definition of commercial.
I have a feeling that the DarkGL is simply going to be a wrapper, which if that's the case; any self respecting programmer like Mx wouldn't charge for because really he's doing nothing but converting functions that are free to access already.

If on the other hand DarkGL turns out to be a replacement engine based around OpenGL, then the work involved i'd say there could be a good chance he'll charge for it (if only to cover losses and setup a proper site).

Either way OpenGL itself if commerically valid.

Login to post a reply

Server time is: 2024-05-06 13:57:34
Your offset time is: 2024-05-06 13:57:34