|
Post by rosy on Feb 18, 2022 7:05:30 GMT -6
Which version of SDL does RCBasic 3.13 use?
|
|
|
Post by n00b on Feb 18, 2022 14:28:06 GMT -6
I believe 2.0.12.
|
|
|
Post by rosy on Feb 19, 2022 14:38:55 GMT -6
Strange, because it says that for for version >2.0.9 is required Android API>= 26, and I was probably doing 14.
|
|
|
Post by n00b on Feb 20, 2022 19:22:24 GMT -6
The lowest version I have ever officially supported was probably API 18 and that was 3 or 4 years ago atleast.
|
|
|
Post by rosy on Feb 22, 2022 3:11:35 GMT -6
Maybe they mistook the NDK version ... Fucked this Android, and this forcing to new versions ... How did you make these Canvas? There is nothing like this in SDL?
|
|
|
Post by n00b on Feb 22, 2022 20:37:12 GMT -6
RCBasic's canvass are just SDL_Texture objects
|
|
|
Post by rosy on Feb 23, 2022 10:56:49 GMT -6
Are images also textures? How do you set up the ColorKey? Are you removing texture and creating a new from surface?
|
|
|
Post by n00b on Feb 23, 2022 20:19:50 GMT -6
Yes, canvases, images, and videos are SDL_Textures. If you want to learn more I would recommend going through this tutorial: lazyfoo.net/tutorials/SDL/I went through those tutorials when I was first learning SDL2 and I personally feel they are the best tutorials available on SDL2.
|
|
|
Post by rosy on Feb 24, 2022 9:26:14 GMT -6
How will Getpixel do? I did something like this: DstRect(0,0,640,400) SDL_RenderReadPixels(SDLRenderer,&DstRect,0,pixels,640*4); texture=SDL_CreateTexture(SDLRenderer,SDL_PIXELFORMAT_RGBA8888,SDL_TEXTUREACCESS_STREAMING,640,400); SDL_UpdateTexture(texture,NULL,pixels, 640*4); PutImg(texture,0,0) And the wrong colors came out. How is this possible since the pixels have been taken from the screen? After applying SDL_GetWindowPixelFormat (SDLWindow) it is OK ...
I created RGBA8888 texture, drew lines on it, I dumped the screen into "array" and when I create a new RGBA texture and put it in "array", the colors are wrong, it must be RGB ....
|
|
|
Post by n00b on Feb 24, 2022 17:56:16 GMT -6
The colors will often get mixed up if the surface you are reading to does not have the same pixel format as the texture. It gets really annoying with android where you get pixels being returned in the completely wrong order.
|
|
|
Post by rosy on Feb 25, 2022 2:50:10 GMT -6
But I don't use any surfaces. I'm creating a texture for drawing and it must have RGB32, but if I copy it to the board and then throw it back into the texture, it must have RGB24 ...
|
|
|
Post by n00b on Feb 26, 2022 11:27:06 GMT -6
But I don't use any surfaces. I'm creating a texture for drawing and it must have RGB32, but if I copy it to the board and then throw it back into the texture, it must have RGB24 ... After you read the pixels you need to create a surface from those pixels with the same pixel format you read. Then you can create a texture from that.
|
|
|
Post by rosy on Feb 26, 2022 15:04:47 GMT -6
I throw it right into the texture. I just don't understand why the texture I download from and the one I throw into must have a different color format.
|
|
|
Post by n00b on Feb 26, 2022 20:17:20 GMT -6
I throw it right into the texture. I just don't understand why the texture I download from and the one I throw into must have a different color format. I actually don't either but thats one of those quirks about SDL in general. In my getPixel function I read the pixel into an integer and manually convert it to a different color format with bit shifting. I think I tried SDL_MapRGBA() a while back but decided not to go with it but I don't remember why.
|
|