add ship
This commit is contained in:
@@ -23,22 +23,22 @@ Terrain::Terrain(TextureRepository* repo)
|
||||
Vec4(-750.0F, 0.0F, -1400.0F, 1.0F), // Left up
|
||||
Vec4(920.0F, 0.0F, 1520.0F, 1.0F) // Right down
|
||||
) {
|
||||
// ObjLoader loader;
|
||||
ObjLoader loader;
|
||||
|
||||
// ObjLoaderOptions objOptions;
|
||||
// objOptions.flipUVs = true;
|
||||
// objOptions.scale = 100.0F;
|
||||
ObjLoaderOptions objOptions;
|
||||
objOptions.flipUVs = true;
|
||||
objOptions.scale = 100.0F;
|
||||
|
||||
// auto* data = loader.load(
|
||||
// FileUtils::fromCwd("game/models/terrain/terrain.obj"), objOptions);
|
||||
// data->normalsEnabled = false;
|
||||
// mesh = new StaticMesh(*data);
|
||||
// delete data;
|
||||
// repo->addByMesh(mesh, FileUtils::fromCwd("game/models/terrain/"), "png");
|
||||
auto* data = loader.load(
|
||||
FileUtils::fromCwd("game/models/terrain/terrain.obj"), objOptions);
|
||||
data->normalsEnabled = false;
|
||||
mesh = new StaticMesh(*data);
|
||||
delete data;
|
||||
repo->addByMesh(mesh, FileUtils::fromCwd("game/models/terrain/"), "png");
|
||||
|
||||
// allocateOptions();
|
||||
allocateOptions();
|
||||
|
||||
// pair = new RendererStaticPair{mesh, options};
|
||||
pair = new RendererStaticPair{mesh, options};
|
||||
}
|
||||
|
||||
float Terrain::getHeightOffset(const Vec4& playerPosition) {
|
||||
|
||||
Reference in New Issue
Block a user