Author |
Message |
Geostigma
|
Posted: Sat Mar 31, 2007 8:21 pm Post subject: Can turing use the GPU? |
|
|
I'm sorry if theres a topic already on this forum but I didn't know what to put in the search engine or I didn't look hard enough. Can Turing call your GPU? I was looking at Funky monkies little 3d game and I'm wondering if the problem with his frame rates is that his program isn't using the GPU to calculate the 3d elements of a game. I know that Direct X and OpenGL use predefined projection matrix's but do they also call the gpu? I know that Turing isn't using DX or OGL |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Sat Mar 31, 2007 8:32 pm Post subject: RE:Can turing use the GPU? |
|
|
As far as I know, Turing cannot directly control or handle GPU calls. If it were to be done, I would suspect that you would have to use Sys.Exec() to run some other program written in a different language in order to do what you are talking about. |
|
|
|
|
![](images/spacer.gif) |
Geostigma
|
Posted: Sat Mar 31, 2007 8:36 pm Post subject: RE:Can turing use the GPU? |
|
|
How would I call Direct X or do I need some open source junk ? Then would I have have this Sys.Exec() in the loop or the procedure of the 3d engine so all it calculates is the 3D portion? I'm actually really interested in making 3d in Turing but the shit FPS is turning me off. |
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Sat Mar 31, 2007 8:40 pm Post subject: RE:Can turing use the GPU? |
|
|
In order to use DirectX at all, I'm assuming (I'm not entirely sure about this) that you'd have to use a language that supports it's use, create an executable out of the code, then execute that using Sys.Exec(). Another option (one with which I know extremely little about) is the external keyword. Perhaps you could look into that. |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sat Mar 31, 2007 8:50 pm Post subject: RE:Can turing use the GPU? |
|
|
In summary, it's not going to be possible. If you are about a million times more determined than I think possible, you might be able to hack some kind of solution together using either Sys.Exec or external, or perhaps a combination of both. However, the amount of work that you'll be doing to get that to work is many hundreds of times more than the amount of work required to learn a language that can support this natively. |
|
|
|
|
![](images/spacer.gif) |
Geostigma
|
Posted: Sat Mar 31, 2007 8:51 pm Post subject: RE:Can turing use the GPU? |
|
|
I have been talking to another person I know about this and he said
Paul Peloski Apr 1 2007, 01:43 AM wrote:
Well then you wouldn't really be writing your engine in Turing anymore, you've be offloading a lot of the code into another language.. I think you should settle with the slow performance, or switch projects to something more suited to Turing.
So basically using another program or engine to use the GPU is pointless because its not your work anymore. Turing is very limited so I guess thats one reason why its "Educational" I guess Ill have to move on to C to do something complex. It kind of sucks when you get a taste of programming and in the end you find out what you learned on is so useless practical wise. I guess Turing is way more suited to 2D
What languages can you use that directly interact with the GPU? |
|
|
|
|
![](images/spacer.gif) |
ericfourfour
|
Posted: Sun Apr 01, 2007 1:21 am Post subject: RE:Can turing use the GPU? |
|
|
Pretty much all of them except for Turing. |
|
|
|
|
![](images/spacer.gif) |
Windsurfer
![](http://photo-origin.tickle.com/image/118/9/8/O/118982819O270687078.jpg)
|
Posted: Sun Apr 01, 2007 11:48 am Post subject: RE:Can turing use the GPU? |
|
|
C has very basic (and old) graphics libraries. You'd have to use C++.
And Turing is not useless. I have to say that I learned a lot from it. Every programming language (with perhaps the exception being bf) helps in the learning of others. Once you know 2 or 3, it's practically a breeze to learn the next. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Geostigma
|
Posted: Sun Apr 01, 2007 12:12 pm Post subject: RE:Can turing use the GPU? |
|
|
Well its not useless, its educational. I'm just upset that "hey cant do 3d because of this and this limitation" I'm still learning the language. |
|
|
|
|
![](images/spacer.gif) |
md
![](http://compsci.ca/v3/uploads/user_avatars/1849317514ed6c4399768d.png)
|
Posted: Sun Apr 01, 2007 6:51 pm Post subject: Re: RE:Can turing use the GPU? |
|
|
Windsurfer @ 2007-04-01, 11:48 am wrote: C has very basic (and old) graphics libraries. You'd have to use C++.
C has access to OpenGL and DirectX. In fact most graphics libraries (or even APIs) are written in C for portability reasons. That being said there are other reasons for using C++ over C.
Using DirectX or OpenGL in turing is not possible. In order to even attempt it you'd have to somehow import large subsets of the win32 and win32 GDI APIs as well as the OpenGL and/or DirectX APIs. From what I know of turing the only way to do that would be to have the source for the runtime, or at least a way of patching it to add the APIs.
Using Sys.Exec() will not help as that only allows you to execute another application. And at that point the other application has to handle your entire game; so really you just have a crappy wrapper in the form of a turing executable. |
|
|
|
|
![](images/spacer.gif) |
|