64 int resw, resh, resbits;
89 if (usable_width == -1)
90 usable_width = sd.
Width;
91 if (usable_height == -1)
97 screen_x -= ((float)usable_width / resw) / 2;
98 screen_y -= ((float)usable_height / resh) / 2;
106 int surf_w = usable_width;
107 int surf_h = usable_height;
109 piece =
MIN(piece, 256);
114 int mw = (surf_w & (piece - 1)) ? (surf_w / piece)+1 : (surf_w /piece);
115 int mh = (surf_h & (piece - 1)) ? (surf_h / piece)+1 : (surf_h /piece);
119 Resize(mw * mh *2, mw * mh * 4);
160 for (
int lpy = 0, tlpy=0; lpy < mh; lpy++, tlpy += piece) {
161 for (
int lpx = 0, tlpx = 0; lpx < mw; lpx++, tlpx += piece) {
164 int iw =
MIN(piece, usable_width - (tlpx));
165 int ih =
MIN(piece, usable_height - (tlpy));
170 piece_surface->
Copy(0,0,tlpx,tlpy,pot,pot,surface);
179 float tw = (float)iw / (
float)pot;
180 float th = (float)ih / (
float)pot;
183 float vw = (float)iw / (
float)resw;
184 float vh = (float)ih / (
float)resh;
187 float x = screen_x + (((float)tlpx) / (float)resw);
188 float y = screen_y + (((float)tlpy) / (float)resh);
193 Vertex( x + vw, y, 0, tw, 0);
194 Vertex( x, y + vh, 0, 0, th);
195 Vertex( x + vw, y + vh, 0, tw, th);
220 int resw, resh, resbits;
238 float vw = (float) texture->
Get_Width() / (float)resw;
239 float vh = (float) texture->
Get_Height() / (float)resh;
287 Vertex( screen_x, screen_y, 0, 0, 0);
288 Vertex( screen_x + vw, screen_y, 0, 1.0, 0);
289 Vertex( screen_x, screen_y + vh, 0, 0, 1.0);
290 Vertex( screen_x + vw, screen_y + vh, 0, 1.0, 1.0);
virtual RenderObjClass * Clone(void) const
Bitmap2DObjClass(const char *filename, float norm_x, float norm_y, bool center, bool additive, bool colorizable=false, int width=-1, int height=-1, bool ignore_alpha=false)
bool Vertex(float x, float y, float z, float u, float v)
void Resize(int max_polys, int max_verts)
int Set_Shader(const ShaderClass &shader, int pass=0)
int Set_Texture(int idx, int pass=0)
int Set_Vertex_Material(int idx, int pass=0)
void Begin_Tri_Strip(void)
DynamicScreenMeshClass(int max_poly, int max_vert, float aspect=1.0f)
WWINLINE void Release_Ref(void) const
static ShaderClass _PresetAdditive2DShader
static ShaderClass _PresetAlpha2DShader
void Set_Primary_Gradient(PriGradientType x)
static ShaderClass _PresetOpaque2DShader
void Get_Description(SurfaceDescription &surface_desc)
void Copy(unsigned int dstx, unsigned int dsty, unsigned int srcx, unsigned int srcy, unsigned int width, unsigned int height, const SurfaceClass *other)
bool Is_Initialized() const
WW3DFormat Get_Texture_Format() const
SurfaceClass * Get_Surface_Level(unsigned int level=0)
Get surface from mip level.
TextureFilterClass & Get_Filter()
void Set_V_Addr_Mode(TxtAddrMode mode)
void Set_U_Addr_Mode(TxtAddrMode mode)
static void Request_Foreground_Loading(TextureBaseClass *tc)
void Set_Specular(const Vector3 &color)
void Set_Diffuse(const Vector3 &color)
void Set_Ambient(const Vector3 &color)
void Set_Emissive(const Vector3 &color)
virtual TextureClass * Get_Texture(const char *filename, MipCountType mip_level_count=MIP_LEVELS_ALL, WW3DFormat texture_format=WW3D_FORMAT_UNKNOWN, bool allow_compression=true, TextureBaseClass::TexAssetType type=TextureBaseClass::TEX_REGULAR, bool allow_reduction=true)
static WW3DAssetManager * Get_Instance(void)
static void Get_Device_Resolution(int &set_w, int &set_h, int &get_bits, bool &get_windowed)
#define REF_PTR_RELEASE(x)