List of commits:
Subject Hash Author Date (UTC)
ko 0a50b2c993faae56bb3a09aa2ad3dbf7954f1445 bowler17 2017-05-09 14:11:56
tr 11c1e0006c1f518d6488614c816fa3c993a355b1 Alexey 2017-03-21 15:14:16
#t push origin --all 11adafa0e28d59de4241ab39c120c973671a3cfc Alexey 2017-03-21 15:07:20
#t push origin --all beab7672d13771e22d5767872dff3f5525d4fa5e Alexey 2017-03-21 14:58:29
# : : bc17c3c618b3209c2c37fe041f8147c120e75e42 Alexey 2017-03-20 15:08:18
# 62a5490137f475545309fe6190beb74c56802050 Alexey 2017-03-20 14:42:04
# 42f703f3251b2d7d96ee022955cdaa405c5293b9 Alexey 2017-03-17 22:47:38
# 5737ad61503ae00f7b2024e550e24faf5aa2efc9 Alexey 2017-03-12 18:56:13
# 9575b3e86695e1585d8063722776c59d0cd12c10 Alexey 2017-03-09 01:08:10
op # 066b109760c5ea0f36a08bf4256426ac6311ea30 Alexey 2017-03-08 14:44:26
h# cf98cf078fa4b35b3228082cba8dad1a2e4e0adb Alexey 2017-03-07 13:00:11
ko# f144472b7c0900692ee11fccda7bc7d3e3b50096 Alexey 2017-03-06 16:55:29
nk 449c7c4a58b96c1f21999ace709d4c3486874fe7 Alexey 2017-03-06 16:38:08
on/off 270d34eac26f7fccc70e7dd492899c535a866511 Alexey 2017-03-06 10:58:34
reel 5bdd2c0dbf3d743b3818d038a054280f37e117f8 Alexey 2017-03-05 21:13:49
c++ t.c --target=arm-linux-gnu `pkg-config --libs --cflags gtk+-3.0 epoxy ` -o op -lOpenImageIO -lopencv_videoio ebaac349ce934d80f1444df53b7bbda3a42a35b6 Alexey 2017-03-05 18:25:42
c++ t.c --target=arm-linux-gnu `pkg-config --libs --cflags gtk+-3.0 epoxy ` -o op -lOpenImageIO -lopencv_videoio 7ddf326fbc3789c95efafe10b0381290ab37632f Alexey 2017-03-05 15:32:41
Commit 0a50b2c993faae56bb3a09aa2ad3dbf7954f1445 - ko
Author: bowler17
Author date (UTC): 2017-05-09 14:11
Committer name: bowler17
Committer date (UTC): 2017-05-09 14:11
Parent(s): 11c1e0006c1f518d6488614c816fa3c993a355b1
Signing key:
Tree: 0245280c50d7a2a9c0778ba8fa9908d939ad2faa
File Lines added Lines deleted
, 0 11
op 0 0
t.c 18 10
File , deleted (index 745943c..0000000)
1
2 # Please enter the commit message for your changes. Lines starting
3 # with '#' will be ignored, and an empty message aborts the commit.
4 # On branch wrench
5 # Your branch is up-to-date with 'origin/wrench'.
6 #
7 # Changes to be committed:
8 # deleted: Untitled.obj
9 # modified: t.c
10 #t push origin --all
11
File op deleted (index f8112f4..0000000)
File t.c changed (mode: 100644) (index 4f84081..5a7889e)
... ... void main()
27 27 { {
28 28
29 29
30 //mat3 m3 = mat3( projection[0].xyz,projection[1].xyz,projection[2].xyz);
31 30 p= projection; p= projection;
32 31 cb=n; cb=n;
33 32 gl_Position = projection*in_position; gl_Position = projection*in_position;
 
... ... knn=in_position;
40 39 const GLchar *frag_src =R"( const GLchar *frag_src =R"(
41 40 #version 330 #version 330
42 41 #extension GL_ARB_explicit_uniform_location : enable #extension GL_ARB_explicit_uniform_location : enable
43 layout(location =11)uniform sampler2D t;
42 layout(location =11)uniform sampler2D t;
43
44 44 float intensity; float intensity;
45 45 in vec2 kn; in vec2 kn;
46 46 in vec4 knn; in vec4 knn;
47 47 in mat4 p; in mat4 p;
48 48 in vec3 cb; in vec3 cb;
49 layout(location =13)uniform mat4 pro;
50 layout(location =14)uniform mat4 tw;
49 51
50 52 void main() void main()
51 53 { {
52 vec3 b=vec3(.5,-.4,-.42);
53 //vec3 tb=vec3(p*b);
54 mat3 tw = transpose(inverse(mat3(p)));
55 vec3 h = normalize(tw*cb);
56 vec3 s = vec3(p * knn );
54 vec3 b=vec3(5.5,-.4,-.42);
55
56 vec4 h = normalize(tw*vec4(cb,0.0));
57 vec3 s = vec3(pro * knn );
57 58 vec3 hk=normalize(b - s); vec3 hk=normalize(b - s);
58 intensity = max(dot(h,b), 0.0);
59 intensity = max(dot(h.xyz,hk), 0.0);
59 60 if(gl_FrontFacing) if(gl_FrontFacing)
60 61 gl_FragColor = vec4( intensity*texture( t, kn).xyz, 1.); gl_FragColor = vec4( intensity*texture( t, kn).xyz, 1.);
61 62 else discard; else discard;
 
... ... else discard;
66 67
67 68 int bba; int bba;
68 69
69 glm::mat4 yt,b;
70 glm::mat4 yt,b,bc,bct;
70 71 ImageSpec c; ImageSpec c;
71 72 GLubyte trr[1024*1024*4]; GLubyte trr[1024*1024*4];
72 73
 
... ... bba=(bbh)/3;
182 183
183 184 b=glm::lookAt(glm::vec3(-1.2484,0.483,1.84384), glm::vec3(-0.3801, -0.4183,-3.15),glm::vec3( 0., 0.2,-00.)); b=glm::lookAt(glm::vec3(-1.2484,0.483,1.84384), glm::vec3(-0.3801, -0.4183,-3.15),glm::vec3( 0., 0.2,-00.));
184 185 yt=glm::perspective(45., 1., 1.2, 300.); yt=glm::perspective(45., 1., 1.2, 300.);
186 bct=b*glm::mat4(1.);
187
185 188 b=yt*b*glm::mat4(1.); b=yt*b*glm::mat4(1.);
186 189
190 bc=glm::transpose(glm::inverse(bct));
191
187 192 //b=glm::lookAt(glm::vec3(0., 0.,-1.),glm::vec3( 0., 0., 0.),glm::vec3( 0.,025.,-1.)); //b=glm::lookAt(glm::vec3(0., 0.,-1.),glm::vec3( 0., 0., 0.),glm::vec3( 0.,025.,-1.));
188 193 //yt=yt*b; //yt=yt*b;
189 194
 
... ... glBufferData(GL_ARRAY_BUFFER, sizeof(float)*bbp, t, GL_STATIC_DRAW);
248 253 glBindVertexArray(0); glBindVertexArray(0);
249 254
250 255 //glGenTextures(1, &vertexT); //glGenTextures(1, &vertexT);
251 //glBindBuffer(GL_ARRAY_BUFFER, vertexT);
252 256 // glActiveTexture(GL_TEXTURE0); // glActiveTexture(GL_TEXTURE0);
253 257 // glBindTexture(GL_TEXTURE_2D, vertexT); // glBindTexture(GL_TEXTURE_2D, vertexT);
254 258
 
... ... static gboolean render(GtkGLArea *area, GdkGLContext *context)
269 273
270 274
271 275 glUseProgram(gl_program); glUseProgram(gl_program);
276
272 277 glUniformMatrix4fv(10, 1, 0, &b[0][0]); glUniformMatrix4fv(10, 1, 0, &b[0][0]);
278 glUniformMatrix4fv(13, 1, 0, &bct[0][0]);
279 glUniformMatrix4fv(14, 1, 0, &bc[0][0]);
280
273 281 glUniform1i(11, 0); glUniform1i(11, 0);
274 282
275 283 glBindVertexArray(gl_vao); glBindVertexArray(gl_vao);
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/bowler17/gl

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/bowler17/gl

Clone this repository using git:
git clone git://git.rocketgit.com/user/bowler17/gl

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main