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.

DLL Talk / OpenGL DLL

Author
Message
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 4th Nov 2004 00:41 Edited at: 4th Nov 2004 00:46
Hi, i am thinking of making a DLL to give access to OpenGL, i know it probably wont be used for making games on DarkBasic but i think it would be very usefull for making applications such as 3D Modelers and things like that.

I dont know if you can already access OpenGL through DarkBasic using its DLL librarys that come with windows.

Would anyone be interested in it if i do make it.

Thanks.
IanG
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 4th Nov 2004 01:44
there was a project that was going on which aimed to get dx out of pro

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2ghz, 512mb, geforce fx5200 128mb, 200gb, xp pro sp2
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 5th Nov 2004 03:18
Did the project get anywhere.
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 5th Nov 2004 04:13
Apparently not


I haven't heard anything recently.


Click the sig
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 5th Nov 2004 06:27
http://dbp-unchained.tk/

Quote: "this is not a quote"
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 5th Nov 2004 06:46
So its a mod and not an add on, apparently you have to remove dx and then install an OpenGL mod.

Well the one im working on now is basically a DLL that will allow you to use OpenGL commands without removing dx first, but as i said its only going to be intended for applications and not games i think the dx commands already built into DarkBasic do a good job of that anyway, but OpenGL is really easy to use if you wana make applications with it.
no_nm
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location:
Posted: 5th Nov 2004 06:50
this is interesting, keep us infromed if you proceed with it Iain.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 10th Nov 2004 03:16 Edited at: 10th Nov 2004 03:17
honestly, i don't see what the big deal over OpenGL is.

Cedega is $30, and is cabable of running Windows DirectX 9.0 applications on Linux/Unix. It isn't perfect but is good enough.
I can see the appeal of a 3rd Party Engine, but truthfully fail to understand why all of them are hell-bent on being OpenGL.

it isn't a very nice api in order to get an engine completely working within; and personally I think it would be more benificial to convert something like Ogre3D into a DLL for use in DBP.

just my opinion on the situation though


Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 10th Nov 2004 06:24
I am not trying to convert all of OpenGl, im only doing it becouse i think its really easy to program for and would be usefull if you want to make applications in DarkBasic, you will then be able to use OpenGl for displaying things aswell as DirectX.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 10th Nov 2004 06:33
The point being.. what?

seriously, why does no one want to create a DirectX replacement engine?
DirectX is simpler, easier to manage through object orientation, has more consise and conforms to a single standard, it has everything included as standard with interoperable code throughout the libraries, it has far more built-in functions without resorting to non-compliant (and manufacturer dependant) extensions, etc..

So why OpenGL and not DirectX?
If I were to make a replacement engine in OpenGL, personally I would want it to have the exact same functionality of the current engine's 3D capabilities... but then that would totally dismiss your first reason for developing this :-|

I honestly see no point past 'it is a learning experience'


Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 10th Nov 2004 06:40
Quote: "I honestly see no point past 'it is a learning experience"


However John Carmack, author of the most visually outstanding rendering engine on the PC today (Doom 3), swears by it. Now, its a difficult of a choice of whoose opinion to trust, but I think I'll go with Carmack.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 10th Nov 2004 06:50
Quote: "However John Carmack, author of the most visually outstanding rendering engine on the PC today (Doom 3), swears by it."


John Carmack also believes that Object Orientated programming is a pointless excercise. He might be a brilliant man, but he is by no means someone that anyone here really will ever be able to live upto let alone should follow simply because he says it.

Doom3 is a single OpenGL programmed engine, which although visually nice. This is an arguable point by almost every factoring gamer currently.

Half-Life 2 is pure DirectX9 and graphically can stand toe-to-toe with Doom3. What's more there are several games, like Painkeeper, Unreal Championship 2, Halo 2, etc... which all use DirectX9 very effectively.

While non of those games seems to have programmers who are individually famous like Carmack; fact remains.
Carmack is an exception of the rules of the game... he always has done things differenly and always will. While this is all well and good, he openly said at QuakeCon that in his eyes Doom3 was a failer engine-wise.

Not to mention that the game engine was designed to pander to certain cards. Doom3 will *ONLY* work on brand-name GeForce/Radeon/DeltaChrome... everything else will not work.
Half-Life2 on the other hand, while some shaders are designed to run optimally on certain cards, DirectX makes sures that any card with drivers and hardware capable of the effect will use it.

So I say again, why only OpenGL 3rd party engines and not DirectX?


Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Nov 2004 07:11
Quote: "So I say again, why only OpenGL 3rd party engines and not DirectX?"


Imho, there's no point in making a Dx 3rd party engine as the main engine is DirectX. I think if the engine was made in OpenGL, people would make DirectX engines instead.

AMD Athlon XP2800+ AMD Athlon 64 3000 M
GeForce FX5200 128MB Mobility Radeon 9700
1.25GB DDR RAM 512MB DDR RAM
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 10th Nov 2004 07:16 Edited at: 10th Nov 2004 07:17
I think the point of the exercise would be *just* beyond your grasp.

Many people find OpenGL much easier to use, and it would provide a BASIC language-like low level 3D interface which could be useful on older PCs which don't like DirectX, as well as more flexible rendering.

Plus, why create another DirectX engine when the main one is already written in DirectX?


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Nov 2004 07:26
Who again said that OpenGL is a language rather than an API?

Quote: "John Carmack also believes that Object Orientated programming is a pointless excercise."

And then there are hordes of programmers who believe that object oriented programming is the path to the holy grail. The truth lies somewhere inbetween, probably.


Quote: "http://dbp-unchained.tk/"

Where is mx7 by the way? Haven't seen him for a couple of months.

Play Nice! Play Basic!
Version 1.02 available now!
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 10th Nov 2004 16:00
As i keep saying Raven, im not trying to make a replacement engine, im simply making a DLL plugin for DarkBasic that will give you some access to OpenGL, i find it much easier to construct objects from vertex points and display and control them individually in OpenGL than it is in DirectX, this is very usefull for use in 3D Modelling applications that i could write in DarkBasic.

As RobK said why make another DirectX engine when the main one is already written in it and it works well enough.

The point is you will have access to DirectX and OpenGL, so i dont see why that is a problem.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 10th Nov 2004 17:07
Quote: " Who again said that OpenGL is a language rather than an API?"


Sorry, what I meant was that OpenGL's command style more closely resembles BASIC than DirectX.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Nov 2004 17:45
Quote: "Sorry, what I meant was that OpenGL's command style more closely resembles BASIC than DirectX."

Yes I know, my comment wasn't directed at you at all (although I have to admit I wasn't clear ).

http://forum.thegamecreators.com/?m=forum_view&t=34561&b=1
"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."

Play Nice! Play Basic!
Version 1.02 available now!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Nov 2004 00:23
DX in c++ relies heavily on use of pointers and classes and IMO ugly looking structures. OGL is used mostly through simple functions.(from what i've been told) In the past, I'd argue that OGL just flat out looks better, but now I think D3D is just as capable. Though I still like OGL better myself.

"eureka" - Archimedes
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 11th Nov 2004 00:26
It's weird how people who know about computers can tell the difference between DX and OGL games.

You used to be able to anyway, now they both look too good.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Nov 2004 00:44
Quote: "It's weird how people who know about computers can tell the difference between DX and OGL games.

You used to be able to anyway, now they both look too good. "


because they used to (and generic applications still do) have different polygon shading routines.

So when they smooth shade they look very different. But using Shaders people generally use a Dot3 Style Phong; which means everything looks identical now.

OpenGL still does use less resources, but that said; it is purely graphics.

Quote: "As i keep saying Raven, im not trying to make a replacement engine, im simply making a DLL plugin for DarkBasic that will give you some access to OpenGL, i find it much easier to construct objects from vertex points and display and control them individually in OpenGL than it is in DirectX, this is very usefull for use in 3D Modelling applications that i could write in DarkBasic."


Sit down and think about that for a while.. then perhaps you might realise where your first mistake with it is.


Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 11th Nov 2004 00:48
What are you talking about Raven.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Nov 2004 01:13
You can not combine OpenGL and DirectX within the same render target; I don't care how good a programmer you are, that is a limitation of the hardware.

Thus, means you cannot make use of the DarkBASIC Professional pipeline for rendering, management and such.
You create an OpenGL plugin, you MUST create an entire Engine around it.

Why? Because DarkBASIC Professional lacks the language definition to utilise OpenGL in an 'as-is' state. You would cause it to slow down and make the conversion a waste.

Further more you will find anyone who is capable of programming raw OpenGL, would much rather the definition that a C-Based language is capable of providing.

Just look at PureBASIC; it has full OpenGL raw access, and everyone is falling over each other in order to create a simplified engine to use. People who are using Basic DO NOT want an overly complicated library to use, they want it to be plug'n'play.

Seriously sit back and think about it for a while.
As I said, I can see this being no more adventageous than a learning exercise.


Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 11th Nov 2004 01:20
I know you cant combine the two in the same render target, but the point of what i am doing is to be able to create an OpenGL window and use that to display the OpenGL output, DarkBasic would simply control what you want diplayed in it with commands from the user, i know this isnt exactly ideal but it would be of interest to people like me who want to make applications using DarkBasic.

At the moment i am adding the OpenGL aux library to my DLL and will have an example soon.
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 11th Nov 2004 04:28 Edited at: 11th Nov 2004 04:29
Quote: "DirectX is simpler, easier to manage through object orientation"


I disagree, altough I'm working with DX now, it's just not as simple to set up as OGL, and the code looks horrible becouse of it being object orientated (but I'm guessing that has something to do with my 'neat' coding skills )



Specs: AMD Athlon 1800+, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce4 Ti4400 128mb
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 11th Nov 2004 05:06
Quoted from mx7's post:
Quote: "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. "


That may be reason enough to make an OpenGL engine. I say go ahead and do it.

I remember when people said VB dll's were impossible to get working in DBP, but then CR,Exeat and a few others made it possible.

I remember when people said OOP wouldn't be possible ever in DBP, well, TheWendigo is working on this and has already shown working examples of DarkBasic OOP.

Same thing about just getting OpenGL to even render in DB, well there you have it, go ahead and code your engine.

Quote: "Hi, i am thinking of making a DLL to give access to OpenGL, i know it probably wont be used for making games on DarkBasic but i think it would be very usefull for making applications such as 3D Modelers and things like that."

I say do it, but if you known DX, it may be a good idea to go ahead and use DX. Though an OpenGL plug-in would be cool to see.



A book? I hate book. Book is stupid.
(Formerly known as Yellow)
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Nov 2004 05:47
Quote: "I disagree, altough I'm working with DX now, it's just not as simple to set up as OGL, and the code looks horrible becouse of it being object orientated "


Why not?

DirectX you include the library header, make a Window, create the DirectX Instance. voila, setup.
You can then attach that to a class and create as you deem necessary.

OpenGL you include the library header, make a Window, create the resize routine, create the exit routine, create the render routine, setup the context, setup opengl, initilise.

OpenGL might be more procedural, but that is because it is. This means an engine will end up being many times more code than a DirectX one.

Tell ya what, i'll code up 2 versions of the same example in OpenGL and DirectX and show you; be the simplist route here.

Quote: "I remember when people said VB dll's were impossible to get working in DBP, but then CR,Exeat and a few others made it possible."


I remember people saying it wasn't possible to Directly use Visual Basic 6 DLLs; and ya know what, we were right

Quote: "I remember when people said OOP wouldn't be possible ever in DBP, well, TheWendigo is working on this and has already shown working examples of DarkBasic OOP."


I remember the discussion about it saying it wasn't worth the benifits. The overhead for it would've been too much with a language which was already trailing speed-wise to competitors.

.. People seem to think OpenGL is the answer to alot of prayers, i just think your going to be very disappointed.


MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 11th Nov 2004 05:54 Edited at: 11th Nov 2004 05:57
Right, but my point being that there are workarounds.

Quote: "I remember people saying it wasn't possible to Directly use Visual Basic 6 DLLs; and ya know what, we were right "


[EDITED] Read one post down.

Quote: "I remember the discussion about it saying it wasn't worth the benifits. The overhead for it would've been too much with a language which was already trailing speed-wise to competitors."


It can still be a good way for OOP programmers to get into a language. I'm not educated enough to comment on the speed aspect though.

Quote: " People seem to think OpenGL is the answer to alot of prayers, i just think your going to be very disappointed."


Probebly not, but it'd be like having one more feature when buying DBP. If nothing, make the OpenGL .dll and use it for C++ as well as DBP.



A book? I hate book. Book is stupid.
(Formerly known as Yellow)
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Nov 2004 05:54
Quote: "I remember people saying it wasn't possible to Directly use Visual Basic 6 DLLs; and ya know what, we were right "

it is possible to use VB6 (and VB .NET) DLLs directly with DBpro if you use my plugin. With that method you can't use them as TPC's, though. That's where Exeat's wrapper tutorial enters the stage, or CattleRustler's method.

Play Nice! Play Basic!
Version 1.02 available now!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Nov 2004 06:06
Quote: "It can still be a good way for OOP programmers to get into a language. I'm not educated enough to comment on the speed aspect though."


actually i'd suggest reading the thread on it in the WIP forum.
impressive but at the same time makes me think 'WTF?'

Quote: "With that method you can't use them as TPC's, though."

Hense, you can't use them directly.
i'm not sure what is so hard to understand about the term directly here...

unless i can sit down and type:

Make Message Box( ) and it'll run a DLL i've created in VB6 in DBP as a direct command; then i would consider that in-direct. that is just me though.

it is possible to use .NET DLLs directly in DBP though. just have to do a little extra work setting them up and such; not to mention you have to command line compile, which is a pain but a necessary evil.

Quote: "Right, but my point being that there are workarounds."

Unfortunately, the dream isn't for the workarounds.

Honestly, i don't understand why work arounds *MUST* be OpenGL. Out of all of these posts, no one at all can explain to me what is so special about OpenGL. If your going to replace an engine, then you have 2 choices; why pick opengl? it is a simple bloody question.
if your going to patch/workaround, then why the hell not use the API that the original was constructed in where you can actually literally hijack and hack the code with something viable?

i just want to know what the heck everyone has against DirectX exactly.. i agree the base engine needs to be altered and rebuilt, but i don't agree that *only* OpenGL has the ability to do this.


empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Nov 2004 06:10
Quote: "Hense, you can't use them directly.
i'm not sure what is so hard to understand about the term directly here...
unless i can sit down and type:
Make Message Box( ) and it'll run a DLL i've created in VB6 in DBP as a direct command; then i would consider that in-direct. that is just me though."

Right that's just you.

Play Nice! Play Basic!
Version 1.02 available now!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Nov 2004 06:45
alright so... Load DLL and Call DLL commands in DB/DBP = Direct Functions?

cause to me that = Indirect Function Loading and Execution


empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Nov 2004 06:52
If DBpro/DBC provides a way to use DLLs without the need of an additional, external program, then you can use DLLs directly.

Play Nice! Play Basic!
Version 1.02 available now!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Nov 2004 07:06
Technically you are using an external program to use the DLLs;

Load DLL "myDLL.dll", 1
Call DLL ( 1, "MessageBoxFunction", "Message" )

is not the same as

Message Box "Message"

therefore, DarkBASIC is not directly accessing it, it is giving you direct use through an indirect means. it is a pretty simple concept to grasp, seriously what is so hard about it?


empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Nov 2004 16:11 Edited at: 11th Nov 2004 16:20
Quote: "Technically you are using an external program to use the DLLs;"

Yes? What external program would that be?


Quote: "Load DLL "myDLL.dll", 1
Call DLL ( 1, "MessageBoxFunction", "Message" )
is not the same as
Message Box "Message""

No really?

Quote: "therefore, DarkBASIC is not directly accessing it, it is giving you direct use through an indirect means."

LOL. A Raven twist. Good let's drop the "indirect means" part which makes no sense anyway. So what remains?
"it is giving you direct use"
Yes, but that's what you denied the whole time.
"I remember people saying it wasn't possible to Directly use Visual Basic 6 DLLs; and ya know what, we were right"
So we agree, DB Classic enhanced gives you direct use of DLLs, ie. you can use DLLs directly.

Quote: "it is a pretty simple concept to grasp, seriously what is so hard about it?"

Good question, now you answer.


@Iain
Sorry for taking this off topic, but that's what you get with black birds. Anyway, good luck with your OGL project. I think it'll be a useful addition.

Play Nice! Play Basic!
Version 1.02 available now!
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 11th Nov 2004 16:16
Thanks empty, i am working on the aux library functions of OpenGL at the moment, i will post here with an example when you can at least make an OpenGL window and display something in it.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Nov 2004 16:41
Somebody on LLRGT was developing an ogl project with DB.
http://www.dannywartnaby.co.uk/rgt/index.php?board=22;action=display;threadid=3893

"eureka" - Archimedes
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 12th Nov 2004 02:40 Edited at: 12th Nov 2004 03:33
Edited by RobK: Deleted - This is getting seriously off-topic now, as well as being a rather pointless argument. Can I ask both empty & Raven to keep to OpenGL related discussion. Thanks.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
re faze
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 27th Nov 2004 14:18
it would be nice if the ide let you pick whether u wanted to make a dx 7/8/9 project like the project options in vc++. by the way... if tgc were to switch to ogl would the structre of db's syntax and number of available commands change?
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Nov 2004 14:32
I wish I'd noticed this sooner..

Quote: "it would be nice if the ide let you pick whether u wanted to make a dx 7/8/9 project like the project options in vc++. by the way... if tgc were to switch to ogl would the structre of db's syntax and number of available commands change? "


Lee doesn't like OpenGL.. therefor the will never be an official OpenGL Engine. As for maintaining several engines at once of DirectX, considering how different 7/8/9 are, that would be a true pain in the ass and quite pointless considering only Windows 95 cannot run DirectX9, which has everything included in it from all the previous Dx's plus it's own updates. Not to mention it is much quicker.


TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 28th Nov 2004 05:17
Quote: " it would be nice if the ide let you pick whether u wanted to make a dx 7/8/9 project like the project options in vc++."

I was working on an Irrlicht plugin for DBP, which allowed you to chose on run-time if you'd like to use DX8/9 or OGL. That way you could let the user chose which API to use, the same way Half-Life does. Then DBP crashed and never ran again, which trashed that project and 2 others.

Login to post a reply

Server time is: 2024-11-23 09:45:35
Your offset time is: 2024-11-23 09:45:35