OpenGL calls

Previous topic - Next topic

bigsofty

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)

Schranz0r

Quote from: bigsofty 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

bigsofty

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)

Kitty Hello

for iPhone I use EGL, yes. I try to stick with V 1.1.

bigsofty

#19
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 ;)


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

Yes a nice glb file which inlines ogles would be awesome.

bigsofty

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)

Schranz0r

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


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()()





Schranz0r

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

Quote from: Schranz0r on 2009-Sep-08
Oooops....


Look at Samples/Common/gl.gbas

works fine!


Did you also test it by creating an IPhone project?

bigsofty

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)

Stu_C


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 :)

/Stu
www.ovine.net

sf-in-sf

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.