Git Product home page Git Product logo

3dgameengine's Introduction

3D Game Engine

thebennybox 3D Game Engine

Tutorial found here: https://www.youtube.com/playlist?list=PLEETnX-uPtBXP_B2yupUKlflXBznWIlL5

##Build Dependencies##

##Simple Build Instructions## ###Using IDE###

  • Open your preferred Java IDE, and create a new project.
  • Import everything under the src folder as source files.
  • Copy the res folder into your Java IDE's folder for your project.
  • Build and run

##Additional Credits##

  • Etay Meiri, for http://ogldev.atspace.co.uk/ which inspired the base code for this repository.
  • Everyone who's created or contributed to issues and pull requests, which make the project better!

3dgameengine's People

Contributors

alan-jak avatar bennyqbd avatar giantdarth avatar leoschae avatar sidzej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3dgameengine's Issues

Weird If statement

Hello Benny.
As in video #31 of Java Game Engine Development Tutorial I add line in the fragment shader inside the for loop over the point lights:
if(pointLights[i].base.intensity > 0)
But instead of FPS growth I get no point light drawn in the scene. After the whole day of experiments I've noticed:

  • if I compare with some negative constant instead of 0 then all lights are back but if statement seems to be ignored
  • if I assign all three attenuation coefficient to non-zero values lights are back as in previous case. If statement is still not working
  • out of range check in calcPointLight function works just fine (if(distanceToPoint > pointLight.range) return vec4(0,0,0,0);), so I tried to do the same but with pointLight.base.intensity - no success. If I set some intensity threshold that only one of the lights can pass I still get no lights or all lights drawn.

I can't believe that if statement is not working and not to have this kind of optimization is also not a case. The same is observed in c++ version (Initial Commit). Any ideas?
And some more questions: don't we need to specify in/out/inout parameters for input parameters of the functions as in http://www.opengl.org/wiki/GLSL_:_common_mistakes
And second one: is there any better than:
if (textureColor != vec4(0, 0, 0, 0))
way to check inside the shader if some texture was bound? Because current one can cause artefacts if texture contains black pixels with alpha value equal zero.
Thanks.

Camera's orientation gets locked into place

I just finished part 20 of this game engine (https://www.youtube.com/watch?v=ShheuoQpJR4) and now I can move the camera but when I rotate it's orientation gets stuck.
I've been following the videos a bit differently (instead of using getters and setters I make most variables public) but apart from being able to use getX(), getY() and getZ() that's not so big of a issue I hope.
Also, I added some minimal debugging so if you press 1 it tells you the camera's position, forward and up vectors.

Video of the issue: https://www.youtube.com/watch?v=Vu5CnmixJEg

F# discrepancy

Fragment shader extension (fs) is used for F# files. D may cause confusion

Your Input class is unneeded.

I was watching your tutorial and noticed that you created the Input class witch is largely unneeded. You can do the same thing it does more efficiently with

while (Keyboard.next()) {
    char key = Keyboard.getEventCharacter();
    boolean state = Keyboard.getEventKeyState(); // If the key is held down (true) or released (false)
   // TODO: Handle key clicks
}

Another thing to look into is using

int NUM_KEYCODES = Keyboard.getKeyCount();

instead of the current constant.

After tutorial 47, the camera has inheritance issues

When the camera is added as a child of testMesh1, the rotation and position are inherited properly.
When the camera is added as a child of testMesh2, the position is inherited, but rotation is not.
What I mean by this is if I rotate testMesh2 to "face" testMesh1, the camera will not start facing testMesh1, but the movement axes are correct. Code:


testMesh1.getTransform().getPosition().set(0, 2, 0);
testMesh1.getTransform().setRotation(new Quaternion(new Vector3f(0, 1, 0), 3.14159f/2));

testMesh2.getTransform().getPosition().set(0, 0, 10);
testMesh2.getTransform().setRotation(new Quaternion(new Vector3f(0, 1, 0), 3.14159f));

testMesh1.addChild(testMesh2);
testMesh2.addChild(camera);
getRootObject().addChild(testMesh1);


In my program, with the above code, the camera will start at position of testMesh2, but the camera is facing 90 degrees to the left, off the plane, instead of pointing at testMesh1. Even weirder, is the fact that moving forward moves camera toward testMesh1, and the other move axes all correspond to this.

In other words, the camera's move axes are correct, but it is not facing the correct direction, reguardless of the angle given to the second test mesh.

cannot convert from 'const 4-component vector of highp float' to 'FragUserData 3-component vector of highp float'

I was following tutorial no.10 and whenever i try to run my code after adding in the parts to load "basicVertex" and "BasicFragment" shaders, I keep getting the error in the title. My code is identical to Benny's.

basicFragment.fs:
#version 330

out vec3 fragColor;

void main()
{
fragColor = vec4(0.0, 1.0, 1.0, 1.0);
}

basicVertex.vs:
#version 330

layout (location = 0) in vec3 position;

void main()
{
gl_Position = vec4(0.25 * position, 1.0);
}

Mesh-Optimisation

As i was playing around with loading diffent .obj's i recognized some issues:

Loading without the normals works fine, but if i load normals and texCoords I get some problems with indexing i guess.
So all faces have their own normals. and you can see the single quads.

If I load with texCoords and without normals I get these edges in the reflections.

Laoding with normals and without texCoord does not even work: the texCoord is between the two "/", but if there is none it tries to parse an empty String.

The first two Issues could be caused by me by exporting the obj not properly.
If someone needs Images i can upload some.

Unneeded re-declaration of lights

Whilst making my own game engine, I realized that GLSL has built-in functions for spot/point lights - it even does some calculations for you, which you can access with derived states. I've been following this tutorial which shows how to implement the Phong reflection model using those functions. I'm not sure how much it may mean for performance, but I don't see a reason why you have to make your own uniforms for those lights.

EDIT: On a side note, GLSL also has structs for materials (which closely mirror the wavefront .mtl file format :3). The only uniforms you'd need to declare on your own are the map samplers.

EDITEDIT: Tonight (in about 8 hours) I'll be committing an example of Phong reflection using those structs and a .mtl loader to my 3D engine repository

Fix Y-axes camera

Hello, Benny! Many thanks for the your tutorials.

How to fix camera rotation on the Y axis? This is artefact, when up or down rotation.

Before rotate
before
After rotate
3d engine 2014-02-02 00-56-53

I think this is Camera.rotateX(float angle) method. I changed
forward = forward.rotate(angle, Haxis).normalized();
to
forward = forward.rotate(angle, new Vector3f(1, 0, 0)).normalized();

but this is only slightly reduced the problem. I would be grateful for help.

finalize method

Just watched episode 52 and saw you using finalize method. There is a rule in java never use finalize because finalize is not guaranteed to be called. Rather use destroy or close ore something like that and handle freeing resources manually.

Texture flipping

Hello, Benny.
Not a serious problem but it's the second time (first time it was in Intro to Modern OpenGL series) I see textures rendered upside down. I guess it's because image loaders use coordinate systems with Y-axis pointing down while OpenGL uses up direction for Y texture coordinates. Do you know some easy and efficient way of flipping the image (more interested in c++ version) before we use it as the texture? I know that it can be easily fixed by reassigning texture coordinates but it would be better to stick to general convention. I can think about the most dummy for-loop over all pixels.
Thanks.

#8 No Triangle Displayed

I'm using Ubuntu. Is there a web site that has what the tutorial software should look like? I can't seem to be able to output the triangle. Which means I didn't insert a step somewhere. I've looked at the previous tutorials but I cannot seem to locate my error. Help

seg fault

Hi,
Though I'd try out your engine, builds fine, but core dumps at or near: Texture.cpp 190
s_resourceMap.insert(std::pair<std::string, TextureData*>(fileName, m_textureData));

./3DEngineCpp
*** Error in `./3DEngineCpp': free(): invalid pointer: 0x000000000272c850 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f5673db67e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7f5673dbee0a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f5673dc298c]
./3DEngineCpp(_ZN7TextureD1Ev+0xb9)[0x45bd61]
./3DEngineCpp(_ZN12MappedValues10SetTextureERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK7Texture+0x6c)[0x45624a]
./3DEngineCpp(_ZN8MaterialC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK7TextureffSA_SA_ff+0x13d)[0x455af1]
./3DEngineCpp(_ZN15RenderingEngineC2ERK6Window+0x317)[0x465649]
./3DEngineCpp(main+0xb3)[0x476794]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f5673d5f830]
./3DEngineCpp(_start+0x29)[0x446879]
======= Memory map: ========
00400000-0049f000 r-xp 00000000 08:07 6160642 /home/xp/Downloads/Game-engine/3DEngineCpp-master/build/3DEngineCpp
0069e000-0069f000 r--p 0009e000 08:07 6160642 /home/xp/Downloads/Game-engine/3DEngineCpp-master/build/3DEngineCpp
0069f000-006a0000 rw-p 0009f000 08:07 6160642 /home/xp/Downloads/Game-engine/3DEngineCpp-master/build/3DEngineCpp
02314000-02a25000 rw-p 00000000 00:00 0 [heap]
7f5654000000-7f5654021000 rw-p 00000000 00:00 0
7f5654021000-7f5658000000 ---p 00000000 00:00 0
7f565c000000-7f565c021000 rw-p 00000000 00:00 0
7f565c021000-7f5660000000 ---p 00000000 00:00 0
7f5663dba000-7f5663f3a000 rw-s 00000000 00:05 74780 /drm mm object (deleted)
7f5663f3a000-7f5663f3b000 ---p 00000000 00:00 0
7f5663f3b000-7f566473b000 rw-p 00000000 00:00 0
7f566473b000-7f566873c000 rw-s 00000000 00:14 5 /dev/shm/pulse-shm-986782865
7f566873c000-7f566c73d000 rw-s 00000000 00:14 8 /dev/shm/pulse-shm-1379244649
7f566c73d000-7f566c767000 r-xp 00000000 08:05 3298435 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f566c767000-7f566c967000 ---p 0002a000 08:05 3298435 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f566c967000-7f566c968000 r--p 0002a000 08:05 3298435 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f566c968000-7f566c969000 rw-p 0002b000 08:05 3298435 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f566c969000-7f566c970000 r-xp 00000000 08:05 3298101 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f566c970000-7f566cb70000 ---p 00007000 08:05 3298101 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f566cb70000-7f566cb71000 r--p 00007000 08:05 3298101 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f566cb71000-7f566cb72000 rw-p 00008000 08:05 3298101 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f566cb72000-7f566cb89000 r-xp 00000000 08:05 1838322 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f566cb89000-7f566cd89000 ---p 00017000 08:05 1838322 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f566cd89000-7f566cd8a000 r--p 00017000 08:05 1838322 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f566cd8a000-7f566cd8b000 rw-p 00018000 08:05 1838322 /lib/x86_64-linux-gnu/libresolv-2.23.so
7f566cd8b000-7f566cd8d000 rw-p 00000000 00:00 0
7f566cd8d000-7f566ce1a000 r-xp 00000000 08:05 3298437 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f566ce1a000-7f566d019000 ---p 0008d000 08:05 3298437 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f566d019000-7f566d035000 r--p 0008c000 08:05 3298437 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f566d035000-7f566d036000 rw-p 000a8000 08:05 3298437 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f566d036000-7f566d0a9000 r-xp 00000000 08:05 3296964 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f566d0a9000-7f566d2a9000 ---p 00073000 08:05 3296964 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f566d2a9000-7f566d2aa000 r--p 00073000 08:05 3296964 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f566d2aa000-7f566d2ab000 rw-p 00074000 08:05 3296964 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f566d2ab000-7f566d2c1000 r-xp 00000000 08:05 1838263 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f566d2c1000-7f566d4c0000 ---p 00016000 08:05 1838263 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f566d4c0000-7f566d4c1000 r--p 00015000 08:05 1838263 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f566d4c1000-7f566d4c2000 rw-p 00016000 08:05 1838263 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f566d4c2000-7f566d4c4000 rw-p 00000000 00:00 0
7f566d4c4000-7f566d4c9000 r-xp 00000000 08:05 3297217 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f566d4c9000-7f566d6c8000 ---p 00005000 08:05 3297217 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f566d6c8000-7f566d6c9000 r--p 00004000 08:05 3297217 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f566d6c9000-7f566d6ca000 rw-p 00005000 08:05 3297217 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f566d6ca000-7f566d72c000 r-xp 00000000 08:05 3298321 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f566d72c000-7f566d92c000 ---p 00062000 08:05 3298321 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f566d92c000-7f566d92e000 r--p 00062000 08:05 3298321 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f566d92e000-7f566d92f000 rw-p 00064000 08:05 3298321 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f566d92f000-7f566d933000 rw-p 00000000 00:00 0
7f566d933000-7f566d93b000 r-xp 00000000 08:05 1838356 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f566d93b000-7f566db3a000 ---p 00008000 08:05 1838356 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f566db3a000-7f566db3b000 r--p 00007000 08:05 1838356 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f566db3b000-7f566db3c000 rw-p 00008000 08:05 1838356 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f566db3c000-7f566db3d000 rw-p 00000000 00:00 0
7f566db3d000-7f566db47000 r-xp 00000000 08:05 1838229 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f566db47000-7f566dd46000 ---p 0000a000 08:05 1838229 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f566dd46000-7f566dd47000 r--p 00009000 08:05 1838229 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f566dd47000-7f566dd48000 rw-p 0000a000 08:05 1838229 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f566dd48000-7f566ddc2000 r-xp 00000000 08:05 3353760 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f566ddc2000-7f566dfc1000 ---p 0007a000 08:05 3353760 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f566dfc1000-7f566dfc2000 r--p 00079000 08:05 3353760 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f566dfc2000-7f566dfc3000 rw-p 0007a000 08:05 3353760 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f566dfc3000-7f566e011000 r-xp 00000000 08:05 3298200 /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f566e011000-7f566e211000 ---p 0004e000 08:05 3298200 /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f566e211000-7f566e212000 r--p 0004e000 08:05 3298200 /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f566e212000-7f566e213000 rw-p 0004f000 08:05 3298200 /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f566e213000-7f566e216000 r-xp 00000000 08:05 3298198 /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f566e216000-7f566e416000 ---p 00003000 08:05 3298198 /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f566e416000-7f566e417000 r--p 00003000 08:05 3298198 /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f566e417000-7f566e418000 rw-p 00004000 08:05 3298198 /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f566e418000-7f566e44f000 r-xp 00000000 08:05 3298389 /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7f566e44f000-7f566e64e000 ---p 00037000 08:05 3298389 /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7f566e64e000-7f566e64f000 r--p 00036000 08:05 3298389 /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7f566e64f000-7f566e650000 rw-p 00037000 08:05 3298389 /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
7f566e650000-7f566e658000 r-xp 00000000 08:05 3298151 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.1
7f566e658000-7f566e858000 ---p 00008000 08:05 3298151 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.1
7f566e858000-7f566e859000 r--p 00008000 08:05 3298151 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.1
7f566e859000-7f566e85a000 rw-p 00009000 08:05 3298151 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.1
7f566e85a000-7f566e865000 r-xp 00000000 08:05 3297442 /usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1.0.1
7f566e865000-7f566ea64000 ---p 0000b000 08:05 3297442 /usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1.0.1
7f566ea64000-7f566ea65000 r--p 0000a000 08:05 3297442 /usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1.0.1
7f566ea65000-7f566ea66000 rw-p 0000b000 08:05 3297442 /usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1.0.1
7f566ea66000-7f566ea6d000 r-xp 00000000 08:05 3297440 /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7f566ea6d000-7f566ec6c000 ---p 00007000 08:05 3297440 /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7f566ec6c000-7f566ec6d000 r--p 00006000 08:05 3297440 /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7f566ec6d000-7f566ec6e000 rw-p 00007000 08:05 3297440 /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
7f566ec6e000-7f566ec8e000 r-xp 00000000 08:05 3297438 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7f566ec8e000-7f566ee8d000 ---p 00020000 08:05 3297438 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7f566ee8d000-7f566ee8e000 r--p 0001f000 08:05 3297438 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7f566ee8e000-7f566ee8f000 rw-p 00020000 08:05 3297438 /usr/lib/x86_64-linux-gnu/libdrm_intel.so.1.0.0
7f566ee8f000-7f566f494000 r-xp 00000000 08:05 3352781 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7f566f494000-7f566f694000 ---p 00605000 08:05 3352781 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7f566f694000-7f566f6ca000 r--p 00605000 08:05 3352781 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7f566f6ca000-7f566f6d1000 rw-p 0063b000 08:05 3352781 /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
7f566f6d1000-7f566f6d9000 rw-p 00000000 00:00 0
7f566f6d9000-7f566f6eb000 r-xp 00000000 08:05 1838214 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f566f6eb000-7f566f8eb000 ---p 00012000 08:05 1838214 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f566f8eb000-7f566f8ec000 r--p 00012000 08:05 1838214 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f566f8ec000-7f566f8ed000 rw-p 00013000 08:05 1838214 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f566f8ed000-7f566f95b000 r-xp 00000000 08:05 1838299 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f566f95b000-7f566fb5b000 ---p 0006e000 08:05 1838299 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f566fb5b000-7f566fb5c000 r--p 0006e000 08:05 1838299 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f566fb5c000-7f566fb5d000 rw-p 0006f000 08:05 1838299 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f566fb5d000-7f566fc35000 r-xp 00000000 08:05 1838210 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f566fc35000-7f566fe34000 ---p 000d8000 08:05 1838210 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f566fe34000-7f566fe35000 r--p 000d7000 08:05 1838210 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f566fe35000-7f566fe3d000 rw-p 000d8000 08:05 1838210 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f566fe3d000-7f566fe3e000 rw-p 00000000 00:00 0
7f566fe3e000-7f566fe5f000 r-xp 00000000 08:05 1838237 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f566fe5f000-7f567005e000 ---p 00021000 08:05 1838237 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f567005e000-7f567005f000 r--p 00020000 08:05 1838237 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f567005f000-7f5670060000 rw-p 00021000 08:05 1838237 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f5670060000-7f567007f000 r-xp 00000000 08:05 1838328 /lib/x86_64-linux-gnu/libselinux.so.1
7f567007f000-7f567027e000 ---p 0001f000 08:05 1838328 /lib/x86_64-linux-gnu/libselinux.so.1
7f567027e000-7f567027f000 r--p 0001e000 08:05 1838328 /lib/x86_64-linux-gnu/libselinux.so.1
7f567027f000-7f5670280000 rw-p 0001f000 08:05 1838328 /lib/x86_64-linux-gnu/libselinux.so.1
7f5670280000-7f5670282000 rw-p 00000000 00:00 0
7f5670282000-7f56702cc000 r-xp 00000000 08:05 1838186 /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f56702cc000-7f56704cc000 ---p 0004a000 08:05 1838186 /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f56704cc000-7f56704cd000 r--p 0004a000 08:05 1838186 /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f56704cd000-7f56704ce000 rw-p 0004b000 08:05 1838186 /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f56704ce000-7f56704dd000 r-xp 00000000 08:05 3297141 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f56704dd000-7f56706dc000 ---p 0000f000 08:05 3297141 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f56706dc000-7f56706dd000 r--p 0000e000 08:05 3297141 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f56706dd000-7f56706de000 rw-p 0000f000 08:05 3297141 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7f56706de000-7f56706df000 ---p 00000000 00:00 0
7f56706df000-7f5670edf000 rw-p 00000000 00:00 0
7f5670edf000-7f5670ee4000 r-xp 00000000 08:05 3297131 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f5670ee4000-7f56710e3000 ---p 00005000 08:05 3297131 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f56710e3000-7f56710e4000 r--p 00004000 08:05 3297131 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f56710e4000-7f56710e5000 rw-p 00005000 08:05 3297131 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f56710e5000-7f56710e7000 r-xp 00000000 08:05 3297120 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f56710e7000-7f56712e7000 ---p 00002000 08:05 3297120 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f56712e7000-7f56712e8000 r--p 00002000 08:05 3297120 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f56712e8000-7f56712e9000 rw-p 00003000 08:05 3297120 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f56712e9000-7f5671302000 r-xp 00000000 08:05 1838361 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f5671302000-7f5671501000 ---p 00019000 08:05 1838361 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f5671501000-7f5671502000 r--p 00018000 08:05 1838361 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f5671502000-7f5671503000 rw-p 00019000 08:05 1838361 /lib/x86_64-linux-gnu/libz.so.1.2.8
7f5671503000-7f567150a000 r-xp 00000000 08:05 1838324 /lib/x86_64-linux-gnu/librt-2.23.so
7f567150a000-7f5671709000 ---p 00007000 08:05 1838324 /lib/x86_64-linux-gnu/librt-2.23.so
7f5671709000-7f567170a000 r--p 00006000 08:05 1838324 /lib/x86_64-linux-gnu/librt-2.23.so
7f567170a000-7f567170b000 rw-p 00007000 08:05 1838324 /lib/x86_64-linux-gnu/librt-2.23.so
7f567170b000-7f567170e000 r-xp 00000000 08:05 1838194 /lib/x86_64-linux-gnu/libdl-2.23.so
7f567170e000-7f567190d000 ---p 00003000 08:05 1838194 /lib/x86_64-linux-gnu/libdl-2.23.so
7f567190d000-7f567190e000 r--p 00002000 08:05 1838194 /lib/x86_64-linux-gnu/libdl-2.23.so
7f567190e000-7f567190f000 rw-p 00003000 08:05 1838194 /lib/x86_64-linux-gnu/libdl-2.23.so
7f567190f000-7f5671927000 r-xp 00000000 08:05 1838316 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5671927000-7f5671b26000 ---p 00018000 08:05 1838316 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5671b26000-7f5671b27000 r--p 00017000 08:05 1838316 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5671b27000-7f5671b28000 rw-p 00018000 08:05 1838316 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5671b28000-7f5671b2c000 rw-p 00000000 00:00 0
7f5671b2c000-7f5671b3a000 r-xp 00000000 08:05 3297434 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7f5671b3a000-7f5671d39000 ---p 0000e000 08:05 3297434 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7f5671d39000-7f5671d3a000 r--p 0000d000 08:05 3297434 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7f5671d3a000-7f5671d3b000 rw-p 0000e000 08:05 3297434 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
7f5671d3b000-7f5671d40000 r-xp 00000000 08:05 3297169 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f5671d40000-7f5671f3f000 ---p 00005000 08:05 3297169 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f5671f3f000-7f5671f40000 r--p 00004000 08:05 3297169 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f5671f40000-7f5671f41000 rw-p 00005000 08:05 3297169 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
7f5671f41000-7f5671f62000 r-xp 00000000 08:05 3298566 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f5671f62000-7f5672161000 ---p 00021000 08:05 3298566 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f5672161000-7f5672162000 r--p 00020000 08:05 3298566 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f5672162000-7f5672163000 rw-p 00021000 08:05 3298566 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f5672163000-7f5672167000 r-xp 00000000 08:05 3298534 /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0.0.0
7f5672167000-7f5672366000 ---p 00004000 08:05 3298534 /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0.0.0
7f5672366000-7f5672367000 r--p 00003000 08:05 3298534 /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0.0.0
7f5672367000-7f5672368000 rw-p 00004000 08:05 3298534 /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0.0.0
7f5672368000-7f567237f000 r-xp 00000000 08:05 3298538 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7f567237f000-7f567257e000 ---p 00017000 08:05 3298538 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7f567257e000-7f5672580000 r--p 00016000 08:05 3298538 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7f5672580000-7f5672581000 rw-p 00018000 08:05 3298538 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
7f5672581000-7f56726b6000 r-xp 00000000 08:05 3297116 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f56726b6000-7f56728b6000 ---p 00135000 08:05 3297116 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f56728b6000-7f56728b7000 r--p 00135000 08:05 3297116 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f56728b7000-7f56728bb000 rw-p 00136000 08:05 3297116 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f56728bb000-7f56728bc000 r-xp 00000000 08:05 3297114 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f56728bc000-7f5672abb000 ---p 00001000 08:05 3297114 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f5672abb000-7f5672abc000 r--p 00000000 08:05 3297114 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f5672abc000-7f5672abd000 rw-p 00001000 08:05 3297114 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7f5672abd000-7f5672ac2000 r-xp 00000000 08:05 3297135 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f5672ac2000-7f5672cc1000 ---p 00005000 08:05 3297135 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f5672cc1000-7f5672cc2000 r--p 00004000 08:05 3297135 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f5672cc2000-7f5672cc3000 rw-p 00005000 08:05 3297135 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f5672cc3000-7f5672cc5000 r-xp 00000000 08:05 3297129 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7f5672cc5000-7f5672ec4000 ---p 00002000 08:05 3297129 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7f5672ec4000-7f5672ec5000 r--p 00001000 08:05 3297129 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7f5672ec5000-7f5672ec6000 rw-p 00002000 08:05 3297129 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
7f5672ec6000-7f5672ed7000 r-xp 00000000 08:05 3297133 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f5672ed7000-7f56730d6000 ---p 00011000 08:05 3297133 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f56730d6000-7f56730d7000 r--p 00010000 08:05 3297133 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f56730d7000-7f56730d8000 rw-p 00011000 08:05 3297133 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f56730d8000-7f5673101000 r-xp 00000000 08:05 3297645 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
7f5673101000-7f5673300000 ---p 00029000 08:05 3297645 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
7f5673300000-7f5673304000 r--p 00028000 08:05 329764
Aborted

Mesh Rendering

On some meshes, on only some triangles, the texture coordinates don't seem to stick. I'm doing the Wolf. 3D Clone now with a "finished" version of the engine. I have replaced all of the rendering code with Benny's and something still isn't right. You'll see a screenshot also detailing my problem. Thanks guys for your help!

EDIT: The door is not the only thing I've had occasional problems with but is an example that I know should work.

EDIT2: Tested it with a mesh exported from blender to the same result.

capture
capture2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.