Sha256: 1a2e7a189915653c6d667a62a176394af4121925ef247ff7f6f37a229151d570
Contents?: true
Size: 1.05 KB
Versions: 4
Compression:
Stored size: 1.05 KB
Contents
#ifndef GOSUIMPL_GRAPHICS_COMMON_HPP #define GOSUIMPL_GRAPHICS_COMMON_HPP #include <Gosu/Platform.hpp> #if defined(GOSU_IS_WIN) #include <windows.h> #include <GL/gl.h> #elif defined(GOSU_IS_IPHONE) #include <OpenGLES/ES1/gl.h> #include <OpenGLES/ES1/glext.h> #elif defined(GOSU_IS_MAC) #include <OpenGL/gl.h> #else #include <GL/gl.h> #endif #include <algorithm> #include <vector> namespace Gosu { class Texture; class TexChunk; struct DrawOp; class DrawOpQueue; typedef std::vector<DrawOpQueue> DrawOpQueueStack; class Macro; template<typename T> bool isPToTheLeftOfAB(T xa, T ya, T xb, T yb, T xp, T yp) { return (xb - xa) * (yp - ya) - (xp - xa) * (yb - ya) > 0; } template<typename T> void reorderCoordinatesIfNecessary(T& x1, T& y1, T& x2, T& y2, T& x3, T& y3, T& x4, T& y4) { if (isPToTheLeftOfAB(x1, y1, x2, y2, x3, y3) == isPToTheLeftOfAB(x2, y2, x3, y3, x4, y4)) { std::swap(x3, x4); std::swap(y3, y4); } } } #endif
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gosu-0.7.18 | GosuImpl/Graphics/Common.hpp |
gosu-0.7.17 | GosuImpl/Graphics/Common.hpp |
gosu-0.7.16 | GosuImpl/Graphics/Common.hpp |
gosu-0.7.15 | GosuImpl/Graphics/Common.hpp |