Page 1 of 2

PureBasic OpenGL Version?

Posted: Mon Aug 30, 2010 7:33 pm
by J. Baker
What version of OpenGL does PureBasic use for 2D?

Re: PureBasic OpenGL Version?

Posted: Mon Aug 30, 2010 9:21 pm
by Fred
The one which comes with your drivers. About the commands, it's 1.2 + some extensions.

Re: PureBasic OpenGL Version?

Posted: Mon Aug 30, 2010 9:31 pm
by J. Baker
Fred wrote:The one which comes with your drivers. About the commands, it's 1.2 + some extensions.
Yes, the commands version is what I was looking for, thanks! ;)

Re: PureBasic OpenGL Version?

Posted: Mon Aug 30, 2010 9:41 pm
by J. Baker
Just curious, is one of the extensions to allow for png with alpha support? Or was this already supported by OpenGL? I noticed that DirectX 7 didn't support this.

Re: PureBasic OpenGL Version?

Posted: Mon Aug 30, 2010 10:52 pm
by Thorium
DirectX7 do supports alpha channel of png. It just have to be a Sprite3D.

Re: PureBasic OpenGL Version?

Posted: Mon Aug 30, 2010 10:56 pm
by J. Baker
Thorium wrote:DirectX7 do supports alpha channel of png. It just have to be a Sprite3D.
Hmm, I think I had already known that but forgotten. Thanks Thorium! But I believe that leaves me with only images that are square, as opposed to 512x128 for instance. I will do some testing. ;)

Re: PureBasic OpenGL Version?

Posted: Tue Aug 31, 2010 3:28 am
by J. Baker
Cool, odd sizes do work with Sprite3D, such as 512x128. Just as long as an older graphic card can support images up to 512 pixels.

Re: PureBasic OpenGL Version?

Posted: Tue Aug 31, 2010 7:01 am
by blueznl
Just don't be too sure it will work everywhere, and if you start rotating things get worse rather quickly...

Re: PureBasic OpenGL Version?

Posted: Tue Aug 31, 2010 8:44 am
by DarkDragon
blueznl wrote:Just don't be too sure it will work everywhere, and if you start rotating things get worse rather quickly...
Well once upon a time we've found out that PureBasic used NV_texture_rectangle.

Re: PureBasic OpenGL Version?

Posted: Tue Aug 31, 2010 2:51 pm
by J. Baker
blueznl wrote:Just don't be too sure it will work everywhere, and if you start rotating things get worse rather quickly...
You are correct. An older card such as a Voodoo 3 will only support square textures at a max of 256x256 and 16bit screen. At least for the Sprite3D on my older pc. But some older cards are fine as long as the width and height is divisible by 2, 4, 8, ect. Such as 512x128, 64x256, ect.

Re: PureBasic OpenGL Version?

Posted: Fri Sep 03, 2010 4:06 am
by J. Baker
After getting further development within my game, I'm noticing that OpenGL is much slower then DirectX 9. I'm guessing it's because of the out-dated version of OpenGL. Which is fine with old school style games, just like DirectX 7. But now I'm wondering how well will the game play on Linux and Mac, since they use OpenGL? I will be able to test it on Ubuntu soon but has anyone done a comparison test between Windows and Mac with OpenGL?

Re: PureBasic OpenGL Version?

Posted: Fri Sep 03, 2010 4:57 am
by J. Baker
I believe I found the issue. If I use StartDrawing(ScreenOutput()) in OpenGL, the game runs super slow. But it doesn't effect DirectX. Should I post this in the bugs section?

Re: PureBasic OpenGL Version?

Posted: Fri Sep 03, 2010 8:30 am
by DarkDragon
Pixelaccess is slow. PureBasic uses DirectDraw for such things in DirectX subsystem which speeds it up a bit, but its old and shouldn't ever be used anymore. You can't change this until you've learned how to use shaders.

Re: PureBasic OpenGL Version?

Posted: Fri Sep 03, 2010 2:17 pm
by J. Baker
DarkDragon wrote:Pixelaccess is slow. PureBasic uses DirectDraw for such things in DirectX subsystem which speeds it up a bit, but its old and shouldn't ever be used anymore. You can't change this until you've learned how to use shaders.
Thanks DarkDragon. But I think I'll create some numerical sprites to display the text I'm wanting for now since I don't know much about shaders yet. ;)

Re: PureBasic OpenGL Version?

Posted: Mon Aug 12, 2013 5:16 am
by flaith
Sorry to dig up this post, but I need to know if Purebasic still use OpenGL 1.2 because I tried with my old laptop (OpenGL 1.4) and the sprite system no longer works.
He could be useful to check the OpenGL version and to have a function for this or a warning from the compiler :)