Jump to content

L B

Members
  • Posts

    967
  • Joined

  • Last visited

Blog Comments posted by L B

  1. I have an idea for exposed constructors function.

    Have the default function be LoadMesh and return a Mesh (null on failure), this being exposed.

    Now, in the C++ API, make a Mesh constructor:

    Mesh::Mesh()
    {
       if (!this = LoadMesh()) throw new LoadingException();
    }
    

     

    Oh wait, can you assign this in a C++ constructor?

  2. So, if we have 10 models to load we will need write try/catch 10 times for each model, right?

    try
    {
       Model* a = new Model("a.gmf");
       Model* b = new Model("b.gmf");
       Model* c = new Model("c.gmf");
       Model* d = new Model("d.gmf");
    }
    catch (LoadingException)
    {
       // Do something.
    }

     

    But as Josh pointed out, constructors and exceptions can not be exposed to other languages, so that design can not be done.

  3. I am 200% for try/catch and the pointer-oriented syntax. For those who are not used with the -> operator, you've been in garbage-collected environments for way too long :)

     

    Actually, if the syntax turns out like what I posted + try/catch/Exceptions, I might even switch to C++ for development.

     

    Introduction to pointers: Link

    Introduction to exceptions: Link

  4. I thought the demonstrated syntax was C, I wonder how you get classes in there Lumooja/Roland.

    Besides, the "object.Load" approach is really bad, as Josh demonstrated.

     

    Also, I also want to precise I would use pointers and not objects, but Josh beat me to that too.

    Lastly, I don't know why you fear constructors, Lumooja. Setting the graphics properties after its creation implies that it exists but is empty, which is strange in my opinion.

     

    Here's my ideal code syntax for C++, not C (I feel Josh's one is perfect for C).

    Graphics* graphics;
    World* world;
    Mesh* box;
    Camera* camera;
    
    graphics = new Graphics(OpenGLGraphicsDriver());
    graphics->Create(1024, 768, 4);
    
    world = new World();
    
    box = new Box(1, 1, 1); // Box : Mesh
    box->GetMaterial()->SetShader(new Shader("Shaders/minimal.shader"));
    box->GetMaterial()->SetColor(new Color(255, 0, 0, 255));
    // Basically Color is a Vector4 represented as bytes
    
    camera = new Camera();
    camera->SetClearColor(new Color(0, 255, 0, 255));
    
    box->SetPosition(0, 0, -2, false);
    
    float yaw = 0.0f;
    
    while (!window->IsClosed())
    {        
       yaw++;
       box->SetRotation(yaw, 0, 0, false);
    
       camera->Render();
       window->Flip();
    }
    

  5. ??So you are actually going to change the command syntax after all this time? Literally invalidating every existing line of code that has been currently written with the current command syntax? So where is the new command syntax going to be kept at? The wiki? So that means every command will have a listing for LE3.0 syntax and LE2.XX syntax?

    Ctrl+H

    Find: "EntityPosition"

    Replace By: "EntitySetPosition"

  6. This isn't the first time I've done multisampling, but until now it hasn't been possible to use with deferred rendering. It's now possible to combine these techniques with OpenGL4. You'll have our awesome lighting combined with high-quality 16x antialiasing for raytracer-like graphics. Oh yeah, multiple layers of transparency, each with proper light and shadows, will also be supported.

     

    Great! I've been dying for that for so long!

    Great post, great mentality, I just can't wait for LE3. L3? IDK. The shortening is cool.

  7. I was going to quote all the sentences accompanied with a +1, but in the end, it's shorter to say:

     

    -Good inheritance design

    -Thanks for the roadmap

    -Great news for the DLL/C#

    -Yay for the streaming terrain.

     

    Therefore, +>9000

     

    I've never seen an infinite streamed world with the density and complexity I want, but Leadwerks seems to do best when we do really aggressive development.
    Percfect. ;)
×
×
  • Create New...