mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-11 06:12:34 -06:00
SurfaceCtrl: reimplementing iml texture
git-svn-id: svn://ultimatepp.org/upp/trunk@14890 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
20702f1a4a
commit
f8eeea5a6b
3 changed files with 76350 additions and 215 deletions
|
|
@ -334,7 +334,7 @@ int Object3D::InsertTexture(const String& filename, int indice)noexcept{ //inser
|
|||
int Object3D::InsertTexture(const Image& m, int indice)noexcept{ //insert texture in object3D
|
||||
return LoadTexture(m,AsString(m.GetSerialId()),indice);
|
||||
}
|
||||
/*
|
||||
|
||||
int Object3D::InsertTexture(const TexturesMaterial& tm, int indice)noexcept{ //Insert one of SurfaceCtrl provided texture
|
||||
Image m;
|
||||
switch(tm){
|
||||
|
|
@ -355,7 +355,7 @@ int Object3D::InsertTexture(const TexturesMaterial& tm, int indice)noexcept{ //I
|
|||
break;
|
||||
}
|
||||
return InsertTexture(m,indice);
|
||||
}*/
|
||||
}
|
||||
Object3D& Object3D::AttachTexture(int numTexture,int MeshNo, int count){//Attach a texture to the range of mes
|
||||
int textNo = numTexture;
|
||||
if(textNo > textures.GetCount()) textNo = 0;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace Upp{
|
||||
enum DrawType { DT_TRIANGLE, DT_QUAD };
|
||||
//enum TexturesMaterial { TM_WATER, TM_STONE, TM_BRICK, TM_METAL, TM_WOOD};
|
||||
enum TexturesMaterial { TM_WATER, TM_STONE, TM_BRICK, TM_METAL, TM_WOOD};
|
||||
/*
|
||||
struct Light{
|
||||
Light(){
|
||||
|
|
@ -122,9 +122,6 @@ class Object3D : public Upp::Moveable<Object3D>{
|
|||
assimp will be used
|
||||
**/
|
||||
Object3D& LoadModel(const String& FileObj, Color color = Gray(), int alpha =255, unsigned int pFlags = 0);
|
||||
|
||||
/*bool LoadObj(const String& FileObj);
|
||||
bool LoadStl(const String& StlFile, Upp::Color = Green());*/
|
||||
Object3D& LoadSurface(Surface& surface, Upp::Color = Green(), int alpha =255);
|
||||
Surface GetSurface();
|
||||
|
||||
|
|
@ -133,7 +130,7 @@ class Object3D : public Upp::Moveable<Object3D>{
|
|||
//object
|
||||
int InsertTexture(const String& filename,int indice = -1)noexcept; //insert texture in object3D
|
||||
int InsertTexture(const Image& m,int indice = -1)noexcept; //insert texture in object3D
|
||||
// int InsertTexture(const TexturesMaterial& tm,int indice = -1)noexcept; //Insert one of SurfaceCtrl provided texture
|
||||
int InsertTexture(const TexturesMaterial& tm,int indice = -1)noexcept; //Insert one of SurfaceCtrl provided texture
|
||||
|
||||
const Texture& GetTexture(int indice){if(indice < textures.GetCount()) return textures[indice];else throw Exc("int indice higher than textures.getCount()");}//Return the indice, Can throw exception
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue