• Print

Author Topic: QB64-GL on computers WITHOUT dedicated video cards...  (Read 220 times)

JustinRichardsMusic

  • Sr. Member
  • ****
  • Posts: 335
  • Character names can be found in metal from the 90s
    • Email
QB64-GL on computers WITHOUT dedicated video cards...
« on: March 26, 2013, 05:38:35 AM »
Hi all,

Call me a noob if you will, but I'm asking this just to be sure anyway.  I'm guessing that there are a lot of QB64 users that are using bare bones / old skool setups for their QB64 programs.  Maybe its a hobby or just to make a few fun programs / games in their spare time.

I currently have the following setups:

Windows XP - onboard video
Windows 7 - onboard video
Mac OSX - whatever the hell they come with, I know it plays 3d games ok so I'm guessing its got a half descent (but not great) video card in it

Now, OpenGL has a lot of 2D based functions am I correct (as well as 3D), so that means that it should improve performance of 2D rendered surfaces as well?

My main question is;

Am I wasting my time waiting for QB64-GL if my current setups (listed above) won't benefit from it's new capabilities???

Keeping in mind that I use my MAC for recording mainly and hardly ever code on it...

Basically I have zero experience using OpenGL and would like someone to enlighten me if possible  :P

Thanks in advance,
Justin
James Hetter's Revenge has been unleashed! Follow the games progress here:
http://www.qb64.net/forum/index.php?topic=6762.0

Download the latest version here:
https://www.dropbox.com/s/8p8gguliw1y6ink/Hetters%20Revenge.zip?m

SkyCharger001

  • Hero Member
  • *****
  • Posts: 1594
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #1 on: March 26, 2013, 08:52:11 AM »
It's called GL merely because that is the current system used for implementing the graphical functions but the true benefits are from improved portability (no need to include ALL dlls) and (in the long run) code-density.

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #2 on: March 26, 2013, 10:49:16 AM »
In other words, OpenGL itself is not any faster, but you will benefit from using QB64-GL instead of QB64-SDL beacause you won't have to include any DLLs alongside your executable. OpenGL will work with all of the machines that you listed there. As far as machines without dedicated video cards go, the situation with OpenGL is rather interesting. Assuming OpenGL is present on the computer your program is running on (and it should be) yet there is no video card, OpenGL will still work. A video card is just sort of an extra feature. On laptops with "integrated" graphics cards, it is often faster when games avoid using the graphics card altogether.

mcalkins

  • Hero Member
  • *****
  • Posts: 1269
    • qbasicmichael.com
    • Email
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #3 on: March 26, 2013, 11:32:01 AM »
There is a graphics adapter. Whether it is integrated, or on an expansion card, it is still a graphics adapter.

Hopefully, the graphics driver provides support for hardware acceleration using OpenGL. Anything for which there is no hardware and driver support gets done in software.

Considering that SDL already sits on top of either GDI or DirectX, I'm not sure that you would get much speed improvement for 2D stuff using the traditional QBASIC functions. You might have a better improvement with 3D stuff when using the GL functions... However, I don't know much about this subject.

Regards,
Michael
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/

JustinRichardsMusic

  • Sr. Member
  • ****
  • Posts: 335
  • Character names can be found in metal from the 90s
    • Email
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #4 on: March 26, 2013, 05:52:50 PM »
Ok, thanks for the replies...

I was under the impression that there was to be a new set of _GL commands that would enable you to delegate certain rendering tasks to hardware rather than software, thus improving performance of slow software rendering tasks...

I was also under the impression that this would be built into existing commands where possible to stream line the code and keep it 'basic' in design...

I could be completely wrong though,

Thanks
Justin
James Hetter's Revenge has been unleashed! Follow the games progress here:
http://www.qb64.net/forum/index.php?topic=6762.0

Download the latest version here:
https://www.dropbox.com/s/8p8gguliw1y6ink/Hetters%20Revenge.zip?m

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #5 on: March 26, 2013, 07:47:34 PM »
The _GL commands are for drawing 3D. No matter how you're drawing stuff, QB64 (GL or SDL) will automatically render on the graphics card if possible. Rendering on the graphics card is only faster if you have a real graphics card. Integrated graphics chips really suck, but it shouldn't matter for most of the QBASIC-type games you would normally be making. For OpenGL 3D stuff, I'm not sure if QB64-GL is any faster than QB64-SDL, because it's still OpenGL that would be used in either case. QB64-GL just comes with a lot more OpenGL-related commands, making 3D stuff a little easier.

In a nutshell, there is no magical command to use "hardware acceleration" and make your games run faster. (The latest versions of QB64 might be somewhat faster, though. However, there is no reason for them to be faster other than Galleon fixing and optimizing. It will require further testing. I think that Galleon said at one point that he was improving the speed of _PUTIMAGE.)

If you want to process certain algorithms on the graphics card, there is something called GLSL (OpenGL Shading Language). Using GLSL, you may be able to do certain things faster, like full-screen effects such as bloom. Hypothetically, you could use GLSL to do a variety of non-graphics related things as well.

mcalkins

  • Hero Member
  • *****
  • Posts: 1269
    • qbasicmichael.com
    • Email
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #6 on: March 26, 2013, 10:16:38 PM »
Quote
I was under the impression that there was to be a new set of _GL commands that would enable you to delegate certain rendering tasks to hardware rather than software, thus improving performance of slow software rendering tasks...

OpenGL does what it can in hardware. Whatever can't be done in hardware gets done in software.

Quote
Rendering on the graphics card is only faster if you have a real graphics card. Integrated graphics chips really suck,

I suspect that the first sentence probably isn't true. The second is your opinion.

Quote
For OpenGL 3D stuff, I'm not sure if QB64-GL is any faster than QB64-SDL, because it's still OpenGL that would be used in either case. QB64-GL just comes with a lot more OpenGL-related commands, making 3D stuff a little easier.

SDL uses GDI or DirectX underneath it, not OpenGL. I'd guess that GDI should be pretty good for normal 2D stuff.

Direct3D and OpenGL both provide the possibility of hardware acceleration, but they go about it differently. My understanding is that Direct3D lets you find out things about the graphics hardware, and then lets you handle the details, whereas OpenGL provides you standard functionality, and then makes it happen, through either hardware or software. Since I don't program for either, I might be wrong.

GDI also provides the possibility of hardware acceleration, depending on the Windows version.

This seems to be a broad subject. There is a lot of reading that can be done about it on the Internet. For example, how well GDI performs depends on your Windows version, and on the graphics adapter. How well OpenGL performs depends very much on the graphics driver. Even the architecture of how these things are implemented varies between Windows versions.

Regards,
Michael
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #7 on: March 26, 2013, 10:42:19 PM »
Quote
Quote
Rendering on the graphics card is only faster if you have a real graphics card. Integrated graphics chips really suck,

I suspect that the first sentence probably isn't true. The second is your opinion.

Once upon a time, I had a laptop with an integrated Intel GMA graphics processor. I tried lots of software rendering demos, and they were all much faster than anything in OpenGL or DirectX. In addition, whenever I ran an OpenGL demo with an uncapped framerate, my computer would squeal horribly and start to smell like smoke. Other computers have objectively better graphics cards. Either the graphics processor was busted or it always sucked. That is an unbiased, objective fact, and it applies to most cheaply made integrated graphics processors. The fancier graphics cards tend to be quite expensive, so in my opinion, it is better to render on the CPU if you have a nice CPU. Computers these days should be fast enough to run any which code any which way.

Quote
Quote
For OpenGL 3D stuff, I'm not sure if QB64-GL is any faster than QB64-SDL, because it's still OpenGL that would be used in either case. QB64-GL just comes with a lot more OpenGL-related commands, making 3D stuff a little easier.

SDL uses GDI or DirectX underneath it, not OpenGL. I'd guess that GDI should be pretty good for normal 2D stuff.

QB64-SDL still allowed for the use of OpenGL if you wanted to make something in 3D. That's what I was talking about.

Quote
GDI also provides the possibility of hardware acceleration, depending on the Windows version.

This seems to be a broad subject. There is a lot of reading that can be done about it on the Internet. For example, how well GDI performs depends on your Windows version, and on the graphics adapter. How well OpenGL performs depends very much on the graphics driver. Even the architecture of how these things are implemented varies between Windows versions.

I have quite a bit of game programming experience, so I am qualified to generalize.

GDI is software and fast. DirectX is hardware and depends on the speed of your graphics card. OpenGL is unpredictable because Microsoft has been trying to kill it for years. Copying images in memory is one of the slowest things there is, so try to direct all of your drawing routines to one place rather than layering software-rendered stuff with hardware-rendered stuff. QB64 can use GDI, DirectX, or OpenGL, so don't go screwing around under the hood unless you want to do something in 3D, in which case the easiest way is to use OpenGL. For 2D stuff, it really doesn't matter what you use as far as speed is concerned. OpenGL is not necessarily faster than SDL.

bobtheunplayer

  • Jr. Member
  • **
  • Posts: 70
  • I'd rather be coding.
    • Email
Re: QB64-GL on computers WITHOUT dedicated video cards...
« Reply #8 on: April 04, 2013, 09:49:16 AM »
Using CentOS 6 with Intel 945GM graphics, an Intel Core Duo CPU running 1.83 GHz, 2GBs of RAM here.  This laptop is about 6 years old and runs the ./qb64/programs/samples/open_gl programs just fine.

  • Print