Changeset 2090
- Timestamp:
- Nov 19, 2012, 1:45:41 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r2085 r2090 106 106 AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm") 107 107 AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread") 108 AC_CHECK_LIB(util, forkpty, UTIL_LIBS="${UTIL_LIBS} -lutil") 108 109 AC_CHECK_LIB(util, forkpty, 110 [UTIL_LIBS="${UTIL_LIBS} -lutil" 111 dnl Override future forkpty detection 112 ac_cv_func_forkpty="yes"]) 113 AC_CHECK_FUNCS(forkpty) 109 114 110 115 dnl Are we on the PS3? … … 357 362 358 363 dnl Can we build neercs? 359 AM_CONDITIONAL(BUILD_NEERCS, test "${ac_cv_my_have_caca}" != "no" -a "${ac_cv_header_glob_h}" = "yes")364 AM_CONDITIONAL(BUILD_NEERCS, test "${ac_cv_my_have_caca}" != "no") 360 365 361 366 -
trunk/tools/neercs/old/attach.c
r1660 r2090 17 17 #endif 18 18 19 #if !defined _WIN32 19 #if !defined _WIN32 && defined HAVE_GLOB_H 20 20 21 21 #include <errno.h> -
trunk/tools/neercs/old/effects.c
r1656 r2090 22 22 #include <string.h> 23 23 #include <time.h> 24 #include <endian.h> 24 25 #include <sys/wait.h> 25 26 #include <sys/types.h> -
trunk/tools/neercs/old/grab.c
r1656 r2090 15 15 #endif 16 16 17 #if !defined _WIN32 17 #if !defined _WIN32 && defined HAVE_GLOB_H 18 18 19 19 #define _XOPEN_SOURCE 500 /* getsid() */ -
trunk/tools/neercs/term/pty.cpp
r2005 r2090 15 15 #endif 16 16 17 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H17 #if defined HAVE_FORKPTY 18 18 # define _XOPEN_SOURCE 19 19 # include <stdlib.h> … … 54 54 Pty::~Pty() 55 55 { 56 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H56 #if defined HAVE_FORKPTY 57 57 delete[] m_unread_data; 58 58 … … 66 66 void Pty::Run(char const *command, ivec2 size) 67 67 { 68 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H68 #if defined HAVE_FORKPTY 69 69 int fd; 70 70 pid_t pid; … … 113 113 size_t Pty::ReadData(char *data, size_t maxlen) 114 114 { 115 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H115 #if defined HAVE_FORKPTY 116 116 /* Do we have data from previous call? */ 117 117 if (m_unread_len) … … 173 173 void Pty::UnreadData(char *data, size_t len) 174 174 { 175 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H175 #if defined HAVE_FORKPTY 176 176 char *new_data; 177 177 … … 194 194 size_t Pty::WriteData(char const *data, size_t len) 195 195 { 196 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H196 #if defined HAVE_FORKPTY 197 197 /* FIXME: can we be more naive than that? */ 198 198 return write((int)m_fd, data, len); … … 204 204 void Pty::SetWindowSize(ivec2 size, int64_t fd /* = -1 */) 205 205 { 206 #if defined HAVE_ PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H206 #if defined HAVE_FORKPTY 207 207 if (m_size == size) 208 208 return; -
trunk/tools/neercs/video/text-render.cpp
r2049 r2090 51 51 m_char = m_shader->GetAttribLocation("in_Char", 52 52 VertexUsage::Color, 1); 53 m_texture = m_shader->GetUniformLocation("in_Texture"); 54 m_transform = m_shader->GetUniformLocation("in_Transform"); 53 m_texture = m_shader->GetUniformLocation("u_Texture"); 54 m_transform = m_shader->GetUniformLocation("u_Transform"); 55 m_pointsize = m_shader->GetUniformLocation("u_PointSize"); 55 56 m_vdecl 56 57 = new VertexDeclaration(VertexStream<vec2>(VertexUsage::Position), … … 129 130 glViewport(0, 0, m_fbo_size.x, m_fbo_size.y); 130 131 glDisable(GL_DEPTH_TEST); 132 #if !defined HAVE_GLES_2X 131 133 glEnable(GL_POINT_SPRITE); 132 134 //glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); 133 135 glDisable(GL_POINT_SMOOTH); 134 glPointSize((float)max(m_font_size.x, m_font_size.y)); 136 #endif 137 glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); 138 glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); 135 139 m_shader->Bind(); 136 140 m_font->Bind(); 137 141 m_shader->SetUniform(m_texture, 0); 138 142 m_shader->SetUniform(m_transform, xform); 143 m_shader->SetUniform(m_pointsize, (float)max(m_font_size.x, m_font_size.y)); 139 144 m_vdecl->SetStream(m_vbo1, m_coord); 140 145 m_vdecl->SetStream(m_vbo2, m_color); … … 145 150 m_font->Unbind(); 146 151 m_shader->Unbind(); 152 #if !defined HAVE_GLES_2X 147 153 glDisable(GL_POINT_SPRITE); 154 #endif 148 155 m_fbo->Unbind(); 149 156 } -
trunk/tools/neercs/video/text-render.h
r1627 r2090 21 21 22 22 TileSet *m_font; 23 23 24 Shader *m_shader; 24 25 ShaderAttrib m_coord, m_color, m_char; 25 ShaderUniform m_texture, m_transform ;26 ShaderUniform m_texture, m_transform, m_pointsize; 26 27 VertexDeclaration *m_vdecl; 27 28 VertexBuffer *m_vbo1, *m_vbo2, *m_vbo3; 29 28 30 FrameBuffer *m_fbo; 29 31 }; -
trunk/tools/neercs/video/text.lolfx
r1976 r2090 16 16 varying vec2 pass_UV; 17 17 18 uniform mat4 in_Transform; 18 uniform float u_PointSize; 19 uniform mat4 u_Transform; 19 20 20 21 void main() … … 57 58 58 59 // This only works with glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); 59 //gl_PointSize = 40;60 gl_PointSize = u_PointSize; 60 61 61 gl_Position = in_Transform * vec4(in_Position, 0.0, 1.0);62 gl_Position = u_Transform * vec4(in_Position, 0.0, 1.0); 62 63 } 63 64 … … 70 71 varying vec2 pass_UV; 71 72 72 uniform sampler2D in_Texture;73 uniform sampler2D u_Texture; 73 74 74 75 void main(void) 75 76 { 76 77 vec2 c = gl_PointCoord * (1.0 / 32.0) + pass_UV; 77 float t = texture2D( in_Texture, c).x;78 float t = texture2D(u_Texture, c).x; 78 79 gl_FragColor = mix(pass_Background, pass_Foreground, t); 79 80 }
Note: See TracChangeset
for help on using the changeset viewer.