Bitmap: Make #get_pixel/#set_pixel more accurate
This gets rid of the "batch/flush" semantics for #set_pixel and instead just directly uploads the pixel color to the texture, circumventing the float conversion entirely. Also makes a lot of code simpler in many places as calling 'flush()' is no longer required for bitmaps.
This commit is contained in:
parent
1b0eb2797d
commit
e0a4dfe372
10 changed files with 23 additions and 157 deletions
src
|
@ -81,8 +81,8 @@ public:
|
|||
|
||||
void clear();
|
||||
|
||||
Vec4 getPixel(int x, int y) const;
|
||||
void setPixel(int x, int y, const Vec4 &color);
|
||||
Color getPixel(int x, int y) const;
|
||||
void setPixel(int x, int y, const Color &color);
|
||||
|
||||
void hueChange(int hue);
|
||||
|
||||
|
@ -105,9 +105,6 @@ public:
|
|||
DECL_ATTR(Font, Font*)
|
||||
|
||||
/* <internal> */
|
||||
/* Warning: Flushing might change the current
|
||||
* FBO binding (so don't call it during 'draw()' routines */
|
||||
void flush() const;
|
||||
TEXFBO &getGLTypes();
|
||||
SDL_Surface *megaSurface() const;
|
||||
void ensureNonMega() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue