Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - corcordp

Pages: [1]
1
I went into android studios SDK settings and checked the boxes to install NDK. Now I run the command build-sfml.bat D:\android ndk directory and I get the resulting three CMD prompts. Left is the one I started with, right two pop up after execution.

https://imgur.com/a/nPHO4V6

2
General / Building SFML on android: "relative paths cannot be used"
« on: May 22, 2019, 02:55:34 am »
Hi guys

I'm trying to set up an android studio SFML project. (I am on windows 10 using android studio 3.4.1 and Cmake 3.14.4)

I started by following this guide https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

Before running the .bat files I made sure to download Cmake and Git, and the directories to both are included in my user environment variable settings (PATH) https://imgur.com/a/RDQ6fvb

in an admin-level console I scoped into the directory with the SFML android batch files, and ran

D:\Build-SFML-For-Android-On-Windows-master\Build-SFML-For-Android-On-Windows-master>download-ndk-and-build-sfml.bat D:\android_studio

I got the result

Relative paths cannot be used


I don't have the NDK installed yet... what am I missing?

Thanks for the help

DPC


3
General / Re: Best way to output parallelized data to the window?
« on: March 29, 2019, 08:17:31 pm »
I realized that when I allocated memory on the GPU for the uint8 array, I actually needed it to be 4*number of pixels... Now the image flashes for a brief second. Still some issues with the window scaling and the colors, but the lack of allocated memory was definitely the cause of this first issue.

4
General / Best way to output parallelized data to the window?
« on: March 29, 2019, 07:54:03 pm »
--EDIT: Revised code--
(click to show/hide)



Hi guys, first time posting here...
I've been working on a mandelbrot plotting application. It works with CUDA, where each evaluated point on the complex plane is assigned an individual thread. The thread runs the mandelbrot iteration on it's assigned point.
The thread stops iterating when the iteration diverges, and a color (alpha channel format) value is assigned to the point.
These alpha values are stored in a uint8 array of size (x_resolution * y_resolution * 4).  Previously, I have used a rectangleShape and had the CPU manually plot each point, changing the fillcolor of the shape based on the data. This was very slow.
Some other people have shown that an array of uint8 can be turned into an sf::image by referring the array in the images constructor, but when I tried that I just got an error.

Here is the code for the version I am trying to get to work...

(click to show/hide)

When I compile this my IDE breaks
"Unhandled exception at 0x00007FFC5038122E (vcruntime140.dll) in debugBuild.exe: 0xC0000006: In page error reading location 0x0000000704800000 (status code 0xC0000022)."

Visual studio shows the break as occuring when I try to construct the image, on the line image.create(displayX, displayY, pixels);

displayX is the horizontal resolution. displayY is the vertical resolution. pixels is the uint8 array of alpha channels






here is the code for a version that does work (but draws to the renderwindow)
(click to show/hide)


I'm relatively new to c++ and SFML, are there any unrelated things could I be doing differently? I plan to consolidate the loose variables soon (hopefully within the settings class).

Thanks for the help,
Dan

Pages: [1]