Fixed issue with images being offset on paint canvas in the GLES2 driver
This commit is contained in:
@@ -310,7 +310,7 @@ bool rc_windowOpenEx(std::string title, int x, int y, int w, int h, uint32_t win
|
||||
|
||||
rc_canvas_obj back_buffer;
|
||||
//std::cout << std::endl << "back start" << std::endl;
|
||||
#ifdef RC_WEB
|
||||
#ifdef RC_DRIVER_GLES2
|
||||
Uint32 size_n = 2;
|
||||
Uint32 dim_max = (w > h ? w : h);
|
||||
while(size_n < dim_max) size_n *= 2;
|
||||
@@ -901,7 +901,7 @@ int rc_canvasOpen(int w, int h, int vx, int vy, int vw, int vh, int mode, int ca
|
||||
canvas.show3D = false;
|
||||
canvas.physics2D.enabled = false;
|
||||
|
||||
#ifdef RC_WEB
|
||||
#ifdef RC_DRIVER_GLES2
|
||||
Uint32 size_n = 2;
|
||||
Uint32 dim_max = (w > h ? w : h);
|
||||
while(size_n < dim_max) size_n *= 2;
|
||||
@@ -932,6 +932,14 @@ int rc_canvasOpen(int w, int h, int vx, int vy, int vw, int vh, int mode, int ca
|
||||
canvas.dimension.Width = w;
|
||||
canvas.dimension.Height = h;
|
||||
|
||||
#ifdef RC_DRIVER_GLES2
|
||||
if(canvas_type==RC_CANVAS_TYPE_2D)
|
||||
{
|
||||
canvas.dimension.Width = size_n;
|
||||
canvas.dimension.Height = size_n;
|
||||
}
|
||||
#endif // RC_DRIVER_GLES2
|
||||
|
||||
canvas.viewport.position.X = vx;
|
||||
canvas.viewport.position.Y = vy;
|
||||
canvas.viewport.dimension.Width = vw;
|
||||
@@ -3563,10 +3571,10 @@ bool rc_update()
|
||||
SceneManager->drawAll();
|
||||
//VideoDriver->draw2DRectangle(irr::video::SColor(255,0,255,0), irr::core::rect<irr::s32>(10,40,100,500));
|
||||
|
||||
vector3df p0(0, 0, 0);
|
||||
vector3df p1(10, 30, 0);
|
||||
vector3df p2(20, -30, 0);
|
||||
vector3df p3(30, 0, 0);
|
||||
//vector3df p0(0, 0, 0);
|
||||
//vector3df p1(10, 30, 0);
|
||||
//vector3df p2(20, -30, 0);
|
||||
//vector3df p3(30, 0, 0);
|
||||
//drawBezierCurve(VideoDriver, p0, p1, p2, p3, irr::video::SColor(255, 0, 255, 0), 100);
|
||||
|
||||
VideoDriver->setRenderTarget(rc_canvas[0].texture);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# depslib dependency file v1.0
|
||||
1733272320 source:/home/n00b/Projects/RCBASIC4/rcbasic_runtime/main.cpp
|
||||
1733590876 source:/home/n00b/Projects/RCBASIC4/rcbasic_runtime/main.cpp
|
||||
"rc_os_defines.h"
|
||||
<emscripten.h>
|
||||
<sys/param.h>
|
||||
@@ -32,10 +32,10 @@
|
||||
<irrtheora.h>
|
||||
"rc_func130_cases.h"
|
||||
|
||||
1733454924 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
|
||||
1733720854 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
|
||||
<TargetConditionals.h>
|
||||
|
||||
1733270962 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_defines.h
|
||||
1733590876 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_defines.h
|
||||
|
||||
1730291453 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_stdlib.h
|
||||
"rc_os_defines.h"
|
||||
@@ -1247,7 +1247,7 @@
|
||||
1727545973 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/RealisticWater.h
|
||||
<irrlicht.h>
|
||||
|
||||
1733454956 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
|
||||
1733726465 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
|
||||
"SDL.h"
|
||||
<SDL2/SDL.h>
|
||||
<irrlicht.h>
|
||||
@@ -1271,7 +1271,7 @@
|
||||
"rc_joints.h"
|
||||
<irrtheora.h>
|
||||
|
||||
1733272044 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx_core.h
|
||||
1733726178 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx_core.h
|
||||
"SDL.h"
|
||||
"btBulletDynamicsCommon.h"
|
||||
"BulletSoftBody/btSoftRigidDynamicsWorld.h"
|
||||
@@ -2190,7 +2190,7 @@
|
||||
|
||||
1686539631 /home/n00b/Projects/irrTheora/theoraplay.h
|
||||
|
||||
1730291453 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx3D.h
|
||||
1733594068 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx3D.h
|
||||
"SDL.h"
|
||||
<btBulletDynamicsCommon.h>
|
||||
<BulletCollision/CollisionDispatch/btGhostObject.h>
|
||||
@@ -2272,7 +2272,7 @@
|
||||
"rc_gfx_core.h"
|
||||
<irrtheora.h>
|
||||
|
||||
1733270962 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_func130_cases.h
|
||||
1733590876 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_func130_cases.h
|
||||
|
||||
1724469097 source:/home/n00b/Projects/irrBullet/src/irrBullet.cpp
|
||||
"irrBullet.h"
|
||||
@@ -2487,7 +2487,7 @@
|
||||
<irrlicht.h>
|
||||
<cmath>
|
||||
|
||||
1733028518 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_spritelib.h
|
||||
1733590876 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_spritelib.h
|
||||
"SDL.h"
|
||||
<SDL2/SDL.h>
|
||||
"rc_sprite2D.h"
|
||||
@@ -2514,7 +2514,7 @@
|
||||
"rc_sprite2D.h"
|
||||
"rc_gfx_core.h"
|
||||
|
||||
1732560585 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_physics3D_base.h
|
||||
1733590876 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_physics3D_base.h
|
||||
"rc_gfx_core.h"
|
||||
|
||||
1731727404 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_base_actor.h
|
||||
|
||||
Reference in New Issue
Block a user