Sha256: 7ef46827a5fd38d90effde40f1cb71cb7a42afa3f335c5020797ff3166313c98

Contents?: true

Size: 1.04 KB

Versions: 6

Compression:

Stored size: 1.04 KB

Contents

#ifndef GOSUIMPL_GRAPHICS_TEXCHUNK_HPP
#define GOSUIMPL_GRAPHICS_TEXCHUNK_HPP

#include <Gosu/Fwd.hpp>
#include <Gosu/ImageData.hpp>
#include <GosuImpl/Graphics/Common.hpp>
#include <memory>
#include <vector>
#include <stdexcept>
#include <boost/shared_ptr.hpp>

class Gosu::TexChunk : public Gosu::ImageData
{
    Graphics* graphics;
    DrawOpQueueStack* queues;
    boost::shared_ptr<Texture> texture;
    int x, y, w, h, padding;

public:
    TexChunk(Graphics& graphics, DrawOpQueueStack& queues, boost::shared_ptr<Texture> texture,
             int x, int y, int w, int h, int padding);
    ~TexChunk();

    unsigned int width() const;
    unsigned int height() const;
    
    GLuint texName() const;
    void getCoords(double& left, double& top, double& right, double& bottom) const;

    void draw(double x1, double y1, Color c1,
        double x2, double y2, Color c2,
        double x3, double y3, Color c3,
        double x4, double y4, Color c4,
        ZPos z, AlphaMode mode) const;
        
    boost::optional<GLTexInfo> glTexInfo() const;
};

#endif

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gosu-0.7.20 GosuImpl/Graphics/TexChunk.hpp
gosu-0.7.19 GosuImpl/Graphics/TexChunk.hpp
gosu-0.7.18 GosuImpl/Graphics/TexChunk.hpp
gosu-0.7.17 GosuImpl/Graphics/TexChunk.hpp
gosu-0.7.16 GosuImpl/Graphics/TexChunk.hpp
gosu-0.7.15 GosuImpl/Graphics/TexChunk.hpp