Sha256: 47c6f6b3397c6cccb4dfc57794f489e7385205ab80757c901e77608b97634009

Contents?: true

Size: 916 Bytes

Versions: 6

Compression:

Stored size: 916 Bytes

Contents

// -*- c++ -*-
#pragma once
#ifndef __RAYS_TEXTURE_H__
#define __RAYS_TEXTURE_H__


#include <xot/pimpl.h>
#include <rays/defs.h>
#include <rays/color_space.h>
#include <rays/opengl.h>


namespace Rays
{


	class Bitmap;


	class Texture
	{

		public:

			Texture ();

			Texture (
				int width, int height, const ColorSpace& cs = RGBA,
				bool alpha_only = false);

			Texture (const Bitmap& bitmap, bool alpha_only = false);

			~Texture ();

			GLuint id () const;

			int width () const;

			int height () const;

			const ColorSpace& color_space () const;

			bool alpha_only () const;

			float s (float x) const;

			float t (float y) const;

			float s_max () const;

			float t_max () const;

			bool     dirty () const;

			void set_dirty (bool b = true);

			operator bool () const;

			bool operator ! () const;

			struct Data;

			Xot::PImpl<Data, true> self;

	};// Texture


}// Rays


#endif//EOH

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rays-0.1.12 include/rays/texture.h
rays-0.1.11 include/rays/texture.h
rays-0.1.10 include/rays/texture.h
rays-0.1.9 include/rays/texture.h
rays-0.1.8 include/rays/texture.h
rays-0.1.7 include/rays/texture.h