Jump to content
Eternal Lands Official Forums
0ctane

gl_init.c/h opengl capabilities suggestion

Recommended Posts

I have a suggested change to the gl_init code, and I am looking for feedback before I start trying to implement anything.

 

Currently, various OpenGL flags are individually stored as integers. For example:

int have_multitexture=0;

I propose that all the OpenGL capabilities be stored in a struct like the following:

typedef struct {
bool have_multitexture;
bool have_arb_compression;
bool have_s3_compression;
bool have_sgis_generate_mipmap;
...
} GLCaps;

As some of you know, I am porting EL to OS X. I have been trying to fix some apparently mac specific opengl issues, and the above idea came from a Mac technical note:glCheck. While there is some Mac specific stuff, most of their struct is generally applicable and would allow for future expandability of OpenGL features in EL. Plus, it might make some of my porting easier. :) Anyhow, their struct also holds other info like window width and depth.

 

Thoughts?

Share this post


Link to post
Share on other sites

I had no idea ANSI C89 supported bool. Beyond that, I can't comment, as I have no idea what would make porting easier.

Edited by crusadingknight

Share this post


Link to post
Share on other sites

I had no idea ANSI C89 supported bool. Beyond that, I can't comment, as I have no idea what would make porting easier.

typedef

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×