Skip to content

Commit

Permalink
stk base class pointer check; QUERY->srate(); remove extra yy.lex.c; …
Browse files Browse the repository at this point in the history
…chugl release notes v0.2.4
  • Loading branch information
gewang committed Nov 20, 2024
1 parent 61fc41e commit 47d733b
Show file tree
Hide file tree
Showing 13 changed files with 226 additions and 2,648 deletions.
31 changes: 31 additions & 0 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ChucK VERSIONS log

1.5.4.2 (November 2024)
=======
new ChuGL v0.2.4 (see ChuGL release notes below)
=======
(updated) --chugin-path:<path> no longer auto-loads chugins found in the
specified paths; instead the specified paths are added to the import
system user paths, and the .chug and .ck files within the specified
Expand Down Expand Up @@ -48,6 +50,35 @@ ChucK VERSIONS log
w.r.t. the calling shred (e.g., shred that is running when these functions
are called)
(added) Shred.pc(), .regSP(), .memSP() -- for debugging, info, amusement
=======
ChuGL 0.2.4 Release Notes

New Features
- Should now support both X11 and Wayland on Linux
- PolygonGeometry: provides (decently) robust/performant triangulation, useful for animating or
drawing deformable 2d shapes
- WireframeMaterial: renders a mesh as a wireframe
- Texture.copy(...): can now copy data between textures
- Texture.read(...): read back texture data from GPU --> CPU

Improvements
- Significantly reduced startup time from loading large OBJ models or building geometry with
many vertices (tangent frame calculation has been moved from the CPU --> GPU)
- Optimized webcam implementation (now consumes less memory and requires fewer memory transfers)

New examples
- deep/ray_triangle_intersection.ck: 3d ray-triangle intersection testing. Thanks Shenran!!
- deep/fish.ck: procedurally animating a fish, showcases PolygonGeometry
- deep/webcam_echo.ck: webcam delay effect via texture copying
- basic/triangulate.ck: polygon triangulation with PolygonGeometry
- basic/texture_read.ck: showcases reading texture data from GPU into chuck

Bug Fixes:
- Crash when using Video textures
- Fix race condition in Webcam destructor
- GText now supports empty strings, and can properly disconnect from the scenegraph
- AssLoader will take model ambient color (Ka) into account
=======


1.5.4.1 (November 2024)
Expand Down
17 changes: 15 additions & 2 deletions src/core/chuck_dl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1447,13 +1447,13 @@ Chuck_DL_Query::Chuck_DL_Query( Chuck_Carrier * carrier, Chuck_DLL * dll )
if( m_carrier != NULL )
{
// get the actual runtime sample rate
srate = m_carrier->vm->srate();
m_srate = m_carrier->vm->srate();
}
else
{
// set to something invalid...
// (instead of default sample rate, which could be harder to notice / debug)
srate = 0;
m_srate = 0;
}
// get DL API reference | 1.5.1.5
m_api = Chuck_DL_Api::instance();
Expand Down Expand Up @@ -1487,6 +1487,19 @@ void Chuck_DL_Query::clear()



//-----------------------------------------------------------------------------
// name: srate()
// desc: get sample rate (to be called by host only; chugins use API->vm->srate)
//-----------------------------------------------------------------------------
t_CKUINT Chuck_DL_Query::srate()
{
return m_srate;
}





//-----------------------------------------------------------------------------
// name: ~Chuck_DL_Class()
// desc: ...
Expand Down
19 changes: 16 additions & 3 deletions src/core/chuck_dl.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ typedef void (CK_DLL_CALL * f_callback_on_shutdown)( void * bindle );
typedef void (CK_DLL_CALL * f_shreds_watcher)( Chuck_VM_Shred * SHRED, t_CKINT CODE, t_CKINT PARAM, Chuck_VM * VM, void * BINDLE );
// type instantiation callback
typedef void (CK_DLL_CALL * f_callback_on_instantiate)( Chuck_Object * OBJECT, Chuck_Type * TYPE, Chuck_VM_Shred * originShred, Chuck_VM * VM );
// sample rate update callback | 1.5.4.2 (ge) added
typedef void (* ck_f_srate_cb)( t_CKUINT srate, void * userData );
}


Expand Down Expand Up @@ -618,6 +620,15 @@ struct Chuck_DL_Query
// un-register shred notifcations
f_unregister_shreds_watcher unregister_shreds_watcher;

public:
// -------------
// register callback to be invoked by chuck host when sample rate changes
// | 1.5.4.2 (ge) added
// -------------
// register sample rate notification
// f_register_srate_change register_srate_change;



//-------------------------------------------------------------------------
// HOST ONLY beyond this point...
Expand All @@ -626,7 +637,7 @@ struct Chuck_DL_Query
//-------------------------------------------------------------------------
// NOTE: everything below std::anything cannot be reliably accessed by
// offset across DLL/shared-library boundaries, since std::anything could
// be variable size;
// be variable size; *** chugins should never access anything below ***
//-------------------------------------------------------------------------
// *** put everything to be accessed from chugins ABOVE this point! ***
//-------------------------------------------------------------------------
Expand Down Expand Up @@ -672,14 +683,16 @@ struct Chuck_DL_Query
Chuck_Carrier * carrier() const;

public:
// get sample rate; to be called by host only; (chugins use API->vm->srate)
t_CKUINT srate();
// flag any error encountered during the query | 1.5.0.5 (ge) added
t_CKBOOL errorEncountered;
// host sample rate
t_CKUINT srate;

protected:
// REFACTOR-2017: carrier ref
Chuck_Carrier * m_carrier;
// host sample rate
t_CKUINT m_srate;
};


Expand Down
Loading

0 comments on commit 47d733b

Please sign in to comment.