MAC window creation / Management / OpenGL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MAC window creation / Management / OpenGL

Kirill Kranz
Hi,

I need to knew who to create a window under OSX and handle menu. Also it would be nice to init OpenGL. No GLUT, NSGL would be fine.

need a complete example! no snippets! I'm complitly new on OSX, so sorry for lameness :) 

thx for Help.

-> Kirill Kranz
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: MAC window creation / Management / OpenGL

Kirill Kranz



Пятница, 12 июля 2013, 16:34 +04:00 от Kirill Kranz <[hidden email]>:
Hi,

I need to knew who to create a window under OSX and handle menu. Also it would be nice to init OpenGL. No GLUT, NSGL would be fine.

need a complete example! no snippets! I'm complitly new on OSX, so sorry for lameness :) 

thx for Help.

-> Kirill Kranz


--
Kirill Kranz

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: MAC window creation / Management / OpenGL

shiruba2012
In reply to this post by Kirill Kranz
Hi Kirill,

There are two ways of thinking about your question:
1. Do it using the Lazarus libraries (i.e. Delphi style), and let the system worry about the nitty gritty details.  
2. Do it using Mac OS libraries directly.

It sounds like you want to know about #2.  This isn't freepascal specific, and basically works exactly the same in FreePascal as it does in ObjectiveC.  In fact, there is a special mode called ObjectivePascal that allows FreePascal to be compatible with ObjectiveC libraries/frameworks, including the system ones.  (then you can follow apple's development guides).

If you know Delphi, method 1 will be easier.  If you know ObjectiveC development already, method 2 will be easier.
Also, method 2 allows you to directly access more OS X functionality and thus be "more native", while method 1 gives you cross-platform compatibility with f.e. Linux and Windows.

Some of the people on this list have already written tutorials online about this OnjectivePascal.


(You can find more on Google now that you know the right keywords).

You should probably read up on these tutorials first, and then you can ask questions here if you try things out and have points you don't understand.

Thank you,
    Noah Silva


2013/7/12 Kirill Kranz <[hidden email]>
Hi,

I need to knew who to create a window under OSX and handle menu. Also it would be nice to init OpenGL. No GLUT, NSGL would be fine.

need a complete example! no snippets! I'm complitly new on OSX, so sorry for lameness :) 

thx for Help.

-> Kirill Kranz

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal