List of commits:
Subject Hash Author Date (UTC)
# 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 62a5490137f475545309fe6190beb74c56802050 - #
Author: Alexey
Author date (UTC): 2017-03-20 14:42
Committer name: Alexey
Committer date (UTC): 2017-03-20 14:42
Parent(s): 42f703f3251b2d7d96ee022955cdaa405c5293b9
Signing key:
Tree: 4a9b10eea9913a727e3ec3083c980f09c44bfc3e
File Lines added Lines deleted
161208ap5410_fpx.jpg 0 0
t.c 40 24
File 161208ap5410_fpx.jpg changed (mode: 100644) (index ae92b44..e82baa5)
File t.c changed (mode: 100644) (index 5c158c6..29ae14a)
... ... const GLchar *vert_src = R"(
15 15 #version 330 #version 330
16 16 #extension GL_ARB_explicit_uniform_location : enable #extension GL_ARB_explicit_uniform_location : enable
17 17 out vec2 kn; out vec2 kn;
18 out vec4 knn;
18 19
19 out vec4 knn;
20 20 layout(location = 1) in vec2 in_p; layout(location = 1) in vec2 in_p;
21 21 layout(location = 0) in vec4 in_position; layout(location = 0) in vec4 in_position;
22 layout(location =10)uniform mat4 projection;
22 layout(location =10)uniform mat4 projection;
23 layout(location =2)in vec3 n;
24 out vec3 cb;
25 out mat4 p;
23 26 void main() void main()
24 {
27 {
28
29
30 //mat3 m3 = mat3( projection[0].xyz,projection[1].xyz,projection[2].xyz);
31 p= projection;
32 cb=n;
25 33 gl_Position = projection*in_position; gl_Position = projection*in_position;
26 knn=in_position ;
27 kn=in_p ;
34 kn=in_p ;
35 knn=in_position;
28 36 // gl_Position = in_position; // gl_Position = in_position;
29 37 } }
30 38 )"; )";
 
... ... const GLchar *frag_src =R"(
33 41 #version 330 #version 330
34 42 #extension GL_ARB_explicit_uniform_location : enable #extension GL_ARB_explicit_uniform_location : enable
35 43 layout(location =11)uniform sampler2D t; layout(location =11)uniform sampler2D t;
36 vec4 b;
37 in vec4 knn;
38 in vec2 kn;
39 void main (void)
40 {
44 float intensity;
45 in vec2 kn;
46 in vec4 knn;
47 in mat4 p;
48 in vec3 cb;
49
50 void main()
51 {
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 );
57 vec3 hk=normalize(b - s);
58 intensity = max(dot(h,b), 0.0);
41 59 if(gl_FrontFacing) if(gl_FrontFacing)
42 gl_FragColor = texture( t, kn);
60 gl_FragColor = vec4( intensity*texture( t, kn).xyz, 1.);
43 61 else discard; else discard;
44 62 } }
45 63 )"; )";
 
... ... while (1);
162 180 bba=(bbh)/3; bba=(bbh)/3;
163 181
164 182
165 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.));
183 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.));
166 184 yt=glm::perspective(45., 1., 1.2, 300.); yt=glm::perspective(45., 1., 1.2, 300.);
167 185 b=yt*b*glm::mat4(1.); b=yt*b*glm::mat4(1.);
168 186
 
... ... c.nchannels=4;
177 195 c.x=0; c.x=0;
178 196 c.y=0; c.y=0;
179 197 c.format=TypeDesc::UINT8; c.format=TypeDesc::UINT8;
180 GLfloat ok[] ={0.4,0.4,0.8};
181 ImageBuf k(c,trr);
182 ImageBuf h("161208ap5410_fpx.jpg");
183 h.read();
198 ImageBuf k(c,trr);;
199 ImageBuf h(" 161208ap5410_fpx.jpg ");
200 ImageBufAlgo::flip(h,h);
184 201 k.copy_pixels(h); k.copy_pixels(h);
185 h.clear ();
186
187
188 //ImageBufAlgo::render_text(k,34,157,"7.5 10.7 15 7",179,"/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf",ok);
189 //ImageBufAlgo::render_text(k,274,757,"9.5 +9.7",179,"/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf",ok);
190 //ImageBufAlgo::render_text(k,34,357,"4.5 7.7",179,"/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf",ok);
191
192
193 202
194 203
195 204 GLuint frag_shader, vert_shader; GLuint frag_shader, vert_shader;
 
... ... glBufferData(GL_ARRAY_BUFFER, sizeof(float)*bbp, t, GL_STATIC_DRAW);
229 238 glEnableVertexAttribArray(1); glEnableVertexAttribArray(1);
230 239 glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, (void*)0); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, (void*)0);
231 240
241 glGenBuffers(1, &tpra);
242 glBindBuffer(GL_ARRAY_BUFFER, tpra);
243 glBufferData(GL_ARRAY_BUFFER, sizeof(float)*bbh, ttk , GL_STATIC_DRAW);
244
245 glEnableVertexAttribArray(2);
246 glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
247
232 248 glBindVertexArray(0); glBindVertexArray(0);
233 249
234 250 //glGenTextures(1, &vertexT); //glGenTextures(1, &vertexT);
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