Demo: Green Dragon

Articles with the tag: GLFW

Input: mouse pointer control

Alright, let's get XY coordinates via the mouse to control the end of the curve using GLFW.

A possible angle for the final animated/simulated dragon head and neck:

The end bone and therefore the face is aligned with the rest of the neck, however. The head should be made to point more directly at the cursor, as well as the eyes.

[13/05/14 15:40]

Putting mouse coords in Input handler class, but these should be normalised for the IK solver animation so they can be converted easily into world coordinates. How will the IK node be aware of screen coordinates? Such coordinates will be useful for picking (the process of allowing the mouse access to objects in a scene by casting a "ray" from its screen position), so a general access point should be sought.

Collision detection nodes

Add BoundingNode which (model) nodes can inherit from ...

Read More »

Input struct referencing and dereferencing woes

OK, struct pointers require weird casting and dereferencing to get at the data. Is it more overhead than using a class with get and set methods, though? Must make separate test file for these things.

[02/02/14 01:52]

Maybe use an array intead of a struct, since they are all ints... Depends on whether homogenous structs are slower than arrays...

[02/02/14 02:37]

Hang on - the struct doesn't need to be a pointer, only its members.

[02/02/14 16:41]

The GLFW poller function is only called on key action, so it wouldn't be too bad to have it copy a few values to a struct. This must be done for objects to handle themselves, as the callback function's values are fleeting.

It's a lot of memory copying, yes, but then the positions of objects will constantly be changing too so ...

Read More »


Using GLFW instead of FreeGLUT.

[30/01/14 11:15]

Disabled dynamic window resizing for efficiency. Games only bother changing the viewport size when the player specifies it. A call to 'set_viewport_size()' can be made based on a resize event or key press.

Note: what's a callback?

[30/01/14 13:42]

A callback seems to be a function pointer that gets called when an event happens.

[30/01/14 20:01]

Not quite there on the ResMan (Resource Manager) front yet, but a way to handle shaders and programs is needed.

Naively, perhaps: a BaseMaterial class - containing 'colour' and 'fragment shader'.

Scene elements could be passed reference to the same material so their colour + attribs can be synchronised easily.

Material inits its own Program containing frag shader and vertex shader.

GLuint _program;

Read More »

Page 1 / 1