Programming/openGL2011. 3. 28. 22:42
freeGLUT가 아닌 이상에는
역시나 GLUT에는 마우스 콜백중 휠관련은 없는건가..

[링크 : http://www.opengl.org/resources/libraries/glut/spec3/node45.html]
    [링크 : http://www.opengl.org/resources/libraries/glut/spec3/node49.html] << 키 입력
    [링크 : http://www.opengl.org/resources/libraries/glut/spec3/node50.html] << 마우스 입력
   [링크 : http://www.opengl.org/resources/libraries/glut/spec3/node54.html] << F1 와 같은 펑션키

glutKeyboardFunc(void (*func)(unsigned char key, int x, int y))
    sets key processing routine
    x and y are mouse coordinates when the key 'key' was pressed
    see glutGetModifiers for state of modifier keys (eg. ctrl,...)

glutSpecialFunc(void (*func)(int key, int x, int y));
 
glutMouseFunc(void (*func)(int button, int state, int x, int y))
    mouse function callback
    button: GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON
    state: GLUT_UP, GLUT_DOWN
    x, y: mouse coordinates 
 
[링크 : http://www.cosc.brocku.ca/Offerings/3P98/course/lectures/OpenGL/glut_ref.html]

----
2011.09.29 추가
휠 관련 freeglut 콜백
glutMouseWheelFunc(void( *callback )( int wheel, int direction, int x, int y ));

[링크 : http://linux.die.net/man/3/glutmousewheelfunc

'Programming > openGL' 카테고리의 다른 글

glFrustum - 절두체  (6) 2011.03.30
openGL tutorial - 태양과 지구 돌리기  (0) 2011.03.29
freeglut  (0) 2011.03.26
openGL - glbegin()  (2) 2011.03.25
openGL - glortho()  (4) 2011.03.25
Posted by 구차니
무언가를 알아가고 공부하면서
자신에 대해 알게되는 유일한 진리

"아.. 내가 정말 아는게 없구나."




세상은 넓고 강적은 많다지만...(응?)
나이 먹어가면서 깨닫는게 아는게 없다라는 사실 한가지로 수렴해 간다는 사실은
참으로 우울하고 비참하게 만들어가는 것 같다.



그래도 이걸 넘어서야 할텐데 어찌될랑가! 
Posted by 구차니
Terminal High Altitude Area Defense (THAAD), formerly Theater High Altitude Area Defense, is a United States Army system to shoot down short, medium, and intermediate ballistic missilesin their terminal phase using a hit-to-kill approach.

[링크 : http://en.wikipedia.org/wiki/Terminal_High_Altitude_Area_Defense]

패트리어트 가 마하 5인데
THAAD는 2.8km/s 라고 기술해 주는 센스 -_-
대충 계산하면 마하 8~9 정도 되는듯 한데 어디서 UFO라도 주운건가!

[링크 : http://en.wikipedia.org/wiki/MIM-104_Patriot
Posted by 구차니
개소리 왈왈2011. 3. 27. 17:15
폐건전지를 충전해서 다시 팔면 되는거였군!
[링크 : http://kin.naver.com/qna/detail.nhn?d1id=11&dirId=110801&docId=65377775]








그럴리가 없잖아 이 그지 깽깽이들아! -_-

아무튼, 간만에 모아놓은 폐건전지 버린다고 동사무소 왕복
그런데.. 폐건전지인데.. 충전지를 버려도 되나?! 
Posted by 구차니
Programming/openGL2011. 3. 26. 22:21

VERSION:
Release 3.7, Novermber 22, 1998. 

glut는 현재 최신버전이 무려! 1998년도 제작이다.
이런 이유로 휠마우스 지원이라던가 실질적인 업그레이드가 안되고 있기 때문에 freeglut 라는게 생겨났다. 

[링크 : http://stackoverflow.com/questions/14378/using-the-mouse-scrollwheel-in-glut
[링크 : http://freeglut.sourceforge.net/]
    [링크 : http://www.transmissionzero.co.uk/software/freeglut-devel/] << win32용 라이브러리

'Programming > openGL' 카테고리의 다른 글

openGL tutorial - 태양과 지구 돌리기  (0) 2011.03.29
openGL callback function - GLUT 키보드 / 마우스 입력  (0) 2011.03.28
openGL - glbegin()  (2) 2011.03.25
openGL - glortho()  (4) 2011.03.25
visual Studio에서 openGL 돌리기  (0) 2011.03.16
Posted by 구차니
Programming/openGL2011. 3. 25. 22:23

The Red Book 중 포함된 파일




GL_POINTS
 


GL_LINES


GL_LINE_STRIP


GL_LINE_LOOP


GL_TRIANGLES


GL_TRIANGLE_STRIP


GL_TRIANGLE_FAN


GL_QUADS


GL_QUAD_STRIP


GL_POLYGON


음.. 점 4개로는 티가 안나네 -_-

[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glEnd.xml]
Posted by 구차니
Programming/openGL2011. 3. 25. 22:06
glortho() 함수는 화면상의 좌표축을 설정하는 함수이다.
#include "windows.h"
#include "GL/gl.h"
#include "GL/glut.h"

void display(void)
{
/*  clear all pixels  */
    glClear (GL_COLOR_BUFFER_BIT);
/*  draw white polygon (rectangle) with corners at
 *  (0.25, 0.25, 0.0) and (0.75, 0.75, 0.0)  
 */
    glColor3f (1.0, 1.0, 1.0);
    glBegin(GL_POLYGON);
        glVertex3f (0.25, 0.25, 0.0);
        glVertex3f (0.75, 0.25, 0.0);
        glVertex3f (0.75, 0.75, 0.0);
        glVertex3f (0.25, 0.75, 0.0);
    glEnd();
/*  don’t wait!  
 *  start processing buffered OpenGL routines 
 */
    glFlush ();
}
void init (void) 
{
/*  select clearing (background) color       */
    glClearColor (0.0, 0.0, 0.0, 0.0);
/*  initialize viewing values  */
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
}
/* 
 *  Declare initial window size, position, and display mode
 *  (single buffer and RGBA).  Open window with "hello"
 *  in its title bar.  Call initialization routines.
 *  Register callback function to display graphics.
 *  Enter main loop and process events.
 */
int main(int argc, char** argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
    glutInitWindowSize (250, 250); 
    glutInitWindowPosition (100, 100);
    glutCreateWindow ("hello");
    init ();
    glutDisplayFunc(display);
    glutMainLoop();
    return 0;   /* ISO C requires main to return int. */
}

glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); 로 설정할 경우의 결과


glOrtho(0.0, 2.0, 0.0, 2.0, -2.0, 2.0); 로 설정할 경우의 결과

대충 정리하자면, 아래 그림과 같다고 할까나~?!


[링크 : http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml]

'Programming > openGL' 카테고리의 다른 글

freeglut  (0) 2011.03.26
openGL - glbegin()  (2) 2011.03.25
visual Studio에서 openGL 돌리기  (0) 2011.03.16
윈도우에서 opengl.dll을 찾을 수 없다고 할 경우  (0) 2011.03.15
GLUT(openGL Utility Toolkit) 다운로드 (윈도우)  (0) 2011.03.15
Posted by 구차니
Programming/언어론2011. 3. 25. 21:40
IEEE 754 floating point 표준에 보면은,
float형은 7자리까지는 그 정밀도를 보장할 수 있고, 그 이후로는 부정확하다고 되어 있다.
그리고, double형은 15자리까지 정밀도를 보장할 수 있다고 한다.

[링크 : http://kimstar.pe.kr/blog/172]
[링크 : http://en.wikipedia.org/wiki/Double_precision_floating-point_format

'Programming > 언어론' 카테고리의 다른 글

dangling if-else  (0) 2014.08.13
함수 포인터 (function pointer)  (0) 2010.09.16
type system  (0) 2010.09.15
calling convention(콜링 컨벤션)  (0) 2010.04.17
Posted by 구차니
Microsoft/Windows2011. 3. 25. 14:40
c:\windows\system32\regsrv32.exe /u dllname.dll


[링크 : http://support.microsoft.com/kb/249873/ko]

win7 64bit일 경우
c:\windows\syswow64\regsrv32.exe /u dllname.dll
[링크 : http://support.microsoft.com/kb/282747/ko]

'Microsoft > Windows' 카테고리의 다른 글

IE8에서 오류날때 해결법  (0) 2011.04.13
Windows7 파일 형식 탭이 얼루 도망간겨?  (0) 2011.04.07
winXP에서 파일공유가 안될경우  (0) 2011.03.22
hiberfil.sys 위치는 못 옮겨!  (0) 2011.03.07
IPv6  (2) 2011.01.21
Posted by 구차니
c언어의 switch - case 문은
switch(val)
{
   case 1:
      break;

   case 2:
   case 3:
     break;

   default:
      break;
}
 
이렇게 구성되는데 반해

visual basic에서는
Select switch val
    case 1
    case 2, 3
    case 4 To 5
    case else
End Select
 
이렇게 구성된다.

[링크 : http://msdn.microsoft.com/ko-kr/library/cy37t14y.aspx]
[링크 : http://msdn.microsoft.com/en-us/library/cy37t14y(v=vs.80).aspx
Posted by 구차니