Page MenuHome

GLRefactor: Remove all GL types from gawain.
ClosedPublic

Authored by LazyDodo (LazyDodo) on Jun 16 2018, 4:38 AM.

Details

Summary

In preparation for possible alternative back-ends, the dependency on glew.h needs to be confined to as few libraries as possible. This patch removes all gl types from the public gawain headers.

It'll need some more refactoring later on, but for now this will suffice.

Diff Detail

Repository
rB Blender

Event Timeline

Why use uint8_t instead of uchar ? I don't know much about what we prefer. Maybe @Brecht Van Lommel (brecht) knows better.

If we want to follow other Blender then uchar is the more common one, though uint8_t perhaps makes it more clear that we are not dealing with raw bytes and not strings? Either is fine with me.

This revision is now accepted and ready to land.Jun 16 2018, 7:24 PM

I used uint8_t mostly out of habit (i like exactly knowing what i'm getting) . I could make the argument that the C specification has some ambiguity in the char-type (it can be larger than 8 bits, and it has been seen in the wild on some obscure architectures) while uint8_t * is guaranteed to be 8 bits, but i'll be honest, that's not why I chose it, and the crazy architectures that break this rule are so uncommon it really doesn't matter.

if blender uses uchar, i'll happily swap that out.

  • feedback: replace uint8_t with uchar.
This revision was automatically updated to reflect the committed changes.