Fixed transparent model rendering
Former-commit-id: da363be3b19951ae49996fe9d05998420e80911f
This commit is contained in:
@@ -26,6 +26,7 @@ class NAZARA_API NzAbstractViewer
|
||||
|
||||
virtual float GetAspectRatio() const = 0;
|
||||
virtual NzVector3f GetEyePosition() const = 0;
|
||||
virtual NzVector3f GetForward() const = 0;
|
||||
virtual const NzFrustumf& GetFrustum() const = 0;
|
||||
virtual const NzMatrix4f& GetProjectionMatrix() const = 0;
|
||||
virtual const NzRenderTarget* GetTarget() const = 0;
|
||||
|
||||
@@ -29,6 +29,7 @@ class NAZARA_API NzCamera : public NzAbstractViewer, public NzNode, NzRenderTarg
|
||||
|
||||
float GetAspectRatio() const;
|
||||
NzVector3f GetEyePosition() const;
|
||||
NzVector3f GetForward() const;
|
||||
float GetFOV() const;
|
||||
const NzFrustumf& GetFrustum() const;
|
||||
const NzMatrix4f& GetProjectionMatrix() const;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <map>
|
||||
#include <tuple>
|
||||
|
||||
class NzCamera;
|
||||
class NzAbstractViewer;
|
||||
class NzMaterial;
|
||||
class NzSkeletalMesh;
|
||||
class NzStaticMesh;
|
||||
@@ -33,10 +33,11 @@ class NAZARA_API NzForwardRenderQueue : public NzAbstractRenderQueue, NzResource
|
||||
void AddLight(const NzLight* light);
|
||||
void AddModel(const NzModel* model);
|
||||
void AddSprite(const NzSprite* sprite);
|
||||
void AddSubMesh(const NzMaterial* material, const NzSubMesh* subMesh, const NzMatrix4f& transformMatrix);
|
||||
|
||||
void Clear(bool fully);
|
||||
|
||||
void Sort(const NzCamera& camera);
|
||||
void Sort(const NzAbstractViewer* viewer);
|
||||
|
||||
private:
|
||||
bool OnResourceDestroy(const NzResource* resource, int index) override;
|
||||
@@ -56,7 +57,7 @@ class NAZARA_API NzForwardRenderQueue : public NzAbstractRenderQueue, NzResource
|
||||
{
|
||||
NzMatrix4f transformMatrix;
|
||||
NzSpheref boundingSphere;
|
||||
NzMaterial* material;
|
||||
const NzMaterial* material;
|
||||
};
|
||||
|
||||
struct TransparentSkeletalModel : public TransparentModel
|
||||
@@ -66,7 +67,7 @@ class NAZARA_API NzForwardRenderQueue : public NzAbstractRenderQueue, NzResource
|
||||
|
||||
struct TransparentStaticModel : public TransparentModel
|
||||
{
|
||||
NzStaticMesh* mesh;
|
||||
const NzStaticMesh* mesh;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class NAZARA_API NzView : public NzAbstractViewer, public NzNode, NzRenderTarget
|
||||
|
||||
float GetAspectRatio() const;
|
||||
NzVector3f GetEyePosition() const;
|
||||
NzVector3f GetForward() const;
|
||||
const NzFrustumf& GetFrustum() const;
|
||||
const NzMatrix4f& GetProjectionMatrix() const;
|
||||
const NzRenderTarget* GetTarget() const;
|
||||
|
||||
Reference in New Issue
Block a user