docs(gal-test): Add README and document DrawBitmap limitation

- Add comprehensive README documenting all 28 GAL test scenarios
- Document known limitation: DrawBitmap uses legacy OpenGL immediate
  mode (glBegin/glEnd) incompatible with shader-based test harness
- Add shader accessor for DrawBitmap workaround attempt
- Clean up debug code from bitmap scenario

The DrawBitmap limitation is acceptable because:
- It's primarily used for reference images in schematics
- WebGL port will need its own bitmap rendering implementation
- All other 69 GAL methods are fully tested

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-01-07 13:37:08 +01:00
commit 344cf3c432
4 changed files with 215 additions and 17 deletions

View file

@ -15,6 +15,7 @@
namespace KIGFX {
class OPENGL_GAL;
class OPENGL_COMPOSITOR;
class SHADER;
}
// Test accessor functions - implemented in gal_test_accessor.cpp
@ -26,4 +27,13 @@ unsigned int GetMainBufferHandle(KIGFX::OPENGL_GAL* gal);
// Read pixels directly from the compositor's FBO
bool ReadCompositorFBOPixels(KIGFX::OPENGL_GAL* gal, std::vector<uint8_t>& pixels, int* width, int* height);
// Get the shader pointer for deactivating before fixed-function rendering (DrawBitmap)
KIGFX::SHADER* GetGALShader(KIGFX::OPENGL_GAL* gal);
// Deactivate shader to allow fixed-function pipeline (glBegin/glEnd) rendering
void DeactivateGALShader(KIGFX::OPENGL_GAL* gal);
// Reactivate shader after fixed-function rendering
void ActivateGALShader(KIGFX::OPENGL_GAL* gal);
#endif // GAL_TEST_ACCESSOR_H