Add Announcement Here

OpenGL in OSx

OpenGL in OSx

Ok, starting to get something working for OSx now. I do need to release that unit testing in OSx version, but I'll need to fix up the readme first because you need to get google testing compiled yourself before you can make use of it.

Anyway, I've managed to get openGL in X11 to compile in OSx. I'm gonna go with X11 for a little while because it's the same approach that was used in linux. Initially I tried to compile openGL (without any windowing) using that little -framework option for the compiler, but that didn't work. But as it turns out, all you really need is the X11 SDK installed and you pretty much have all the same stuff as in Linux.

stu
useravatar
Offline
679 Posts
User info in posts
Administrator has disabled public posting

Re: OpenGL in OSx

Been trying to get a complete open GL 3.1 version of a polygon mesh going, but there's problems finding glBindVertexArray for the OSX build, which from what I can tell is a new version 3.1 addition. I can still use the older version of glBindBuffer, so we'll just have to use the deprecated functions in OSX for now.

stu
useravatar
Offline
679 Posts
User info in posts
Administrator has disabled public posting

Re: OpenGL in OSx

OK, there is now a working version of the graphics example which makes use of the vertex array to draw a double sided triangle and rotate it. The next thing to do is cameras and transformations. After that we'll want some text output to test having 2 cameras render into the same window.

After that comes the real challenge: textures and then lighting.

Texturing in this engine is meant to be done procedurally and never through external art resources (except of cause for fonts). This will eventually include procedural audio. But for the initial texturing trails all we want is something super simple (perhaps a character array converted to a texture internally). Lighting will come after that, which for now will be simple vertex lighting.

Once those are in place, we'll test out multiple windows sharing resources to draw similar stuff, as well as finer control over cameras.

On second thought, layers have to stay in, because we want to be able to crop, resize and place a cameras output anywhere on the window. These operations are not the responsibility of a camera, so a layer will have to be used instead.

Once ALL that is done, we'll have to have a look at how the graphics pipeline can be improved. Possibly by packing all the vertexes and textures into a single buffer object. Which hopefully, can be easily clamped and modified in sections.

stu
useravatar
Offline
679 Posts
User info in posts
Administrator has disabled public posting
stu
useravatar
Offline
679 Posts
User info in posts
Administrator has disabled public posting

Re: OpenGL in OSx

It seems that vanilla X11 is no longer cool in OS X, instead you need XQuartz if you want x11 support. Well, considering that I want to avoid making people install xcode for this project (what's with all the Xs in mac development, they don't all mean 10), it may be that for now at least there should be an option to develop with a lighter, more specific, frameworks.

http://xquartz.macosforge.org/trac

In the future I'll work on making a dedicated cocoa addon for windowing in mac.

stu
useravatar
Offline
679 Posts
User info in posts
Administrator has disabled public posting

Re: OpenGL in OSx

stu
useravatar
Offline
679 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
246
Total Polls:
0
Total Posts:
474
Dormant:
User Info:
 
Total Users:
7
Newest User:
ian96
Members Online:
0
Guests Online:
22

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked
gamestool, Powered by Joomla! and designed by SiteGround Joomla Templates