Code Monkey home page Code Monkey logo

rjd's People

Contributors

chadbramwell avatar heart-full-of-skye avatar rdunnington avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rjd's Issues

rjd_slotmap overhaul

When I wrote this initially I didn't fully understand how the slotmap worked. The internals need a rework. Can look to zig-slotmap for an example.

rjd_slotmap: slot validation

Currently you can use slot handles allocated from one map with a different map. Think about adding a pointer to the associated slotmap in debug to avoid mixing slotmaps? Could also be a sentinel value if less than 8 bytes is desired.

rjd_gfx: expose texture sampler settings

Right now there's no way to configure sampler settings other than editing the hardcoded ones in both D3D11 and Metal backends. We should expose a way to create a sampler state and bind it to a texture when issuing draw commands.

Rename rjd_profiler to rjd_timer

You could build a profiler using this, but the scope of this lib is to define a platform-independent high resolution timer, not a general-purpose instrumented or sampling profiler.

rjd_array shouldn't require capacity

Some feedback from Chad:

I didn't want to have to specify a capacity for my array upfront. I tried a capacity of 0 and got an assert :( Main reason is that I didn't know what the capacity would be. Second reason is I wasn't sure if capacity implied static size or dynamic size.

rjd_gfx: d3d11 needs depth support

Metal has support for a depth buffer associated with the backbuffer out of the box. But D3D11 and DXGI only have color buffer support.

rjd_gfx: support render-to-texture

The API theoretically supports this but it's untested and probably broken in Metal. The D3D11 backend doesn't support it at all yet. The implementation should be pretty straightforward though.

Introduce RJD_DEBUG macro toggling

Currently everything is written assuming you're building for debug. Logging and extra validation checks are on. There should be a RJD_DEBUG macro and corresponding rjd_debug_on() function to help systems determine if they should remove extra debug checks or not.

rjd_gfx: d3d11 needs MSAA support

Metal supports MSAA out of the box. However, in D3D11 the FLIP_DISCARD mode of presenting doesn't support MSAA. We need to render to an offscreen render target that does support MSAA, then copy the image over to the backbuffer immediately before presenting.

rjd_mem_alloc_array: remove or rename

Some feedback from Chad:

I was confused by the existence of rjd_mem_alloc_array and rjd_array_alloc
I think the confusion is between mem_array and array. Which one should I use when? From reading the code it looks like mem_*_array is an implementation detail of the array functions and so it shouldn't be used explicitly.... But I say that with only a cursory glance at the code.
Hmm... You could go the other route and have the default mem_alloc require nitems and itemsize like calloc.
If a user wants a "block" of generic bytes you could have a mem_alloc_block(numbytes)
I like reserving the array keyword for interactions with the dynamic array

License?

What's the license for the code in this library?

new API: rjd_filewatcher

A platform-independent file watching library. Ideally you pass it a directory to watch, then periodically poll it to see what's changed. Maybe something like

rjd_result rjd_filewatcher_start(struct rjd_filewatcher* watcher, const char* path, struct rjd_filewatcher_options);
void rjd_filewatcher_stop(struct rjd_filewatcher* watcher);
rjd_result rjd_filewatcher_poll(struct rjd_filewatcher* watcher, struct rjd_filewatcher_changes* changes);

rjd_gfx: support mipmaps

Both Metal and D3D11 backends assume when you upload a texture it only has 1 mip. The interface should expose options to upload multiple mips.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.