Giter Site home page Giter Site logo

pbgl's Introduction

pbGL

pbGL is a partial implementation of OpenGL 1.x for the Xbox using NXDK and PBKit. It's partially based on xgu-gl by JayFoxRox.

Status

Currently a subset of GL1.1 with some extensions from later versions is implemented.

To see what exactly is or isn't implemented, look at the GL headers.

Extension list:

  • GL_ARB_multitexture
  • GL_ARB_texture_env_combine

Do note that NPOT textures are not supported and will probably explode.

Usage

Link your project to libpbgl.lib and add the include folder to your include directories. You should then be able to use pbGL like any other GL implementation/loader, barring initialization and buffer swapping. Do keep in mind that you still have to set the display resolution before calling pbgl_init().

// define this to get GL function prototypes 
// or use pbgl_get_proc_address() (not yet implemented)
#define GL_GLEXT_PROTOTYPES
#include <pbgl.h>
#include <GL/gl.h>
#include <GL/glext.h>
...
// argument indicates whether or not to init PBKit as well
pbgl_init(GL_TRUE);
// you're free to use GL functions after this
...
glClearColor(1.f, 0.f, 0.f, 1.f);
glClear(GL_COLOR_BUFFER_BIT);
// don't forget to swap buffers when you're done with the frame
pbgl_swap_buffers();
...
pbgl_shutdown(); // this will also shutdown PBKit

See the samples repository for more in-depth usage examples.

Credits

  • NXDK authors and contributors for NXDK and the libraries included in it
  • mborgerson for xsm64, which taught me a lot about PBKit
  • dracc for XGU
  • JayFoxRox for xgu-gl

pbgl's People

Contributors

fgsfdsfgs avatar melissaautumn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.