Categories
Development

Error says “camera is undefined”, but I did define it

My camera function is not working. The error says that myCamera is undefined, but I did define it. According to the error message, Camera is an unknown override specifier. Here I have included the camera header so this should be fine. level.h: #pragma once #include “Vectors.h” #include “level.h” // Include GLUT, openGL, input. #include “glut.h” […]

Categories
Development

levenshtein ALWAYS infinite loop recursive C

Liechtenstein in c programming always return infinite loop this is my code i try many solution and i try to stock variables and use pointers but always i have the infinite loop i think it’s because the 3 recursive calls but in the doc of Liechtenstein algorithm i found this implementation #include “distance.h” #include “sequence.h” […]

Categories
Development

Translate Assimp 3D Models also rotates

I have a 3D Model in an OpenGL (C++) loaded using Assimp. I need to move this model around the screen (translate) like it is always facing the camera in the X and Y axis (no Z axis). It would be like moving this model like it is 2D only (but of course if I […]

Categories
Development

expected expression error on CUDA on QtCreaotr IDE?

I am trying to learn CUDA and Below are my code files. There is an expected expression error which I am not able to solve. What is wrong here? On a simple hello world example, I get the same error. The error is on the below line. Even when I copy code from github I […]

Categories
Development

compile CU and C files with a CMakeLists file

I am trying to compile a program that contains CUDA files and C (not C++) files using a CMakeLists. My program is composed with some files .c (without CUDA), one file .c (wich calls cuBLAS functions and basic CUDA functions like cudaMalloc and it works) and cuda.cu which contains the following code(I put all the […]

Categories
Development Unity

Unity mesh has black spots

Hello I have followed a video series on YouTube made by Sebastian league on procedural generation and I have followed his whole video series, however on my part there are black spots in the mesh, only on water regions. I’m using global mode for those wondering, also using unity 2019.4.6f1. I want to get rid […]

Categories
Development

Why the vectorAdd sample by cuda always slower than cpu?

I had tried 2 sample code to know the gpu work normally as below 1.vectorAdd by numba import numpy as np from timeit import default_timer as timer from numba import vectorize @vectorize([“float32(float32, float32)”], target=’cuda’) def vectorAdd(a, b): return a + b def main(): N = 320000000 A = np.ones(N, dtype=np.float32 ) B = np.ones(N, dtype=np.float32 […]

Categories
Development

Trouble dereferencing pointer in c

I am a bit of a sports better, and I am finding myself manually computing the decimal odds from the moneyline odds commonly found on many sportsbooks. I am trying to write a program that will at least remove the burden of calculating this over and over again. My program is one that will take […]

Categories
Development

How to stop class from being redefined when using multiple files in Visual Studio

I am using multiple files for class definitions and namespaces. The main.cpp file which contains the main() function requires the use of one of the classes, as does the namespace math in my “math.cpp” file, so they both contain #include “Vect.h”, which has the declaration of the class. However, as the main() also requires use […]