BitmapApi
BoolBitmapApi
FloatBitmapApi
PolygonApi
MaterialsApi
ShaderApi
LinesApi
PointsApi
MoveApi
PointApi
VectorApi
VolumeApi
FloatVolumeApi
ColorVolumeApi
FontApi
TextureApi
BooleanOpsApi
PolyDistFieldApi
WaveformApi
MainLoopApi
FrameBufferApi
new
new_bm
new_fb
new_bb
bm_png_bm
bm_expr
load
save_png
save_png_arr
save_raw
save_gif_anim
bm_url
bm_fetch
bm_fetch2
bm_gltf
bm_debug
bm_atlas_x
bm_atlas_y
bm_atlas_xy
bm_cubemap
bm_invcubemap
edge_fix
border
add_shape_border
bm_choose_color
sub
alt
compose_x
compose_y
blit
blitFB
blitBB
bm_scale
bm_scale2
bm_fullscreen
interpolate
bm_color
bm_plus
bm_medianfilter
repeat
flip_x
flip_y
rot90
indicator
fractal_mountain
lightmap
noise_vec
gradient
circ_gradient
chessboard
mandelbrot
blur
floodfill
floodfill_color
floodfill_color_inv
gray_to_black
baked_shadow
bm_bumpmap
bm_memoize
bm_world_from_bitmap
bm_persistent_cache
bm_display
bm_vert_display
cbm_empty
cbm_from_bitmap
cbm_to_bitmap
cbm_sample
cbm_rotate
s_spherical
s_bitmap
s_sample
cbm_to_cfb
cfb_c
cfb_x
cfb_y
cfb_add
cfb_mul
cfb_sqrt
cfb_sin
cfb_cos
cfb_tan
cfb_sample
cfb_equalizer
cbb_sample
// FINDING: BitmapApi newbitmap
class ConstantBitmap_Color : public Bitmap<Color>
{
public:
ConstantBitmap_Color(Color c, int x, int y) : c(c), x(x), y(y) { }
void Collect(CollectVisitor &vis) { }
void HeavyPrepare() { }
void Prepare() { }
int SizeX() const { return x; }
int SizeY() const { return y; }
Color Map(int , int ) const
{
return c;
}
private:
Color c;
int x,y;
};
EXPORT GameApi::BM GameApi::BitmapApi::newbitmap(int sx, int sy, unsigned int color)
{
::Bitmap<Color> *b = new ConstantBitmap_Color(Color(color), sx,sy);
BitmapColorHandle *handle = new BitmapColorHandle;
handle->bm = b;
BM bm = add_bitmap(e, handle);
return bm;
}
Warning: copying code from these files should not be done to your own 3d engine. The code has potential to break your engine structure, if you do it, because the design uses tricks that you are not able to understand, even if it looks simple. It really does something very strict constraints on surrounding code, which is enforced by the compiler, low level and the type system. Steam and opengl has marked important pieces as dangerous. And it extends to large area of the code. The problem is completely invisible also/difficult to find the real reason.