Connecting SDl 1.25 to Xcode 6.1 - xcode

I just freshly installed Xcode 6.1 and SDL 1.25. I am trying to link them and get a simple template going so I can finally get this underway.
I have searched far and wide through the internet to find this but there doesn't seem to be any tutorials with correct information on how to set up an SDL_Template and linking the directory correctly.

I would highly recommend you use SDL 2.0 rather than SDL 1.2 but if you really must use 1.2 Lazy Foo's tutorial will still work even though it was done in Xcode 4.4
http://lazyfoo.net/SDL_tutorials/lesson01/mac/xcode/index.php
If you want to use SDL 2.0 then this tutorial shows the setup for it and also comes with a handy template pre-made
http://zamma.co.uk/setup-sdl2-in-xcode-osx/

Related

Where to find GLSLEditorSample (GLSL IDE)?

Currently I'm doing some GLSL-stuff and to my surprise I cannot find a reasonable IDE for this (MacOS). Nothing to fancy, but just a way to change the code and see the results. I know of the Shadertoy-website, but I'm more interested in an offline solution.
So I came across the built-in OpenGL Shader Builder. According to Wikipedia, this is deprecated and superseded by GLSLEditorSample, which should still be available as an example project for XCode (of which I have version 7.3.1 installed). However, I basically cannot find anything about this, online nor on my computer. Therefor my question: Is this still relevant? If so, where is it located?
PS: if you know of any other GLSL IDEs, I'm open to that as well
Here they explain how to setup OpenGL on a MacOS on Xcode:
https://www.youtube.com/watch?v=Tz0dq2krCW8&list=PLRtjMdoYXLf6zUMDJVRZYV-6g6n62vet8

Can I use pre-"profiles" OpenGL versions on Macs?

I want to use a deprecated GL function - glPushAttrib. Ideally, I'd do that by using the Compatibility profile of a recent GL version, but Macs don't support that. So I'm happy to settle for using an old GL version, from before GL profiles existed. My question, though, is: does Mac support that?
Note: Don't tell me that I shouldn't use glPushAttrib unless you're able to link to a good library that replaces it. I don't want to write my own, and using a full-blown engine would be much more trouble than it's worth for my usecase ;)
I found the answer in the OpenGL wiki:
MacOSX gives you a choice: core profile for versions 3.2 or higher, or just version 2.1

ContextAttribs(3, 2, CONTEXT_CORE_PROFILE_BIT_ARB) does not work for me on Mac OSX

Tried making a game using lwjgl, I needed to use GL33 for something, so tried changing ContextAttribs(3,2) to (3,3) but that lead to a lot of errors, cause on osx this will change your open gl version 4.1 to 2.1 (OpenGL version 2.1 INTEL-10.14.66)
the only way stated in the open gl doc is to use ContextAttribs(3, 2, CONTEXT_CORE_PROFILE_BIT_ARB)
but for me ContextAttribs can only take 2 arguments, and ContextAttribs.CONTEXT_CORE_PROFILE_BIT_ARB either doesn't exist, or is not visible.
I am using LWJGL 2.9.1
I tried googling for ages found nothing that helped me.
How I used to do it before I started using instanced rendering:
ContextAttribs attribs = new ContextAttribs(3,2).withForwardCompatible(true).withProfileCore(true);
I have no clue how to do it now, because using (3,3) it will start using open gl 2.1 because of MacOSX stuff, my shader programs all used version 330 but of course because of the 2.1 thingy they all get errors.
I wanted to comment on another post, asking for clarification, but because stack overflow requires you to have some reputation, that was not an option :(

Using SDL with Xcode 4.3

I've decided to learn c++ and try to make a game with SDL framework. The problem is that I don't know how to use SDL together with Xcode 4.3, since I can't use it like a template, as seen in other guides. Would be great if someone could help me get SDL to work with Xcode 4.3.
EDIT:
I try add SDL to Xcode project following http://meandmark.com/blog/2012/01/using-sdl-with-xcode-4/
When I try to compile I get this error:
The following article should help you:
Using SDL with Xcode 4
It took a quite long time until I got SDL and Xcode running. So, don't care. :-)
I uploaded here a simple SDL template for Xcode 4.5 and Mac OS X 10.7 and 10.8 (also using OpenGL 3.2 Core Profile possible). Step by Step instructions:
Download SDL (at the moment version 1.2.15)
Open the downloaded .dmg file
copy the SDL.framework into /Library/Frameworks/
Done. You can use the Xcode template (you should see a red area):
Further details and an image on my Blog (only german, sorry).

How can I call MacPorts' GCC from Xcode? I'm also on an obsolete system

I'm trying to go back into programming after a few years break. I also want to try this C++11 stuff. So I installed GCC 4.6 from MacPorts. However, I still want to use Xcode. I remember that I once tinkered with custom compilers, like creating a custom command line tool in one target and using that tool to create custom documentation in another target. Can we get Xcode, both the compiling and debugging systems, to use the newer stuff from MacPorts? (I would adjust these per project so I can use the default tools on other projects, including Mac apps.) I would use the newer stuff to build command-line tools, like testing Boost.
Oh, by the way, I'm still on my obsolete system (August-2002 eMac with a G4 processor) stuck on Mac OS X 10.4 Tiger. So any answers have to be for Xcode 2.5! (I guess you could provide answers for Xcode 3.x and 4.x to help others, but realize that those will be useless for me.) As a key for the speed, MacPorts took over 2 days straight to build GCC 4.6!
Well, I certainly haven't tested any of this stuff on 10.4 or Xcode 2.5, but I did recently get GCC 4.6 working in Xcode 4.2. In 3.6 and 4.2 there are some compiler template XML files that you can modify once you install a new compiler. In 4.2 they are here:
/Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/
In 3.6 the are in /Developer/Library/Xcode/Plug-ins
I have no idea if they exist in 2.5, but they might. If you want the details on how I did this with a more recent version you can find them here:
http://thecoderslife.blogspot.com/2015/07/building-with-gcc-46-and-xcode-4.html
It might help give you some ideas on where to start with the older version.

Resources