GetAddress

This function gets the memory address of an object.

Syntax

Returns

Returns the memory address of the specified object as a hexidecimal string.

Example

#include "Leadwerks.h"

using namespace Leadwerks;

Model* model = NULL;

int main(int argc, const char *argv[])
{
Leadwerks::Window* window = Leadwerks::Window::Create();
Context* context = Context::Create(window);
World* world = World::Create();
Camera* camera = Camera::Create();
DirectionalLight::Create()->SetRotation(35,45,0);

//Create a model
model = Model::Box();
model->SetPosition(0,0,3);

while (true)
{
if (window->Closed() || window->KeyDown(Key::Escape)) return false;

Leadwerks::Time::Update();
world->Update();
world->Render();

//Display the object address
Draw::SetBlendMode(Blend::Alpha);
Draw::Text(Object::GetAddress(model),2,2);
Draw::SetBlendMode(Blend::Solid);

context->Sync();
}
return 0;
}