<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="html">김형준 GIS 연구소 (for Developers): OpenGL-Tutorial-Texture-Mapping에 달린 최근 댓글/트랙백 목록</title>
  <id>http://www.gisdeveloper.co.kr/</id>
  <link rel="alternate" type="text/html" hreflang="ko" href="http://www.gisdeveloper.co.kr/" />
  <subtitle type="html"></subtitle>
  <updated>2012-02-08T09:57:12+09:00</updated>
  <generator>Textcube 1.7.7 : Con moto</generator>
  <entry>
    <title type="html">이영호님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7575" />
    <author>
      <name>(이영호)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7575</id>
    <published>2009-02-11T22:44:59+09:00</published>
    <summary type="html">잘 보고 있습니다. 마지막에 여인네가 제 맘을 싱그럽게 만들어주네요~ ㅎㅎㅎㅎ</summary>
  </entry>
  <entry>
    <title type="html">학생님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7729" />
    <author>
      <name>(학생)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7729</id>
    <published>2009-05-09T02:05:24+09:00</published>
    <summary type="html">밤샘 과제때문에 열심히 자료를 찾고있었는데... 도움이 되네요 ^-^ 감사합니다 ~</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7730" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7730</id>
    <published>2009-05-10T10:22:50+09:00</published>
    <summary type="html">네~ ^^ 도움이 되셨다니 저도 좋습니다~ 댓글 감사드리구요~</summary>
  </entry>
  <entry>
    <title type="html">mr스네이크님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7788" />
    <author>
      <name>(mr스네이크)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7788</id>
    <published>2009-06-12T21:20:18+09:00</published>
    <summary type="html">자세한 설명 정말 감동이네요 ㅠ</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7791" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7791</id>
    <published>2009-06-14T22:51:13+09:00</published>
    <summary type="html">mr스네이크님, 감사합니다~ ^^</summary>
  </entry>
  <entry>
    <title type="html">배움이님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7792" />
    <author>
      <name>(배움이)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7792</id>
    <published>2009-06-15T23:14:02+09:00</published>
    <summary type="html">정말 많은걸 배우고 갑니다. 덕분에 살았습니다. 그런데 개념이 너무 안잡히는게 있어서 메일 한통 보냈는데...도움 좀 부탁드립니다.ㅠㅠ</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7793" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7793</id>
    <published>2009-06-16T11:42:14+09:00</published>
    <summary type="html">배움이님, 도움 되셨다니 저도 좋습니다. 감사합니다..</summary>
  </entry>
  <entry>
    <title type="html">ABC님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7827" />
    <author>
      <name>(ABC)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7827</id>
    <published>2009-07-03T13:01:24+09:00</published>
    <summary type="html">안녕하세요.
관련 자료를 검색하다 방문하게되었습니다.
질문하나만 드릴께요.
위와 같이 정육면체에 텍스처를 입힌 후 회전(rotate)를 할 경우 
각 면의 대각선 방향으로 늘어짐 현상이 발생하는 것으로 알고있습니다.
이문제를 해결하기 위한 방법이 있을까요??
고맙습니다.</summary>
  </entry>
  <entry>
    <title type="html">ABC님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7828" />
    <author>
      <name>(ABC)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7828</id>
    <published>2009-07-03T15:24:05+09:00</published>
    <summary type="html">저는 Opengl ES 를 사용하여 구현중이며,
텍스처 맵핑은 
glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
를 사용하였습니다.</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7829" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7829</id>
    <published>2009-07-04T18:59:56+09:00</published>
    <summary type="html">ABC님, 텍스쳐의 필터링 문제가 아닐까 조심스레 생각이 되는데요. 기본값이 GL_NEAREST인데... 이를 선형 방식(GL_LINEAR)로 변경해 보시길 권해 드립니다. OpenGL에서는 glTexParameteri 함수를 이용해 지정할 수 있습니다. 그리고 혹시 OpenGL ES에서는 삼각형 스트립 원시타입만을 지원하게 되는데, 이때 사각형을 만들기 위해 인접한 두 삼각형의 경계에서 깨진 발생할 수도 있겠다는 추측이 듭니다. 이때 경계부분에 대한 wrapping 방식을 다르게 지정해 보시길 권해드립니다. 역시 glTexParameteri로 지정하고, 두번째 인자를 GL_TEXTURE_WRAP_S, T와 세번째 인자에 대해서 GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, GL_CLAMP 등으로 테스트해 보시기 바랍니다. 아시겠지만, OpenGL에서 원하는 결과를 얻기 위해서는 많은 실험정신을 필요로 하는지라.. 그런 건투를 빕니다.</summary>
  </entry>
  <entry>
    <title type="html">신정호님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7971" />
    <author>
      <name>(신정호)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7971</id>
    <published>2009-11-05T21:35:44+09:00</published>
    <summary type="html">저 그림이 깨지는경우는 무슨경우인가요?다른그림은 안깨지는데 이그림만 깨지네요 이런경우는 무슨경우인지좀 알려주세요</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7972" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7972</id>
    <published>2009-11-06T09:13:33+09:00</published>
    <summary type="html">텍스쳐 이미지가 깨지는 경우는 대부분 이미지의 크기값이 2의 자승이 아닌 경우에 그렇습니다. 이미지의 크기를 확인해보세요~</summary>
  </entry>
  <entry>
    <title type="html">sokkuma님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7985" />
    <author>
      <name>(sokkuma)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7985</id>
    <published>2009-11-12T17:20:39+09:00</published>
    <summary type="html">감사합니다 ^^;</summary>
  </entry>
  <entry>
    <title type="html">김형준(Dip2K)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7988" />
    <author>
      <name>(김형준(Dip2K))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7988</id>
    <published>2009-11-13T19:20:35+09:00</published>
    <summary type="html">글 마다 댓글을 남겨주셔서 정말 감사드립니다. 하나 하나 답변해 드려야하지만.. 이 글을 대표로 해서 감사의 댓글을 대신합니다~</summary>
  </entry>
  <entry>
    <title type="html">YH님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment7990" />
    <author>
      <name>(YH)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment7990</id>
    <published>2009-11-13T22:33:40+09:00</published>
    <summary type="html">아...정말 감사합니다. 좋은 자료들로 인해서 머리가 깨어나는거 같아요!</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8027" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8027</id>
    <published>2009-12-09T15:35:00+09:00</published>
    <summary type="html">댓글 감사합니다. 댓글 남긴지도 모르고.. 오늘에서야 알게 되었습니다.</summary>
  </entry>
  <entry>
    <title type="html">서성호님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8026" />
    <author>
      <name>(서성호)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8026</id>
    <published>2009-12-08T22:59:40+09:00</published>
    <summary type="html">맵핑이 인터넷중에서 이게 가장잘되네요.
다른건 무슨 오류도 있구 ㅠㅠ.. 잘 보고 갑니다 ^^</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8028" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8028</id>
    <published>2009-12-09T15:35:15+09:00</published>
    <summary type="html">성호님, 댓글 감사드립니다.</summary>
  </entry>
  <entry>
    <title type="html">방랑님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8029" />
    <author>
      <name>(방랑)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8029</id>
    <published>2009-12-09T20:12:56+09:00</published>
    <summary type="html">한 줄기 빛같은 자료 감사히 보고 갑니다~
그런데 원기둥 맵핑은 어떻게 해야하나요~?</summary>
  </entry>
  <entry>
    <title type="html">땅콩사탕님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8031" />
    <author>
      <name>(땅콩사탕)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8031</id>
    <published>2009-12-10T12:54:48+09:00</published>
    <summary type="html">안녕하세요. 좋은 자료 잘 보고있습니다. 아이폰에서 3D 메뉴를 구현해보려고 하는데 질문이 있습니다. 같은 크기의 네모 여러개를 3D공간에서 원형으로 배치하려면 어떤식으로 해야되는지 힌트좀 얻을 수 있을까요? 혹시 도움될만한 글이나 아이디어를 좀 알려주시면 감사하겠습니다.</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8033" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8033</id>
    <published>2009-12-11T20:15:23+09:00</published>
    <summary type="html">안녕하세요~ ^^
일단 원하는 위치에 오브젝트를 놓는 것에 대해 알아야 합니다. 이건 http://www.gisdeveloper.co.kr/437 를 통해 살펴보시구요. 그 다음에는 원형 배치라고 했으니 원형 배치에 대한 각 위치를 계산해야 합니다. 이 것은 간단히 cos/sin 함수와 각도 0~360까지를 사용해 얻을 수 있습니다. 그럼 건투를 빕니다.</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8035" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8035</id>
    <published>2009-12-11T20:17:35+09:00</published>
    <summary type="html">원기둥을 간단히 OpenGL의 quadric(http://www.gisdeveloper.co.kr/431) 객체를 이용해 구성하게 되면 손쉽게 맵핑을 할 수 있답니다~</summary>
  </entry>
  <entry>
    <title type="html">SYL님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8062" />
    <author>
      <name>(SYL)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8062</id>
    <published>2009-12-31T00:54:22+09:00</published>
    <summary type="html">OpenGL 처음 시작하는데 정말 많은 도움되고 있습니다! 좋은자료 감사합니다 ^^ 새해복 많이받으세요!</summary>
  </entry>
  <entry>
    <title type="html">김형준(Dip2K)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8064" />
    <author>
      <name>(김형준(Dip2K))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8064</id>
    <published>2009-12-31T19:33:10+09:00</published>
    <summary type="html">아이쿠~ 감사합니다 ^^ 새해복많이 받으세요~</summary>
  </entry>
  <entry>
    <title type="html">:)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8278" />
    <author>
      <name>(:))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8278</id>
    <published>2010-06-01T18:52:21+09:00</published>
    <summary type="html">텍스쳐 매핑에 대해 어렴풋하게만 알고 있었는데, 이번 글을 통해 확실히 알고 갑니다. 감사합니다. :)</summary>
  </entry>
  <entry>
    <title type="html">김형준(Dip2K)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8281" />
    <author>
      <name>(김형준(Dip2K))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8281</id>
    <published>2010-06-03T00:52:53+09:00</published>
    <summary type="html">저 역시 감사드립니다. ^^</summary>
  </entry>
  <entry>
    <title type="html">자민님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8669" />
    <author>
      <name>(자민)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8669</id>
    <published>2011-04-26T15:36:27+09:00</published>
    <summary type="html">감사합니다 저도 이리 저리 고민을 많이 했는 데 많은 도움을 주셨네요</summary>
  </entry>
  <entry>
    <title type="html">김형준(Dip2K)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8677" />
    <author>
      <name>(김형준(Dip2K))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8677</id>
    <published>2011-04-29T15:59:11+09:00</published>
    <summary type="html">네, 질문에 신경쓰고 답변하다가 정작 중요한 감사의 댓글을 이제서야 달게 되었습니다. 감사합니다!</summary>
  </entry>
  <entry>
    <title type="html">홍팔님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8700" />
    <author>
      <name>(홍팔)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8700</id>
    <published>2011-05-31T09:22:22+09:00</published>
    <summary type="html">정말 잘보고 갑니다..기본 텍스쳐에 정리가 잘 되어 있네요 ~ 헌데 제가 원기둥을 cylinder 함수를 이용해서 그렸는데 그 경우 텍스쳐를 입힐려면 어떻게 해야 할까요 ㅠ. 찾아봐도 잘 나오질 않네요..</summary>
  </entry>
  <entry>
    <title type="html">김형준(Dip2K)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8707" />
    <author>
      <name>(김형준(Dip2K))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8707</id>
    <published>2011-05-31T14:40:10+09:00</published>
    <summary type="html">원기둥을 직접 Triangle로 직접 구성하는 경우라면.. 텍스쳐 맵핑 좌표 역시 직접 구성해 주셔야 합니다. 삼각형으로 직접 구성할 정도라면 텍스쳐 맵핑 좌표 역시 직접 지정해 주실 정도의 스킬은 되시리라 생각됩니다. 직접 구성하기가 어렵다면... 오픈GL에서 제공하는 Quadrics를 이용해 보시기 바랍니다.. 간단하게 API를 이용해 실린더를 구성할 수 있고 텍스쳐 좌표까지 지정할 수 있습니다.</summary>
  </entry>
  <entry>
    <title type="html">ㅜㅜ님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8718" />
    <author>
      <name>(ㅜㅜ)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8718</id>
    <published>2011-06-07T20:50:52+09:00</published>
    <summary type="html">bmp 파일말고. 알파값이 들어있는 tga, png파일을 읽는 방법은 없나요?</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8719" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8719</id>
    <published>2011-06-08T08:23:26+09:00</published>
    <summary type="html">TGA 파일 로딩을 통한 텍스쳐맵핑 강좌에 대한 외부 url입니다. 
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=33</summary>
  </entry>
  <entry>
    <title type="html">AR_maker님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8847" />
    <author>
      <name>(AR_maker)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8847</id>
    <published>2011-11-19T23:06:09+09:00</published>
    <summary type="html">증강현실을 ARToolkit 없이 만들어보려는대요
OpenCV로
IplImage* frame = cvCaptureFromCAM(0);
으로 받아온 실시간 카메라 영상을 이 예제의 OpenGL 배경으로 사용할 수는 없나요???
몇날 몇일을 시도해봐도...
지식이 부족해서 해결이 되질 않네요 T^T
답변에 미리 감사합니다</summary>
  </entry>
  <entry>
    <title type="html">김형준(Dip2K)님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8848" />
    <author>
      <name>(김형준(Dip2K))</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8848</id>
    <published>2011-11-20T13:36:22+09:00</published>
    <summary type="html">IplImage를 통해 텍스쳐 맵핑을 하시면됩니다.
전체 화면을 덮는 사각형 매쉬를 올려두고..
이 매쉬에 IplImage의 이미지를 맵핑하시면 원하시는 결과를 얻으실 수 있습니다.</summary>
  </entry>
  <entry>
    <title type="html">AR_maker님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8849" />
    <author>
      <name>(AR_maker)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8849</id>
    <published>2011-11-21T00:49:03+09:00</published>
    <summary type="html">답변 감사합니다.
그런데 지식이 매우 얕아서... 잘 되질 않네요 ^^;;;;;;;;;;;;;.......
저는 강의에 나와 있는 부분을 활용하여 대충 이런 식으로 바꾸었었습니다.

GLuint *texture; // 전역변수
int InitGL(GLvoid)// 이 부분을 바꿔보았습니다. 하지만.. 실패했습니다.. T^T	
{
        ///////// New Codes ///////////////////////////////////////////////
	CvCapture* capture = cvCaptureFromCAM(0); // cam 영상을 받아온 후
        IplImage *image = NULL;
        while(1)
        {
             image = cvQueryFrame(capture);
             glGenTextures(1, text);
       	     glBindTexture(GL_TEXTURE_2D, *text);
	     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	     glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
    	     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image-&amp;gt;width, image-&amp;gt;height, 0, GL_BGR_EXT, GL_UNSIGNED_BYTE, image-&amp;gt;imageData);
		
	     glEnable(GL_TEXTURE_2D);
	     glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
char chKey = cvWaitKey(10);
		
	     if(chKey == 27 ) // ESC를 눌렀는지 확인하고 ESC이면 종료하는 부분
	      {
		   break;
	     }
	}
////////////////////////////////////////////////////////////////////
        ....
	return TRUE;										// Initialization Went OK
}

int DrawGLScene(GLvoid)							
{
        glTranslatef(0.0f, 0.0f, -5.0f);
	glColor3f(0.8f, 0.8f, 0.8f);

	glBindTexture(GL_TEXTURE_2D, *texture);
	glBegin(GL_QUADS);
		glNormal3f(0.0f, 0.0f, 1.0f);
		glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, -2.0f);
		glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -2.0f);
		glTexCoord2f(1.0f, 1.0f); glVertex3f(1.0f, -1.0f, -2.0f);
		glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f, 1.0f, -2.0f);
	glEnd();
	
	return TRUE;
}

제가 생각하는 문제점은
영상은 while(1)인 무한 loop 안에서 계속 해서 IplImage *image에 저장되고 있는데, 제가 작성한 형식은 이 무한 loop를 빠져나가지 않는 이상 OpenGL로 물체를 그릴 수 없다는 것입니다.
....
죄송하고, 무리한 부탁인 줄은 알지만
혹시 가능하시다면 OpenCV로 받아온 IplImage *image 영상을 OpenGL window의 배경으로, 아니면 texture mapping 하는 코드 좀 작성해주시면 안되겠습니까?
개인적으로 가르쳐 주시는 게 뭣 하다면 강의로라도... T^T
제가 code를 바꾸는 걸 보시면 아시겠지만 완전 초보자라서요...
답변에 미리 감사합니다.</summary>
  </entry>
  <entry>
    <title type="html">AR_maker님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8850" />
    <author>
      <name>(AR_maker)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8850</id>
    <published>2011-11-21T00:51:24+09:00</published>
    <summary type="html">아, 혹시 메일로 보내주실 수 있으시면... ㅎㅎ;;
nightskysj@naver.com
입니다.
제발 T^T... 염치 없지만...부탁드립니다.
인터넷을 정말 열심히 뒤져보아도 이 곳 만한 곳이 없어서요 T^T
감사합니다.</summary>
  </entry>
  <entry>
    <title type="html">김형준님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8851" />
    <author>
      <name>(김형준)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8851</id>
    <published>2011-11-21T01:21:11+09:00</published>
    <summary type="html">아... 저 역시 시간이 없네요....</summary>
  </entry>
  <entry>
    <title type="html">AR_maker님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8852" />
    <author>
      <name>(AR_maker)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8852</id>
    <published>2011-11-21T22:14:19+09:00</published>
    <summary type="html">넵 ㅎㅎ
저, 김형우님의 강의를 바탕으로 이래저래 해서 cam에서 받아온 영상을 실시간으로 띄우는 건 했습니다. ㅎㅎ 감사합니다.
그런데 한 가지 문제가 있습니다. T^T
메모리를 해제해주는 문제인데요.
메모리를 제가 하는 방식으로 해제를 하려니까 메모리 해제가 반복해서 일어난다며 heap이 손상되었다며 에러메시지가 뜨더라구요.
이 부분에 대해서 조언 좀 해주시면 안 될까요?? ㅎㅎ;;
다음은 제가 삽입한 코드입니다.
int DrawGLScene(GLvoid)									// Here&#039;s Where We Do All The Drawing
{
	////////// New Codes ///////////////////////////////////////////////
	IplImage *image = 0;
	image = (IplImage*)calloc(1, sizeof(IplImage)); // 동적메모리를 할당한 부분입니다. 이렇게 안 하니까 에러가 또 나더라고요. T^T
	texture = (GLuint*)calloc(1, sizeof(GLuint)); // 여기 또한 마찬가지 입니다.

	if(image = cvQueryFrame(capture))
	{
		glGenTextures(1, texture);
		glBindTexture(GL_TEXTURE_2D, *texture);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
		glTexImage2D(GL_TEXTURE_2D, 
					 0, 
					 GL_RGB, // IplImage를 띄우기 위해서는 이렇게 선언해야 된다더군요. R과 B의 순서가 바뀌어 있어서 그렇다더군요.
					 image-&amp;gt;width, 
					 image-&amp;gt;height, 
					 0, 
					 GL_BGR_EXT, // 여기도 마찬가지 입니다.
					 GL_UNSIGNED_BYTE, 
					 image-&amp;gt;imageData);
	} else return FALSE;

/*	if(image) // 여기가 메모리를 해제하려는 부분인데요 이 주석만 풀면 에러가 나더라고요...
	{
		if(image-&amp;gt;imageData) free(image-&amp;gt;imageData);
		free(image);
	} else return FALSE;
cvReleaseFrame(&amp;amp;capture);
free(&amp;amp;texture);
*/	
	
	glEnable(GL_TEXTURE_2D);
	glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
////////////////////////////////////////////////////////////////////
...
}

부디... 이 부분 좀 해결해주시면 ㅎㅎㅎ;; 안 될까요??? ㅎㅎ
미리미리 감사합니다.</summary>
  </entry>
  <entry>
    <title type="html">세모랑님의 댓글</title>
    <link rel="alternate" type="text/html" href="http://www.gisdeveloper.co.kr/428#comment8876" />
    <author>
      <name>(세모랑)</name>
    </author>
    <id>http://www.gisdeveloper.co.kr/428#comment8876</id>
    <published>2011-12-26T11:57:04+09:00</published>
    <summary type="html">점점 재미있어지내요...^^ 언능 마스터해서 만들고  싶은것들 쭉쭉 뽑아보고 싶어요~</summary>
  </entry>
</feed>

