tomius / lod Goto Github PK
View Code? Open in Web Editor NEWA simple OpenGL 2.1 game engine, written in C++.
License: MIT License
A simple OpenGL 2.1 game engine, written in C++.
License: MIT License
The terrain seems to be loaded as expected, i collide with it( i can for example go up, as if i'm going up a hill).
But the textures are not applied to it, so it seems flat.
The files seem to be loaded correctly as i get no errors on the console, but if I remove the files from the textures folder, i get the correct file not found message from magick++ and the rendered result is the same.
I will keep looking around to see if i can find something more specific :)
I'm trying to run the latest version ( fd17337 ) and i'm getting this error at runtime.
Creating the OpenGL context: 249 ms
The error message:
Vertex and Fragment shader(s) were not successfully compiled before glLinkProgram() was called. Link failed.
Maybe those Shaders are from an older version?
looking around in the oglwrap code i saw this line.
assert(glewInit() == GLEW_OK);
If the build is set on Release mode and NDEBUG is defined then assert will be compiled to a NOOP and glewinit() will not be called.
it should be safer to do:
GLenum err = glewInit();
ASSERT( GLEW_OK == err, "Error: %s\n", glewGetErrorString(err) );
Uhm now that I think about it, I should had reported this on the OGLWRAP page.
I'm getting this error
Initializing the Ayumi: Compile failure in vertexshader 'ayumi_shadow.vert' :
Vertex shader failed to compile with the following errors:
ERROR: 0:8: error(#187) Cannot declare arrays of this qualifier: in 4-component vector of ivec4
ERROR: 0:9: error(#187) Cannot declare arrays of this qualifier: in 4-component vector of vec4
ERROR: 0:18: error(#143) Undeclared identifier: aBoneIDs
ERROR: 0:18: error(#145) Left of "[" is not of type array, matrix, or vector: aBoneIDs
ERROR: 0:18: error(#145) Left of "[" is not of type array, matrix, or vector: expression
ERROR: 0:18: error(#166) Integer expression required: []
ERROR: 0:18: error(#143) Undeclared identifier: aWeights
ERROR: 0:18: error(#145) Left of "[" is not of type array, matrix, or vector: aWeights
ERROR: 0:18: error(#145) Left of "[" is not of type array, matrix, or vector: expression
ERROR: error(#273) 9 compilation errors. No code generated
Now after reading for a while i found the fix.
Section 4.3.4 Inputs (GLSL 1.4) States.
Vertex shader input variables (or attributes) receive per-vertex data.
(...)They cannot be arrays or structures.
So changing the version from #140 to #150 Fixes the issue.
Pach follows
diff --git a/LoD b/LoD
index 8165121..e0ddc44 100755
Binary files a/LoD and b/LoD differ
diff --git a/shaders/ayumi.vert b/shaders/ayumi.vert
index 50b0742..9ce1881 100644
--- a/shaders/ayumi.vert
+++ b/shaders/ayumi.vert
@@ -1,4 +1,4 @@
-#version 140
+#version 150
// External macros
#define BONE_NUM
diff --git a/shaders/ayumi_shadow.vert b/shaders/ayumi_shadow.vert
index b7f72c2..dd2bd56 100644
--- a/shaders/ayumi_shadow.vert
+++ b/shaders/ayumi_shadow.vert
@@ -1,4 +1,4 @@
-#version 140
+#version 150
When I try to run LoD master with oglwrap master, I get the following SIGSEGV:
$ optirun gdb ./LoD
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/kris/urandom/LoD/LoD...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/kris/urandom/LoD/./LoD
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff716c3f4 in ?? () from /usr/lib/libsfml-window.so.2
(gdb) ba
#0 0x00007ffff716c3f4 in ?? () from /usr/lib/libsfml-window.so.2
#1 0x00007ffff716893d in ?? () from /usr/lib/libsfml-window.so.2
#2 0x00007ffff7168e87 in sf::GlResource::GlResource() () from /usr/lib/libsfml-window.so.2
#3 0x00007ffff716aaf3 in sf::Window::Window(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) () from /usr/lib/libsfml-window.so.2
#4 0x00000000004064cb in main ()
Versions of relevant packages and kernel:
$ yaourt -Q sfml
community/sfml 2.1-1
$ yaourt -Q bumblebee
community/bumblebee 3.2.1-3
$ yaourt -Q nvidia-utils
extra/nvidia-utils 325.15-1
$ uname -srvo
Linux 3.11.6-1-ice #1 SMP PREEMPT Tue Oct 22 11:00:59 MSK 2013 GNU/Linux
The same thing also happens when I try to run LoD on the Intel GPU of my laptop, so I believe it is not related to Optimus.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.