PB and OpenGL calls

Just starting out? Need help? Post your questions and find answers here.
juankprada
User
User
Posts: 62
Joined: Tue Mar 18, 2014 4:25 pm
Location: Bogotá, Colombia

PB and OpenGL calls

Post by juankprada »

Hello everybody!,

I am looking for a way to call OpenGL functions directly from PB. I really dont know how to achieve that and I couldnt really find anything useful on the forums that lead me in the right direction. So, does anyone know how to make this?

I know there must be a way as OpenGL is used eventually when rendering something on screen (at least in Linux and Mac by default) So I would like to know how to do that myself.

Thanks
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PB and OpenGL calls

Post by IdeasVacuum »

Luis has an excellent post on OpenGL: OpenGL framework
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: PB and OpenGL calls

Post by applePi »

thats a great demos from luis, i have tried it now for PB 5.22 LTS , but for me i should comment the lines:
With G_lstAvailRes()
\flgCurrent = #True
PokeL(*MaxX, \lcSizeX)
PokeL(*MaxY, \lcSizeY)
EndWith
and then it will work okay.
this is in windows xp /32bit
and if you want easier way to use opengl look the glfw wrapper http://purebasic.fr/english/viewtopic.php?f=40&t=57875

there is also an example in "C:\PureBasic\Examples\Sources - Advanced\OpenGL Cube"
Post Reply