Git Product home page Git Product logo

gfx.mod's Introduction

bmx-ng

The Open Source BlitzMax Compiler Project.

gfx.mod's People

Contributors

woollybah avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

gfx.mod's Issues

Add default Max2D shaders

Once shader support is implemented, we should probably have a set of basic Max2D friendly shaders integrated.
These would allow us to do the basic rendering that the Max2D API requires.

Add bgfx Texture support

bgfx requires textures to be of a certain format : DDS, KTX or PVR texture data.

We don't currently have a direct way to take (say) a .png and load it as a bgfx texture instance.

There is a command-line texture compiler available with bgfx. This may be all that's required, and assume that the developer will convert their images into a compatible format - which could then be loaded by the app at runtime (incbin/stream/etc).

Or we port/wrap the texture compiler so that it can be used inline.

Implement Linux backend

The initial commit of bgfxgraphics only supports Win32.
We will need to implement support for Linux.

Renderer Selection

Some platforms support different renderers : Win32 -> GL, Dx9, Dx11 : macOS -> GL, metal...

It would be nice if there was an easy way we could select the renderer, for example via the Graphics statement...

Unfortunately, adding them as bit-wise "flags" would be an issue as there aren't many free bits left, so we'd either need add a new argument or allow it to be set another way, eg. via a SetBGFXRenderer(BGFX_RENDERER_TYPE_VULKAN)

Note that the renderer can only be set once.

Add bgfx Shader support

bgfx shaders are based on the glsl standard, with a few tweaks to make it easier to compile them into shaders for all the supported platforms.
This means you can effectively write one shader to work with GL, metal and direct x.

bgfx comes with a command-line shader compiler which generates the required shaders for a given platform, which you then include in your app. This may be all that's required, and assume that the developer will compile their shaders and just include them, precompiled, with their app.

Or we port/wrap the shader compiler so that it can be used inline.

Wrapper available somewhere?

Hi

Just want to ask whether you plan to upload the wrapper somewhen.

I thought of having seen it already, but am not able to find it. So this is why I ask.

Implement macOS backend

The initial commit of bgfxgraphics only supports Win32.
We will need to implement support for macOS.

Implement Max2D API using bgfx

After the initial commit, the gfx.bgfxmax2d module is basically the bare minimum to get a window and render loop up and running.

The drawing APIs are stubs.
There's no support for textures.
There's no support for shaders.

There's are the main bits that require implementing for basic Max2D.

Solve Windows renderer issue.

Currently, on my laptop at least, anything other than the direct3d9 renderer fails to correctly establish the context on the given window.
It looks like it may be related to hidpi.

The "basic" example, appears to start okay, but moving the window shows that the actual graphics are rendering at a much higher dpi in the top left corner of the screen - moving the window to the top left and the rendered text appears in the window.

Since one render target appears to be working, we can carry on using this until the issue is resolved.
A basic Linux OpenGL test worked as expected.

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.