Conforms to NSObject
Declared in NGLCoreMesh.h

Overview

The NGLCoreMesh protocol defines the basic methods for a mesh.

This protocol defines the methods necessary for each OpenGL version dependent part of a mesh. This could represents the changing the whole graphics pipeline.

Tasks

  •   isReady

    Indicates if the core mesh has the minimum necessary to receive a render call. While it’s not ready a render call, on multithreading mode, could lead to conflicts on OpenGL data.

    property required method
  •   loadedData

    The percentage of the uploaded data within the range [0.0, 1.0]. The term “upload” is about the process of submit data to OpenGL, which is called server.

    property required method
  •   parent

    A pointer to the NGLMesh class that holds this core instance.

    property required method
  • – initWithParent:

    Initiates the core mesh instance setting a parent NGLMesh.

    required method
  • – defineBuffers

    Constructs the OpenGL Buffers for the mesh. Must be called before any render.

    required method
  • – clearBuffers

    Clean up all the buffers. Must be called to delete the OpenGL buffers.

    required method
  • – drawCoreMesh

    Draws the current mesh.

    required method

Properties

isReady

Indicates if the core mesh has the minimum necessary to receive a render call. While it’s not ready a render call, on multithreading mode, could lead to conflicts on OpenGL data.

@property (nonatomic, readonly) BOOL isReady

Discussion

Indicates if the core mesh has the minimum necessary to receive a render call. While it’s not ready a render call, on multithreading mode, could lead to conflicts on OpenGL data.

Declared In

NGLCoreMesh.h

loadedData

The percentage of the uploaded data within the range [0.0, 1.0]. The term “upload” is about the process of submit data to OpenGL, which is called server.

@property (nonatomic, readonly) float loadedData

Discussion

The percentage of the uploaded data within the range [0.0, 1.0]. The term “upload” is about the process of submit data to OpenGL, which is called server.

Declared In

NGLCoreMesh.h

parent

A pointer to the NGLMesh class that holds this core instance.

@property (nonatomic, assign) NGLMesh *parent

Discussion

A pointer to the NGLMesh class that holds this core instance.

See Also

Declared In

NGLCoreMesh.h

Instance Methods

clearBuffers

Clean up all the buffers. Must be called to delete the OpenGL buffers.

- (void)clearBuffers

Discussion

Clean up all the buffers. Must be called to delete the OpenGL buffers.

This method erases all the buffers in this mesh and make it empty again.

This method should be called by the NGLCoreMesh owner before release it.

Declared In

NGLCoreMesh.h

defineBuffers

Constructs the OpenGL Buffers for the mesh. Must be called before any render.

- (void)defineBuffers

Discussion

Constructs the OpenGL Buffers for the mesh. Must be called before any render.

This method constructs the bridge between NinevehGL informations and the OpenGL.

This method should be called every time that occurs a change in the object structure.

Declared In

NGLCoreMesh.h

drawCoreMesh

Draws the current mesh.

- (void)drawCoreMesh

Discussion

Draws the current mesh.

This method is the last to be called before the drawing happens inside the core.

Declared In

NGLCoreMesh.h

initWithParent:

Initiates the core mesh instance setting a parent NGLMesh.

- (id)initWithParent:(NGLMesh *)mesh

Parameters

mesh

The NGLMesh instance that holds this core mesh instance.

Return Value

A new initialized instance.

Discussion

Initiates the core mesh instance setting a parent NGLMesh.

This method initializes a core mesh and sets its NGLMesh parent property.

Declared In

NGLCoreMesh.h