Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5964921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:31:12+00:00 2026-05-22T19:31:12+00:00

I inherited an old code base using OpenGL inside X11. The header includes is

  • 0

I inherited an old code base using OpenGL inside X11.
The header includes is like this

#include <stdio.h> 
#include <stdlib.h> 
#include <sys/types.h> 
#include <sys/stat.h> 
#include <X11/Intrinsic.h>
#include <GL/glx.h>
#include <GL/gl.h>
#include <X11/cursorfont.h>

I want to port this to Snow Leopard, my basic problem so far is that I can’t get the proper headers or maybe I should say I cant get xcode to bind against the correct headers.
I need to use things like

GLXDrawable drawable; 
XVisualInfo *ptr;
GLXContext MainContext;
XSetWindowAttributes wa;

I tried to install X11 dev (I tried http://xquartz.macosforge.org/trac/wiki , I tried using fink to install x11 opengl dev libs and …). Obviously I am not a C programmer (I have rather good experience in Objective c and iOS development though).
Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:31:14+00:00Added an answer on May 22, 2026 at 7:31 pm

    The X11 server for MacOS X is rather limited and in my experience it has rather poor OpenGL support. So instead of trying to fit a square pig into a round hole I’d just use MacOS X native OpenGL API. The probably most easy way to get your thing portable is replace all that windowing specific stuff with GLFW, a neat OpenGL specific wrapper around X11/GLX, Win32 and MacOS X, that cares about OpenGL context creation and user input. BTW, user input: You’ll have to adjust that one, too.

    Don’t get me wrong, I really like X11/GLX. And if I had not made those bad experiences with MacOS X’s (Leopard) X11 server support for OpenGL, I’d gladly give advice how to tackle it. But I think in the end you’ll keep your sanity if you just replace that X11 code with GLFW.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I inherited this old TurboBasic code base, and I am converting it to something
I have a page, Default.aspx, with its own code-behind file like this: using System;
I've inherited a hoary old piece of code (by hoary, I mean warty with
I have inherited an old crusty PHP application , and I'd like to refactor
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
I inherited the following code (and data stored using it, i.e. serialized instances of
I have inherited some really old VC6.0 code that I am upgrading to VS2008
I have inherited some old code and need to convert to the latest schema
I have an inherited code base that was developed in .NET 1.1. When I
In my code I have a query that looks like this: $load_query = LOAD

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.