mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Added 'ValueTypes' Single and Double Added some components in the new System::Net namespace Added the Console class, which can be used to output text to the screen Updated a bunch of structs to include the IComparable and IEquatable interfaces, and inheritance from Object to allow better interoperability between container classes and other types Replaced all exception handling code with a report to stdout.txt - this will, I hope, eventually be reversed, but as of yet, there is no support for exceptions. BEWARE! Even though all libraries correctly compile, you cannot use any class/structure that inherits from a template class, because stupid G++ wants to include exception handling for each template.
62 lines
2.4 KiB
C++
62 lines
2.4 KiB
C++
/********************************************************
|
|
* Texture.h *
|
|
* *
|
|
* XFX Texture definition file *
|
|
* Copyright © XFX Team. All Rights Reserved *
|
|
********************************************************/
|
|
#ifndef _XFX_GRAPHICS_TEXTURE_
|
|
#define _XFX_GRAPHICS_TEXTURE_
|
|
|
|
#include <System/Types.h>
|
|
#include <System/IO/Stream.h>
|
|
#include "GraphicsResource.h"
|
|
|
|
using namespace System;
|
|
using namespace System::IO;
|
|
|
|
namespace XFX
|
|
{
|
|
namespace Graphics
|
|
{
|
|
struct TextureCreationParameters;
|
|
struct TextureInformation;
|
|
|
|
// Represents a texture resource.
|
|
class Texture : public GraphicsResource, virtual Object
|
|
{
|
|
private:
|
|
static ImageFileFormat_t ILimageformat2XNAimageformat(int ILFormat);
|
|
int _levelCount;
|
|
|
|
protected:
|
|
virtual void Dispose(bool disposing);
|
|
|
|
public:
|
|
int LevelCount();
|
|
int LevelOfDetail;
|
|
|
|
Texture();
|
|
~Texture();
|
|
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, Stream* textureStream);
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, char* filename);
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, Stream* textureStream, int numberBytes);
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, Stream* textureStream, TextureCreationParameters creationParameters);
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, char* filename, TextureCreationParameters creationParameters);
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, Stream* textureStream, int numberBytes, TextureCreationParameters creationParameters);
|
|
static Texture* FromFile(GraphicsDevice* graphicsDevice, char* filename, int width, int height, int depth);
|
|
|
|
void GenerateMipMaps(TextureFilter_t filterType);
|
|
static TextureCreationParameters GetCreationParameters(GraphicsDevice* graphicsDevice, Stream* textureStream);
|
|
static TextureCreationParameters GetCreationParameters(GraphicsDevice* graphicsDevice, char* filename);
|
|
static TextureCreationParameters GetCreationParameters(GraphicsDevice* graphicsDevice, Stream* textureStream, int numberBytes);
|
|
static TextureInformation GetTextureInformation(Stream* textureStream);
|
|
static TextureInformation GetTextureInformation(char* filename);
|
|
static TextureInformation GetTextureInformation(Stream* textureStream, int numberBytes);
|
|
void Save(char* filename, ImageFileFormat_t format);
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif //_XFX_GRAPHICS_TEXTURE_
|