Categories
Development Game Creation

Vector

I am learning about when to use pointers and references in c++ with SFML. I am making a simple scrolling star field using vertices directly and random colors. It works pretty well so far. The main reason I make this is to work with std::vector<> and std::unique_ptr to learn it. Of course I need to […]

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

How to prevent blinking vertices (primitives) while using persistently mapped buffer? [closed]

I am writing a 2d renderer. In a real world example one draw call can handle 600 000 vertices. When buffer is bigger than 600 000, the renderer execute another draw call and so on. Problems occur when there are 2 or more draw calls. There are 2 cases I tested: synchronization per draw call […]

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
C++ Development

Static function can not be accessed or used C++

I am trying to use a static class, but for some reason I am getting a really not helpful error. This is the static class I am trying to access: static class Camera { public: Camera(); ~Camera(); static glm::mat4 viewMatrix; static void move(float x, float y, float z) {// add 3 more values for the […]

Categories
Development

How add object element to vector, list not just privitive type? [on hold]

How a can add my object to vector? In java i use collections like List, ArrayList, LinkedList and i add elements / object it like this: import java.util.ArrayList; import java.util.List; class Test { public void addObjectsToList() { List<GameObject> gameObjects = new ArrayList<GameObject>(); GameObject object = new GameObject(); gameObjects.add(object); } } How i can do this […]

Categories
Development

How to Get an Objects X position in processing

I am trying to make Space Invaders in Processing. I am currently working on getting the enemy to move correctly. I have got them to be drawn in the right spot but I haven’t gotten them to be moved correctly. Here is my code: PImage mainPlayer; PImage enemyPlayer; float Xspeed = 60; float Yspeed = […]

Categories
Development

Extending native JsType

I am extending a native JsType I have declared over the snap svg framework. My subclass TestWidget2 extends native JsType Rect and has extra methods declared such as “move”. I create the instance via the Js utils method Js.uncheckedCast(). When I try to call the method move from my subclass I get the following error. […]

Categories
Development

libgdx: Getting an error about java.lang.UnsatisfiedLinkError

Could you help me resolve my issue? I’m developing a sample game on my mobile using AIDE-IDE using badlogic libgdx. In my project added all necessary updated jars. I’m getting an error as below. java.lang.UnsatisfiedLinkError: No implementation found for int com.badlogic.gdx.backends.android.AndroidGL20.glGenBuffer() At GameWorld.java class initialization (@GameWorld() constructor) i’m getting above error. package com.mycompany.mygame2; import com.badlogic.gdx.*; […]