Jump to content
  • Advertisement
Sign in to follow this  
coderx04

OpenGL Can I use OpenGL in borland?

This topic is 4972 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

CAn I use opengl in borland C++ builder 6? because Im thinking I just do all the graphic and programming in borland, and I will do the networking with opengl. Is there any way I can use that? thanks

Share this post


Link to post
Share on other sites
Advertisement
It is not feasible to write networking components in OpenGL. However, OpenGL can be utilized as a graphics programming layer, using Borland's developer tools.

Share this post


Link to post
Share on other sites
openGL is graphics only. not only is it "difficult" to do networking in openGL, it is _impossible_. openGL != Directx. it is graphics only. for networking you'll have to find another API or just write your own basic stuff off of winsock. there are a number of good cross-platform networking libraries out there. look around in the network forum. libcurl comes to mind, only b/c i've used it at work, don't know how applicable it is for games.

-me

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://www.hawksoft.com/hawknl

Share this post


Link to post
Share on other sites
While it is possible to write general purpose code that runs in the GPU (and interfaced via OpenGL), I see very little incentive to use the said API for the purpose of writing network code - OGL is meant to be a graphics interface, no more, no less.

I recognize the fact that very advanced/dedicated programmers can put the GPU to good use on some networking functions, as it is a parallel stream processor after all. I can't really recommend this for a beginner though [smile]

I second Winsock recommendation if your target platform is Windows.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Nik02
I recognize the fact that very advanced/dedicated programmers can put the GPU to good use on some networking functions, as it is a parallel stream processor after all. I can't really recommend this for a beginner though [smile]

I can't really recommend this at all. The emphasis lies on _stream_ processor, ie. it cannot generate data, it can only manipulate it. The GPU is a parallel vector processor, with very limited data interchange and random access capability, very limited flow control, and without direct writeback to system resources. That's all nice and fine for simple but massive parallel data manipulations that won't require complex dependencies between individual data elements. For example physical state simulation, neural nets, image recognition, cryptography, and so on.

But trying to write network processing code on a GPU would be, bluntly said, pretty retarded. The overhead would be insane. There's hardly anything less adapted to the parallel vector processing nature of a GPU, except for maybe a GPU based keyboard or mouse handler...

Pure networking code (ie. code interfacing with the network card) would be impossible anyway, because the GPU cannot access system IO resources, devices or mapped memory.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
physical state simulation, neural nets, image recognition, cryptography

All of those could be used in networking applications, especially in the context of network games. However, these are very advanced usage for the gpu anyway, hence not recommending them for a beginner. You're right, though, these are not just networking-related technologies in the strictest sense.

Quote:
Pure networking code (ie. code interfacing with the network card) would be impossible anyway, because the GPU cannot access system IO resources, devices or mapped memory.

True that. To read back the results of GPU calculations, the program would download the data back to system memory and proceed from there.

By the way, today's professional GPUs have very good programmability, flow control and such. It is possible to run quite complex programs even on per-fragment basis on, say, nVidia's Quadro FX series (and, to slightly lighter extent, on the current consumer models such as GF6 and GFFX series).

Share this post


Link to post
Share on other sites
Quote:

CAn I use opengl in borland C++ builder 6?

because Im thinking I just do all the graphic and programming in borland, and I will do the networking with opengl.

Is there any way I can use that?
thanks



Im sorry but why anyone would want to use a Graphics API for Networking, just a bad idea. Use Direct-Play (whatever DirectX's networking game API is or Winsock (prob harder to use than DirectPlay as you need to write the handling code for the data you get in). Easily workable with OpenGL.

Ive used DirectInput, DirectSound with OpenGL, they work really well, no reason why DirectPlay is any different.

Personally though Id use Visual C++ 7.0 up (thats .NET), its very good by now.

Keith

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

All of those could be used in networking applications, especially in the context of network games. However, these are very advanced usage for the gpu anyway, hence not recommending them for a beginner. You're right, though, these are not just networking-related technologies in the strictest sense.

Processing data received through a network link doesn't count as network processing. The data stream could come from anywhere. When talking about game related network processing, I thought more about things like lowlevel UDP packet scheduling, stream sync, error corrections, data prioritization. All things pretty impossible on a GPU (well, not impossible per se, but with an efficiency comparable of doing it by hand on a calculator...)

I mean, if not using UDP, there's not much about networking anyway. Everything is handled by the OS. Opening up a TCP stream is something like 5 lines of code. The main idea of a network library is to either handle it more low level (UDP, raw packets, whatever), or to provide an abstract (perhaps multi platform) interface to system dependent calls. HawkNL (formerly OpenNL, they got into trademark trouble) I linked to above does the former, and POSIX style sockets do the latter. Or just use Winsock if you neither care about speed nor multi platform compatibility.

Quote:

By the way, today's professional GPUs have very good programmability, flow control and such. It is possible to run quite complex programs even on per-fragment basis on, say, nVidia's Quadro FX series (and even on the current consumer models such as GF6800).

Compared to a modern CPU, programmability and flow control of todays GPUs are still ridiculous. But that's not their job. A GPUs job is to execute relatively simple programs at maximum speed and parallelism. Going further than that, you'd suddendly have a second CPU where your specialized GPU used to be. Not saying that this won't happen anyway in the future (multiple CPU cores with dynamic load balancing doing everything, ie. the return of the software renderer). But currently, that's not the case.

Woah, this thread went offtopic pretty fast.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!