Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » ALLEGRO_PROGRAMMABLE_PIPELINE Question

This thread is locked; no one can reply to it. rss feed Print
ALLEGRO_PROGRAMMABLE_PIPELINE Question
tinyBigGAMES
Member #17,458
February 2020
avatar

So, I'm trying to fully understand this. I finally figure out how to get shaders working under DirectX with the ALLEGRO_PROGRAMMABLE_PIPELINE flag. This is what I'm currently using:

ALLEGRO_DIRECT3D | ALLEGRO_RESIZABLE | ALLEGRO_PROGRAMMABLE_PIPELINE

I can enable compile and use shaders with DirectX. So now I'm working on my next example where I have a white bitmap, and I color then at runtime using a random color. But now, they are all just white. If I remove ALLEGRO_PROGRAMMABLE_PIPELINE, then they color as expected. Now I read in the docs that Allegro drawing routines don't work when ALLEGRO_PROGRAMMABLE_PIPELINE is enabled? What does this mean, I can draw the sprites, fonts, etc., just cannot seem to apply color.

So in this case, how would I go about drawing this white bitmap with different colors at runtime when ALLEGRO_PROGRAMMABLE_PIPELINE is enabled? Do I really have to make a shader just for this? I'm new to shaders, thoughts, ideas? Much appreciated.

Jarrod Davis
Owner/Lead Developer
tinyBigGAMES LLC

check_switch_26
Member #20,652
July 2021

Have you looked at shader_source.inc in the Allegro src directory? [1]

This is the default shader that is used with ALLEGRO_PROGRAMMABLE_PIPELINE enabled.

Also see the notes for al_get_default_shader_source() where it describes the uniforms that are passed to the shader when using ALLEGRO_PROGRAMMABLE_PIPELINE. [2]

I'm not sure where the documentation gave you the impression that drawing routines don't work with ALLEGRO_PROGRAMMABLE_PIPELINE. That is incorrect.

tinyBigGAMES
Member #17,458
February 2020
avatar

Thanks

Jarrod Davis
Owner/Lead Developer
tinyBigGAMES LLC

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: