Author Topic: OpenGL calls  (Read 40043 times)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2795
    • View Profile
Re: OpenGL calls
« Reply #15 on: 2009-Sep-04 »
Hehe, this is an old thread, just trying to get back into GLB...  =D


My main worry is cross-platform compatibility, when using inline opengl calls.

If this is an issue what guidelines are there for keeping to the correct calls?

Should I just stick to the OpenGL ES docs as my main source of reference when using inline GL calls?  :whistle:

Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5116
  • O Rly?
    • View Profile
Re: OpenGL calls
« Reply #16 on: 2009-Sep-04 »
My main worry is cross-platform compatibility, when using inline opengl calls.

Thats no problem...  ... ?
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2795
    • View Profile
Re: OpenGL calls
« Reply #17 on: 2009-Sep-04 »
So GLB uses Open ES?, if so, which version is supported?  :doubt:

I am not using my own rendering context, I am using GLBasics, its quite important to stick within the bounds of GLBasic here.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: OpenGL calls
« Reply #18 on: 2009-Sep-05 »
for iPhone I use EGL, yes. I try to stick with V 1.1.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2795
    • View Profile
Re: OpenGL calls
« Reply #19 on: 2009-Sep-05 »
Excellent, thanks Gernot, I'll dig up the 1.1 docs now...  

OK, that supports the extension I am after. I will detect the platform and Import the relevant header, it may be beneficial to publish a list of supported GL headers, for in-lining GL on various platforms ;)


« Last Edit: 2009-Sep-05 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

MikeHart

  • Guest
Re: OpenGL calls
« Reply #20 on: 2009-Sep-08 »
Yes a nice glb file which inlines ogles would be awesome.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2795
    • View Profile
Re: OpenGL calls
« Reply #21 on: 2009-Sep-08 »
In a sense, there should be no need, I would imagine that GLB compiler already links to one, if you could IMPORT (with GLBs default lib paths) the commands that your program required, that would be ideal for me, no worrying about version etc... no real idea if this is really possible though? :P
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5116
  • O Rly?
    • View Profile
Re: OpenGL calls
« Reply #22 on: 2009-Sep-08 »
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

StuC_Ovine

  • Guest
Re: OpenGL calls
« Reply #23 on: 2009-Sep-08 »

that file errors all over the place

Code: (glbasic) [Select]

compiling:
D:\temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::glPolygonStipple(__GLBASIC__::DGIntArray&)':
D:\temp\glbasic\gpc_temp0.cpp:442: error: no match for call to `(__GLBASIC__::DGIntArray) (int&, int&)'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:355: note: candidates are: DGInt& __GLBASIC__::DGIntArray::operator()(int)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:394: note:                 __GLBASIC__::DGIntArray& __GLBASIC__::DGIntArray::operator()()
D:\temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::glGetPolygonStipple(__GLBASIC__::DGIntArray&)':
D:\temp\glbasic\gpc_temp0.cpp:470: error: no match for call to `(__GLBASIC__::DGIntArray) (int&, int&)'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:355: note: candidates are: DGInt& __GLBASIC__::DGIntArray::operator()(int)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:394: note:                 __GLBASIC__::DGIntArray& __GLBASIC__::DGIntArray::operator()()




Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5116
  • O Rly?
    • View Profile
Re: OpenGL calls
« Reply #24 on: 2009-Sep-08 »
Oooops....


Look at Samples/Common/gl.gbas

works fine!
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

MikeHart

  • Guest
Re: OpenGL calls
« Reply #25 on: 2009-Sep-08 »
Oooops....


Look at Samples/Common/gl.gbas

works fine!


Did you also test it by creating an IPhone project?

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2795
    • View Profile
Re: OpenGL calls
« Reply #26 on: 2009-Sep-08 »
That wont work, EGL is not the same as OpenGL, EGL, put simply, allows OpenGLES access to the rendering surfaces of the iPhone... the nearest I can think of a similar library is something like GLUT, in that its there to assist the underlying rendering API, rather than do the actual rendering... the main thing to remember though is that the iphone is using OpenGLES not openGL, two different APIs.

...then again, this is only what I've looked up, I've yet to dabble in the iPhone as I cant afford one yet... :P

Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Stu_C

  • Mc. Print
  • *
  • Posts: 34
    • View Profile
    • OvineByDesign
Re: OpenGL calls
« Reply #27 on: 2009-Sep-09 »

OPENGLES is a cut down version of OPENGL specifically designed for mobile/handheld devices.   http://www.khronos.org/opengles/

A noticeable difference is that you dont have to use glbegin()  glend()

lots of other differences of course :)


Offline sf-in-sf

  • Mr. Drawsprite
  • **
  • Posts: 93
  • Artist F.P. Brixey
    • View Profile
    • My computed art project
Re: OpenGL calls
« Reply #28 on: 2013-Sep-17 »
Quite a few things don't work on android because of GLES. Gernot describes that nicely in a topic about deploying to iOS. The same problems happen because of GLES restrictions. I remember that grabsprite, texture bump, shadows, etc. don't work. I found it useful to build all the 3D demo programs to (your device)/my tablet to see what works and what doesn't.
However everything works on a computer thanks to openGL.
On the day the atom is a cube I will start believing in the square pixel.