<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>OpenGL Discussion and Help Forums - OpenGL under Windows</title>
		<link>http://www.opengl.org/discussion_boards/</link>
		<description>Discussions specific to OpenGL coding under Windows</description>
		<language>en</language>
		<lastBuildDate>Tue, 21 May 2013 23:20:50 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.opengl.org/discussion_boards/images/misc/rss.png</url>
			<title>OpenGL Discussion and Help Forums - OpenGL under Windows</title>
			<link>http://www.opengl.org/discussion_boards/</link>
		</image>
		<item>
			<title>GLUI Question</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181736-GLUI-Question?goto=newpost</link>
			<pubDate>Mon, 20 May 2013 12:28:04 GMT</pubDate>
			<description>Hello, 
 
I am rather new to OpenGL, GLUT and GLUI. I have a question regarding GLUI, and until now I did not find an answer for it. 
I am using GLUT...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am rather new to OpenGL, GLUT and GLUI. I have a question regarding GLUI, and until now I did not find an answer for it.<br />
I am using GLUT for rendering cloth items. One of the things that I want to do is, of course, create these cloth items, and for that I need to be able to specify a texture for them. I decided to do this by having a drop-down list with a predefined list of textures, that the user can choose from. The question is the following:<br />
Can I, using GLUI, display an image in the GLUI menu? I want, under the drop-down list with the textures, to have a small image which is refreshed each time the user selects a new item in the drop-down list. If this is not possible, then I was thinking to have the image displayed separately, in a new window, each time the user selects an item from drop-down list. But I don''t know if this is possible either, or how to do it. Any help is greatly appreciated.<br />
<br />
Thank you,<br />
Corina</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>corinard</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181736-GLUI-Question</guid>
		</item>
		<item>
			<title>A problem in import 3ds file</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181735-A-problem-in-import-3ds-file?goto=newpost</link>
			<pubDate>Mon, 20 May 2013 11:35:22 GMT</pubDate>
			<description>I am now working on import a 3ds model in my application, but I have a problem. I import the model and show it, but the model have no edge. It just a...</description>
			<content:encoded><![CDATA[<div>I am now working on import a 3ds model in my application, but I have a problem. I import the model and show it, but the model have no edge. It just a lump of color. What happened?<br />
Here is my part code.<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">BOOL CMyOpenGLView::InitializeOpenGL(CDC *pDC) 
{
 m_pDC=pDC;
&nbsp;
SetupPixelFormat();  
&nbsp;
m_hRC=::wglCreateContext(m_pDC-&gt;GetSafeHdc()); 
&nbsp;
::wglMakeCurrent(m_pDC-&gt;GetSafeHdc(),m_hRC); 
&nbsp;
::glShadeModel(GL_FLAT);
&nbsp;
 ::glClearColor(0.0F, 0.0F, 0.0F, 0.0F);
&nbsp;
 ::glClearDepth(1.0F);
&nbsp;
::glEnable(GL_DEPTH_TEST);
&nbsp;
::glEnable(GL_CULL_FACE);
&nbsp;
::glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); 
&nbsp;
GLfloat ambientLight&#91;&#93; = { 0.3f, 0.3f, 0.3f, 1.0f};
 GLfloat diffuseLight&#91;&#93; = { 0.7f, 0.7f, 0.7f, 1.0f};
 GLfloat lightPos&#91;&#93;     = {6000.0f,6000.0f,6000.0f, 1.0f};
&nbsp;
 glLightfv(GL_LIGHT0, GL_AMBIENT, ambientLight);
 glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight);
 glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
 glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientLight);
&nbsp;
 glEnable(GL_COLOR_MATERIAL);
 glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
 glEnable(GL_LIGHTING);
 glEnable(GL_LIGHT0);
&nbsp;
 CMyOpenGLApp * app = (CMyOpenGLApp *)AfxGetApp();
 glNewList(app-&gt;m_dizuolist,GL_COMPILE); 
BOOL result;
 C3dsReader loader;
 result = loader.Reader(&quot;DIZUO.3DS&quot;,&amp;m_TriList);    //read the file and save in m_TriList
if (result)
 {
 m_TriList.drawGL();    
m_TriList.doAfterMath(); 
}
glEndList();
&nbsp;
&nbsp;
  base_list = app-&gt;m_dizuolist; 
return TRUE;
 }
&nbsp;
&nbsp;
void CMyOpenGLView::RenderScence() 
{
   static BOOL bBusy = FALSE;   
        if (bBusy) return;
   bBusy=TRUE;
&nbsp;
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW);
 glLoadIdentity();
&nbsp;
glTranslatef(m_SceneTransX,m_SceneTransY,m_SceneTransZ);
&nbsp;
 glRotatef(m_SceneRotX,1.0,0.0,0.0);
 glRotatef(m_SceneRotY,0.0,1.0,0.0);
 glRotatef(m_SceneRotZ,0.0,0.0,1.0);
 glRotatef(-90.0f,1.0f,0.0f,0.0f); 
glRotatef(-90.0f,0.0f,0.0f,1.0f);
&nbsp;
glScalef(m_SceneScale,m_SceneScale,m_SceneScale);
&nbsp;
 glDisable(GL_LIGHTING);
 glPushMatrix();
 glBegin(GL_LINES);
 glColor3f(1.0,0.0,0.0);
 glVertex3f(-200.0,0.0,0.0);
 glVertex3f( 200.0,0.0,0.0);
&nbsp;
 glColor3f(0.0,1.0,0.0);
 glVertex3f(0.0,-200.0,0.0);
 glVertex3f(0.0, 200.0,0.0);
&nbsp;
 glColor3f(0.0,0.0,1.0);
 glVertex3f(0.0,0.0,-200.0);
 glVertex3f(0.0,0.0, 200.0);
 glEnd();
&nbsp;
 glPushMatrix(); 
glColor3f(1.0f,0.0f,0.0f);
 glTranslatef(150.0f,0.0f,0.0f);
 glRotatef(90.0f,0.0f,1.0f,0.0f);
 glutSolidCone(10.0,50.0,50,50);
 glPopMatrix();
&nbsp;
glPushMatrix();
 glColor3f(0.0f,1.0f,0.0f);
 glTranslatef(0.0f,150.0f,0.0f);
 glRotatef(-90.0f,1.0f,.0.f,0.0f);
 glutSolidCone(10.0,50.0,50,50);
 glPopMatrix();
&nbsp;
glPushMatrix();
 glColor3f(0.0f,0.0f,1.0f);
 glTranslatef(0.0f,0.0f,150.0f);
 glutSolidCone(10.0,50.0,50,50);
 glPopMatrix();
&nbsp;
glPopMatrix();
 glEnable(GL_LIGHTING);
&nbsp;
glDisable(GL_LIGHTING);
 glPushMatrix();
&nbsp;
 glColor3f(0.0f,0.0f,0.0f);  
 wglUseFontBitmaps(wglGetCurrentDC(),0,255,base);
 glListBase(base);
&nbsp;
 glRasterPos3f(210.0f,-0.5f,0.0f);
 glCallLists(2,GL_UNSIGNED_BYTE,_T(&quot;+x&quot;));
&nbsp;
 glRasterPos3f(-0.5,210.0f,0.0f);
 glCallLists(2,GL_UNSIGNED_BYTE,_T(&quot;+y&quot;)); 
&nbsp;
 glRasterPos3f(-0.5,0.0f,210.0f);
 glCallLists(2,GL_UNSIGNED_BYTE,_T(&quot;+z&quot;));
&nbsp;
 glPopMatrix();
 glEnable(GL_LIGHTING);
&nbsp;
glDisable(GL_LIGHTING);
 glDisable(GL_LIGHT0);
 glPushMatrix();
&nbsp;
glRotatef(180.0f,1.0f,0.0f,0.0f);
 glRotatef(180.0f,0.0f,1.0f,0.0f);
 glRotatef(180.0f,0.0f,0.0f,1.0f);
 glCallList(base_list);
 glPopMatrix();
 glEnable(GL_LIGHTING);
 glEnable(GL_LIGHT0);
   ::SwapBuffers(m_pDC-&gt;GetSafeHdc()); 
   bBusy = FALSE;
&nbsp;
 return;
 }</pre></div></code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>lichang12120</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181735-A-problem-in-import-3ds-file</guid>
		</item>
		<item>
			<title>delay instruction</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181671-delay-instruction?goto=newpost</link>
			<pubDate>Fri, 10 May 2013 16:50:54 GMT</pubDate>
			<description>hello 
I want from y 
to gave me delay instruction in opengl 
ex i want to draw sphere in first time then in second time i will draw cube etc. 
 
how...</description>
			<content:encoded><![CDATA[<div>hello<br />
I want from y<br />
to gave me delay instruction in opengl<br />
ex i want to draw sphere in first time then in second time i will draw cube etc.<br />
<br />
how can i make this?</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>marahalsaidan</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181671-delay-instruction</guid>
		</item>
		<item>
			<title>perso3D_chung free easy openGL 3D character model animation and edit</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181638-perso3D_chung-free-easy-openGL-3D-character-model-animation-and-edit?goto=newpost</link>
			<pubDate>Tue, 07 May 2013 10:40:40 GMT</pubDate>
			<description>i have written an open source application in freebasic to load and edit custom 3D animated character models directly into openGL1.2 if you are...</description>
			<content:encoded><![CDATA[<div>i have written an open source application in freebasic to load and edit custom 3D animated character models directly into openGL1.2 if you are interested .<br />
<br />
you can find it there =&gt; chungswebsite.blogspot.fr/search/label/perso3D_chung</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>nguyenc</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181638-perso3D_chung-free-easy-openGL-3D-character-model-animation-and-edit</guid>
		</item>
		<item>
			<title>Consult the OpenGL display character problem</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181636-Consult-the-OpenGL-display-character-problem?goto=newpost</link>
			<pubDate>Tue, 07 May 2013 06:53:31 GMT</pubDate>
			<description><![CDATA[Using OpenGL programming, medical image processing, on image above labeled "R", "L", "fracture", referred to as the character. Now the problem: 
The...]]></description>
			<content:encoded><![CDATA[<div>Using OpenGL programming, medical image processing, on image above labeled &quot;R&quot;, &quot;L&quot;, &quot;fracture&quot;, referred to as the character. Now the problem:<br />
The program can run on all computers, but in some computers can output the character, and some computer can't output the character. I do not know why?</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>sontu2013</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181636-Consult-the-OpenGL-display-character-problem</guid>
		</item>
		<item>
			<title>GLUT problem I think</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181617-GLUT-problem-I-think?goto=newpost</link>
			<pubDate>Fri, 03 May 2013 14:23:43 GMT</pubDate>
			<description><![CDATA[Hey guys :) hope you're all having a great day 
 
so my issue with my code is kinda driving me mad, its one of those things Ive stared at enough...]]></description>
			<content:encoded><![CDATA[<div>Hey guys :) hope you're all having a great day<br />
<br />
so my issue with my code is kinda driving me mad, its one of those things Ive stared at enough trying to find the issue and so I just cant see it.  Honestly, Im not sure what could be causing the problem, I can tell you however that it is most likely to do with GLUT if anyone here knows enough to be able to help me.  originally my program drew a blank window but then wouldnt do much else so I commented out glutMainLoop() and then the window didnt even draw<br />
<br />
Here is some code anyway, starting with a simple main that will let you compile it if you do help:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">int main(int argc, char** argv){
    window = new GlutWindow(argc, argv, &quot;EcoSphere&quot;, 800, 600);
&nbsp;
&nbsp;
    GameLoop::get()-&gt;init(window);
    GameLoop::get()-&gt;run();
&nbsp;
&nbsp;
    delete window;
&nbsp;
&nbsp;
    return 0;
};</pre></div></code><hr />
</div><br />
GlutWindow:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">#ifndef GLUTWINDOW_H#define GLUTWINDOW_H
&nbsp;
&nbsp;
#include &quot;glut.h&quot;
#include &quot;Window.h&quot;
#include &quot;GameLoop.h&quot;
&nbsp;
&nbsp;
void draw(void);
void resize(int, int);
void kybdPressed(unsigned char, int, int);
void kybdReleased(unsigned char, int, int);
&nbsp;
&nbsp;
class GlutWindow : public Window
{
private:
    int window;
    static Input* input;
&nbsp;
&nbsp;
public:
    GlutWindow(int argc, char** argv, char* title, int w, int h)
    {
        glutInit(&amp;argc, argv);
        glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
        glutInitWindowSize(w, h);
        glutInitWindowPosition(w/10, h/10);
        window = glutCreateWindow(title);
&nbsp;
&nbsp;
        glutDisplayFunc(draw);
        glutReshapeFunc(resize);
        glutKeyboardFunc(kybdPressed);
        glutKeyboardUpFunc(kybdReleased);
&nbsp;
&nbsp;
        //glutMainLoop();
    }
&nbsp;
&nbsp;
    static void draw()
    {
        glClearColor(0.0, 0.0, 0.0, 1.0);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
&nbsp;
&nbsp;
        glutSolidTeapot(3.0);
&nbsp;
&nbsp;
        glFlush(); // Complete Pending Operations
        glutSwapBuffers(); //Switch Buffer (Double Buffering)
    }
&nbsp;
&nbsp;
    static void resize(int w, int h)
    {
        glViewport(0, 0, (GLsizei)w, (GLsizei)h);
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
        gluPerspective(45, (GLfloat)w / (GLfloat)h, 1.0, 100.0);
        glMatrixMode(GL_MODELVIEW);
    }
&nbsp;
&nbsp;
    static void kybdPressed(unsigned char key, int x, int y)
    {
        input-&gt;keyPressed(key);
    }
&nbsp;
&nbsp;
    static void kybdReleased(unsigned char key, int x, int y)
    {
        input-&gt;keyReleased(key);
    }
&nbsp;
&nbsp;
    void redraw()
    {
        glutPostRedisplay();
    }
&nbsp;
&nbsp;
    virtual ~GlutWindow(){}
};
&nbsp;
&nbsp;
Entities* GlutWindow::entities = nullptr;
Input* GlutWindow::input = nullptr;
&nbsp;
&nbsp;
#endif</pre></div></code><hr />
</div><br />
GameLoop:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">#ifndef GAMELOOP_H#define GAMELOOP_H
&nbsp;
&nbsp;
#include &quot;Input.h&quot;
#include &quot;Window.h&quot;
&nbsp;
&nbsp;
class GameLoop
{
private:
    static GameLoop* instance;
    GameLoop(){}
&nbsp;
&nbsp;
    Controls* controls;
&nbsp;
&nbsp;
    Window* window;
&nbsp;
&nbsp;
    static bool running;
&nbsp;
&nbsp;
public:
    static GameLoop* get()
    {
        if(instance == nullptr)
        {
            instance = new GameLoop();
        }
        return instance;
    }
&nbsp;
&nbsp;
    void init(Window* w)
    {
        window = w;
    }
&nbsp;
&nbsp;
    void run()
    {
        bool running = true;
&nbsp;
&nbsp;
        while(running)
        {
            bool* keys = Input::get()-&gt;getKybdState();
&nbsp;
                        //use keyboard input and update all entities
&nbsp;
&nbsp;
            window-&gt;redraw();
        }
    }
&nbsp;
&nbsp;
    static void end()
    {
        running = false;
    }
};
&nbsp;
&nbsp;
GameLoop* GameLoop::instance = nullptr;
bool GameLoop::running = true;
&nbsp;
&nbsp;
#endif</pre></div></code><hr />
</div><br />
finally the input class:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">#ifndef INPUT_H#define INPUT_H
&nbsp;
&nbsp;
class Input
{
private:
    static Input* instance;
    Input(){}
&nbsp;
&nbsp;
    static bool * kybdState;
&nbsp;
&nbsp;
public:
    static Input* get()
    {
        if(instance == nullptr)
        {
            for(int i = 0; i &lt; 256; i++)
            {
                kybdState&#91;i&#93; = false;
            }
&nbsp;
&nbsp;
            instance = new Input();
        }
        return instance;
    }
&nbsp;
&nbsp;
    static bool* getKybdState()
    {
        return kybdState;
    }
&nbsp;
&nbsp;
    static void keyPressed(unsigned char key)
    {
        kybdState&#91;key&#93; = true;
    }
&nbsp;
&nbsp;
    static void keyReleased(unsigned char key)
    {
        kybdState&#91;key&#93; = false;
    }
&nbsp;
&nbsp;
    virtual ~Input()
    {
        delete kybdState;
    }
};
&nbsp;
&nbsp;
Input* Input::instance = nullptr;
bool * Input::kybdState = new bool&#91;256&#93;;
&nbsp;
&nbsp;
#endif</pre></div></code><hr />
</div><br />
Really sorry for the mass of code, there are some things edited out because they would make compiling hard but it should work as is here, if someone is to help me and feel they need any other information, please say and I will get it right away, also, thank you for your time if you read down this far :P</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>Squishy</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181617-GLUT-problem-I-think</guid>
		</item>
		<item>
			<title>The best way to draw a 2D image directly on a hooked window</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181604-The-best-way-to-draw-a-2D-image-directly-on-a-hooked-window?goto=newpost</link>
			<pubDate>Thu, 02 May 2013 02:37:41 GMT</pubDate>
			<description>What is the best way to draw a 2D image directly on a window which I hooked the SwapBuffers (gdi32.dll) function, *without changing the existing...</description>
			<content:encoded><![CDATA[<div>What is the best way to draw a 2D image <i>directly</i> on a window which I hooked the SwapBuffers (gdi32.dll) function, <b>without changing the existing state?</b><br />
<br />
I am currently doing this:<br />
<br />
<ol class="decimal"><li style="">Get current matrix mode</li><li style="">glPushAttrib(GL_ALL_ATTRIB_BITS)</li><li style="">glViewport(0, height - 64, 64, 64)</li><li style="">Disable a bunch of things</li><li style="">glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER, 0.5f);</li><li style="">Switch to projection matrix, push, loadidentity</li><li style="">Switch to modelview matrix, push, loadidentity, glOrtho</li><li style="">glRasterPos</li><li style="">glDrawPixels to draw the image with alpha</li><li style="">Restore matrices and attributes</li><li style="">Back to original matrix mode</li></ol><br />
<br />
The reason behind this is that I am trying to draw a fps counter on the top-left corner of the window, just like Fraps or other game recording program. Although I'm not familiar with OpenGL, I believe that using texture on a quad will change the state so I can't use texture.<br />
<br />
The drawing of the fps number happens directly before calling `SwapBuffers` in my hook.<br />
<br />
Is there a faster/better approach than what I'm doing?</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>alvinhochun</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181604-The-best-way-to-draw-a-2D-image-directly-on-a-hooked-window</guid>
		</item>
		<item>
			<title>wglSwapMultipleBuffers</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181593-wglSwapMultipleBuffers?goto=newpost</link>
			<pubDate>Wed, 01 May 2013 11:09:37 GMT</pubDate>
			<description>I just found this function in the header files. 
Why is it undocumented ? Does it work ? I assume it works like nvidia swap groups 
anyone tried this...</description>
			<content:encoded><![CDATA[<div>I just found this function in the header files.<br />
Why is it undocumented ? Does it work ? I assume it works like nvidia swap groups<br />
anyone tried this thing ?</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>dukey</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181593-wglSwapMultipleBuffers</guid>
		</item>
		<item>
			<title>Having weird issues with rendering on computers with amd video cards.</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181585-Having-weird-issues-with-rendering-on-computers-with-amd-video-cards?goto=newpost</link>
			<pubDate>Tue, 30 Apr 2013 06:09:51 GMT</pubDate>
			<description><![CDATA[So I am working on solar system project. Everything seems to work perfectly, but when I tried to test it on other computer, the first scene didn't...]]></description>
			<content:encoded><![CDATA[<div>So I am working on solar system project. Everything seems to work perfectly, but when I tried to test it on other computer, the first scene didn't even show up, leaving me with blank background color, and 2. scene had some things working fine, except for little distance bar, that is holding on your screen like HUD.<br />
<br />
I'm pretty sure it only happens on machine, that uses amd GPU, since the program works fine on my and my friends computer, which has nvidia GPU. I've tested it on 3 computers with radeon card.<br />
<br />
I don't have a lot of experience, since I've been learning programming all by self. Can't wait for opportunity to learn programming at school.<br />
<br />
<b>Edit 1:</b><br />
I didn't add code, so here you go:<br />
<br />
main.cpp<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">#include &quot;SDL/sdl.h&quot;
#include &quot;SDL/sdl_opengl.h&quot;
#include &quot;SDL_image.h&quot;
#include &lt;string&gt;
#include &lt;ctime&gt;
#include &lt;cmath&gt;
#include &lt;iostream&gt;
&nbsp;
#include &quot;Planet.h&quot;
&nbsp;
&nbsp;
const float PI = 3.1415926f;
const int SCREEN_WIDTH = 800;
const int SCREEN_HEIGHT = 800;
const int SCREEN_BPP = 32;
const float ZoomMax = 10.0;
int  CameraPos&#91;2&#93;;
float Zoom;
&nbsp;
&nbsp;
int* GUIPosition(int x,int y);
float toDeg(float rad);
float toRad(float deg);
GLuint loadTexture(const std::string &amp;fileName);
&nbsp;
&nbsp;
&nbsp;
&nbsp;
int main( int argc, char* args&#91;&#93; )
{
    CameraPos&#91;0&#93; = 0;
    CameraPos&#91;1&#93; = 1;
    Zoom = 0.1;
&nbsp;
    SDL_Init( SDL_INIT_EVERYTHING );
    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE, 32);
    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
    SDL_WM_SetCaption(&quot;Solar system&quot;, NULL);
    SDL_SetVideoMode(SCREEN_WIDTH,SCREEN_HEIGHT,SCREEN_BPP, SDL_OPENGL);
    glClearColor(0,0,0,1);
    glViewport(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
    glShadeModel(GL_SMOOTH);
&nbsp;
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glFrustum(0,SCREEN_WIDTH,SCREEN_HEIGHT,0,0.1,ZoomMax);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
&nbsp;
&nbsp;
    glDisable(GL_DEPTH_TEST);
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    SDL_Event event;
    srand(time(NULL));
&nbsp;
&nbsp;
    //Variables
    bool Running = true;
    int Tick = 0;
    int Sizes&#91;9&#93; = {1399830,4900,12000,12760,6800,143000,120000,52000,2300};
    float Speed&#91;9&#93; = {0,47.9,35.0,29.8,24.1,13.1,9.6,6.8,5.4};//km/s
    float Scale = 0.01;
    bool isRight=false,isLeft=false;
    bool ShowMarkers = true;
    int Devider = 100;
    int num_segments = 30;
    int CameraSpeed = 20;
    unsigned int Arrow = 0;
    Arrow = loadTexture(&quot;Arrow.png&quot;);
&nbsp;
    enum//Scenes
    {
        sceneIntro,
        sceneProp,//Proportional model
        sceneOverview//Overview model
    };
&nbsp;
    int CurrentScene = sceneOverview;
&nbsp;
    Planet Sun(Sizes&#91;0&#93;*Scale,0,loadTexture(&quot;Sun.png&quot;));
    Sun.SetPosition(0,0);
&nbsp;
    Planet Mercury(Sizes&#91;1&#93;*Scale,58000000*Scale,loadTexture(&quot;Mercury.png&quot;));
    Planet Venus(Sizes&#91;2&#93;*Scale,108000000*Scale,loadTexture(&quot;Venus.png&quot;));
    Planet Earth(Sizes&#91;3&#93;*Scale,150000000*Scale,loadTexture(&quot;VLd.png&quot;));
    Planet Mars(Sizes&#91;4&#93;*Scale,228000000*Scale,loadTexture(&quot;VLd.png&quot;));
    Planet Jupiter(Sizes&#91;5&#93;*Scale,778000000*Scale,loadTexture(&quot;VLd.png&quot;));
    Planet Saturn(Sizes&#91;6&#93;*Scale,1427000000*Scale,loadTexture(&quot;VLd.png&quot;));
    Planet Uranus(Sizes&#91;7&#93;*Scale,2871000000u*Scale,loadTexture(&quot;VLd.png&quot;));
    Planet Neptune(Sizes&#91;8&#93;*Scale,4497000000*Scale,loadTexture(&quot;VLd.png&quot;));
    Planet Planets&#91;9&#93; = {Sun,Mercury,Venus,Earth,Mars,Jupiter,Saturn,Uranus,Neptune};
    //Gameloop
    while(Running)
    {
        //Events
        while(SDL_PollEvent(&amp;event))
        {
            if(event.type == SDL_KEYDOWN)
            {
                switch(event.key.keysym.sym)
                {
                case SDLK_ESCAPE:
                    Running = false;
                    break;
                case SDLK_LEFT:
                    isLeft = true;
                    break;
                case SDLK_RIGHT:
                    isRight = true;
                    break;
                case SDLK_F1:
                    ShowMarkers = not ShowMarkers;
                    break;
                case SDLK_F2:
                    if(CurrentScene==sceneProp)
                        Zoom = ZoomMax;
                    break;
                case SDLK_F3:
                    if(CurrentScene==sceneProp)
                        Zoom = 0.1;
                    break;
                case SDLK_F4:
                    CurrentScene = sceneOverview;
                    Zoom = 0.1;
                    CameraPos&#91;0&#93; = 0;
                    CameraPos&#91;1&#93; = 0;
                    Devider=100;
                    break;
                case SDLK_F5:
                    CurrentScene = sceneProp;
                    Zoom=10;
                    break;
                default:
                    break;
                }
            }else if(event.type == SDL_QUIT) Running = false;
            else if(event.type == SDL_KEYUP)
            {
                switch(event.key.keysym.sym)
                {
                case SDLK_LEFT:
                    isLeft = false;
                    break;
                case SDLK_RIGHT:
                    isRight = false;
                    break;
                default:
                    break;
                }
            }else if(event.type == SDL_MOUSEBUTTONDOWN)
            {
                switch(event.button.button)
                {
                case 4:
                    if(Zoom&gt;0.2&amp;&amp;CurrentScene==sceneProp)
                        Zoom-=0.1;
                    else if (Devider&gt;1&amp;&amp;CurrentScene==sceneOverview)
                        Devider--;
                    break;
                case 5:
                    if(Zoom&lt;ZoomMax&amp;&amp;CurrentScene==sceneProp)
                        Zoom+=0.1;
                    else if(CurrentScene==sceneOverview)
                        Devider++;
                    break;
                default:
                    break;
                }
            }
        }
&nbsp;
&nbsp;
&nbsp;
        //Logic
        if(CurrentScene==sceneOverview)
        {
            for(int x=1;x&lt;9;x++)
            {
                int rad = 20+(pow(x,2)+x*30);
                float deg = (Speed&#91;x&#93;/Devider)*Tick;
                Planets&#91;x&#93;.SetPosition(cos(toRad(deg))*rad,sin(toRad(deg))*rad);
            }
        }else if(CurrentScene==sceneProp)
        {
            //if(isDown) CameraPos&#91;1&#93;-=100*Zoom;
            //if(isUp) CameraPos&#91;1&#93;+=100*Zoom;
            if(isRight)
            {
                if(CameraPos&#91;0&#93;&gt;-Planets&#91;8&#93;.GetDistance())
                {
                    CameraPos&#91;0&#93;-=CameraSpeed*(10*Zoom);
                }else
                {
                    CameraPos&#91;0&#93; = -Planets&#91;8&#93;.GetDistance();
                }
            }
            if(isLeft)
            {
                if(CameraPos&#91;0&#93;&lt;0)
                {
                    CameraPos&#91;0&#93;+=CameraSpeed*(10*Zoom);
                }else
                {
                    CameraPos&#91;0&#93; = 0;
                }
            }
&nbsp;
            for(int x=1;x&lt;9;x++)
            {
                int dist = Planets&#91;x&#93;.GetDistance();
                Planets&#91;x&#93;.SetPosition(dist,0);
            }
        }
&nbsp;
&nbsp;
        //Rendering
        glClear(GL_COLOR_BUFFER_BIT);
        glPushMatrix();
            glTranslatef(CameraPos&#91;0&#93;+SCREEN_WIDTH*(Zoom*5),CameraPos&#91;1&#93;+SCREEN_HEIGHT*(Zoom*5),-Zoom);
            glColor4f(1,1,1,1);
            if(CurrentScene==sceneOverview)
            {///Overview model rendering
                glColor4f(1,1,1,0.5);
                for(int xx=1;xx&lt;9;xx++)
                {
                    int r = 20+(pow(xx,2)+xx*30);
                    int cx = 0;
                    int cy = 0;
&nbsp;
                    float theta = 2 * 3.1415926 / float(num_segments);
                    float c = cosf(theta);
                    float s = sinf(theta);
                    float t;
                    float x = r;
                    float y = 0;
                    glBegin(GL_LINE_LOOP);
                    for(int ii = 0; ii &lt; num_segments; ii++)
                    {
                        glVertex2f(x + cx, y + cy);
                        t = x;
                        x = c * x - s * y;
                        y = s * t + c * y;
                    }
                    glEnd();
                }
&nbsp;
                glColor4f(1,1,1,1);
&nbsp;
                glEnable(GL_TEXTURE_2D);
                    for(int x=0;x&lt;9;x++)
                    {
                        glBindTexture(GL_TEXTURE_2D,Planets&#91;x&#93;.GetTexture());
                        glBegin(GL_QUADS);
                            int Pos&#91;2&#93; = {Planets&#91;x&#93;.GetX(),Planets&#91;x&#93;.GetY()};
                            int rad = Planets&#91;x&#93;.GetRadius()/200;
                            if(x==0)
                                rad = 15;
                            else
                                rad = 3+rad;
&nbsp;
                            glTexCoord2d(0,0); glVertex2f(Pos&#91;0&#93;-rad,Pos&#91;1&#93;-rad);
                            glTexCoord2d(0,1); glVertex2f(Pos&#91;0&#93;-rad,Pos&#91;1&#93;+rad);
                            glTexCoord2d(1,1); glVertex2f(Pos&#91;0&#93;+rad,Pos&#91;1&#93;+rad);
                            glTexCoord2d(1,0); glVertex2f(Pos&#91;0&#93;+rad,Pos&#91;1&#93;-rad);
                        glEnd();
                    }
                glDisable(GL_TEXTURE_2D);
            }else if(CurrentScene==sceneProp)
            {///Proportional model rendering
                glEnable(GL_TEXTURE_2D);
                    for(int x=0;x&lt;9;x++)
                    {
                        glBindTexture(GL_TEXTURE_2D,Planets&#91;x&#93;.GetTexture());
                        glBegin(GL_QUADS);
                            int Pos&#91;2&#93; = {Planets&#91;x&#93;.GetX(),Planets&#91;x&#93;.GetY()};
                            int rad = Planets&#91;x&#93;.GetRadius();
&nbsp;
                            glTexCoord2d(0,0); glVertex2f(Pos&#91;0&#93;-rad,Pos&#91;1&#93;-rad);
                            glTexCoord2d(0,1); glVertex2f(Pos&#91;0&#93;-rad,Pos&#91;1&#93;+rad);
                            glTexCoord2d(1,1); glVertex2f(Pos&#91;0&#93;+rad,Pos&#91;1&#93;+rad);
                            glTexCoord2d(1,0); glVertex2f(Pos&#91;0&#93;+rad,Pos&#91;1&#93;-rad);
                        glEnd();
                    }
                glDisable(GL_TEXTURE_2D);
&nbsp;
                if(ShowMarkers)
                {
                    glColor4f(1,0,0,0.5);
                    glBegin(GL_QUADS);
                        for(int x=0;x&lt;9;x++)
                        {
                            int Pos&#91;2&#93; = {Planets&#91;x&#93;.GetX(),Planets&#91;x&#93;.GetY()};
                            int rad = 500*Zoom;
&nbsp;
                            glVertex2f(Pos&#91;0&#93;-rad,Pos&#91;1&#93;-rad);
                            glVertex2f(Pos&#91;0&#93;-rad,Pos&#91;1&#93;+rad);
                            glVertex2f(Pos&#91;0&#93;+rad,Pos&#91;1&#93;+rad);
                            glVertex2f(Pos&#91;0&#93;+rad,Pos&#91;1&#93;-rad);
                        }
                    glEnd();
                }
&nbsp;
                glColor4f(1,1,1,1);
&nbsp;
                glBegin(GL_QUADS);
                    int* Pos;
                    Pos = GUIPosition(50,SCREEN_HEIGHT-50);
                    int xSize=(SCREEN_WIDTH-100)*(10*Zoom),ySize=(10*Zoom);
&nbsp;
                    glVertex2f(Pos&#91;0&#93;,Pos&#91;1&#93;);
                    glVertex2f(Pos&#91;0&#93;+xSize,Pos&#91;1&#93;);
                    glVertex2f(Pos&#91;0&#93;+xSize,Pos&#91;1&#93;+ySize);
                    glVertex2f(Pos&#91;0&#93;,Pos&#91;1&#93;+ySize);
&nbsp;
                    xSize=(10*Zoom);
                    ySize=3*(10*Zoom);
&nbsp;
                    for(int x=0;x&lt;9;x++)
                    {
                        Pos=GUIPosition(50+((float)Planets&#91;x&#93;.GetDistance()/Planets&#91;8&#93;.GetDistance())*((SCREEN_WIDTH-100)),SCREEN_HEIGHT-53);
&nbsp;
                        glVertex2f(Pos&#91;0&#93;,Pos&#91;1&#93;);
                        glVertex2f(Pos&#91;0&#93;+xSize,Pos&#91;1&#93;);
                        glVertex2f(Pos&#91;0&#93;+xSize,Pos&#91;1&#93;+ySize);
                        glVertex2f(Pos&#91;0&#93;,Pos&#91;1&#93;+ySize);
                    }
                glEnd();
&nbsp;
                glEnable(GL_TEXTURE_2D);
                glBindTexture(GL_TEXTURE_2D,Arrow);
                glBegin(GL_QUADS);
                    Pos=GUIPosition(36-(SCREEN_WIDTH-100)*((CameraPos&#91;0&#93;+0.1)/Planets&#91;8&#93;.GetDistance()),SCREEN_HEIGHT-49);
                    xSize=28*(10*Zoom);
                    ySize=28*(10*Zoom);
&nbsp;
                    glTexCoord2d(0,0); glVertex2f(Pos&#91;0&#93;,Pos&#91;1&#93;);
                    glTexCoord2d(1,0); glVertex2f(Pos&#91;0&#93;+xSize,Pos&#91;1&#93;);
                    glTexCoord2d(1,1); glVertex2f(Pos&#91;0&#93;+xSize,Pos&#91;1&#93;+ySize);
                    glTexCoord2d(0,1); glVertex2f(Pos&#91;0&#93;,Pos&#91;1&#93;+ySize);
                glEnd();
                glDisable(GL_TEXTURE_2D);
            }
        glPopMatrix();
        SDL_GL_SwapBuffers();
&nbsp;
&nbsp;
        //End
        Tick++;
        SDL_Delay(10);
    }
&nbsp;
&nbsp;
    SDL_Quit();
    return 0;
}
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
float toRad(float deg)
{
    return deg*(PI/180);
}
&nbsp;
float toDeg(float rad)
{
    return rad*(180/PI);
}
&nbsp;
int* GUIPosition(int x,int y)
{
    int* Info;
    int Cam&#91;2&#93;;
    Info = Cam;
    Cam&#91;0&#93; = -(CameraPos&#91;0&#93;+SCREEN_WIDTH*(Zoom*5))+(x*(Zoom*10));
    Cam&#91;1&#93; = -(CameraPos&#91;1&#93;+SCREEN_HEIGHT*(Zoom*5))+(y*(Zoom*10));
    std::cout&lt;&lt;&quot;&quot;;
    return Info;
}
&nbsp;
GLuint loadTexture(const std::string &amp;fileName)
{
  SDL_Surface *image = IMG_Load( fileName.c_str() );
  SDL_DisplayFormatAlpha(image);
  unsigned object(0);
  glGenTextures(1, &amp;object);
  glBindTexture(GL_TEXTURE_2D, object);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image-&gt;w, image-&gt;h, 0, GL_RGBA, GL_UNSIGNED_BYTE, image-&gt;pixels);
  SDL_FreeSurface(image);
  return object;
}</pre></div></code><hr />
</div><br />
Planets.h<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">#ifndef PLANET_H
#define PLANET_H
&nbsp;
&nbsp;
class ID
{
    int id;
    public:
        ID()
        {
            static int counter = 0;
            id = counter++;
        }
&nbsp;
        int getId()
        {
            return id;
        }
};
&nbsp;
class Planet
{
    static ID id;
    public:
        Planet(int Rad,int Dist,unsigned int tex);
&nbsp;
        void SetRadius(int Rad);
        void SetDistance(int Dist);
        void SetPosition(int x, int y);
&nbsp;
        float GetRadius();
        int GetDistance();
        int GetX();
        int GetY();
        unsigned int GetTexture();
&nbsp;
        int GetId()
        {
            return id.getId();
        }
    private:
        float Radius;
        int Distance;
        int Position&#91;2&#93;;
        unsigned int Texture;
};
&nbsp;
#endif // PLANET_H</pre></div></code><hr />
</div><br />
Planets.cpp<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">#include &quot;Planet.h&quot;
&nbsp;
Planet::Planet(int Rad,int Dist,unsigned int tex)
{
    Radius = Rad;
    Distance = Dist;
    Texture = tex;
}
&nbsp;
void Planet::SetRadius(int Rad)
{
    Radius = Rad;
}
void Planet::SetDistance(int Dist)
{
    Distance = Dist;
}
void Planet::SetPosition(int x, int y)
{
    Position&#91;0&#93; = x;
    Position&#91;1&#93; = y;
}
&nbsp;
&nbsp;
&nbsp;
int Planet::GetDistance()
{
    return Distance;
}
float Planet::GetRadius()
{
    return Radius;
}
int Planet::GetX()
{
    return Position&#91;0&#93;;
}
int Planet::GetY()
{
    return Position&#91;1&#93;;
}
unsigned int Planet::GetTexture()
{
    return Texture;
}</pre></div></code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>TheZars15</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181585-Having-weird-issues-with-rendering-on-computers-with-amd-video-cards</guid>
		</item>
		<item>
			<title>Link Error: glew</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181559-Link-Error-glew?goto=newpost</link>
			<pubDate>Fri, 26 Apr 2013 23:19:02 GMT</pubDate>
			<description><![CDATA[Hello, 
 
IDE: code::blocks 10.05 
compiler: gnu gcc 
 
code: 
 
 
#define GLEW_STATIC 
#include <GL/glew.h>]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
IDE: code::blocks 10.05<br />
compiler: gnu gcc<br />
<br />
code:<br />
<br />
<br />
#define GLEW_STATIC<br />
#include &lt;GL/glew.h&gt;<br />
#include &lt;GL/freeglut.h&gt;<br />
#include &lt;GL/glext.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;iostream&gt;<br />
<br />
using namespace std;<br />
<br />
enum VAO_IDs {Triangles,NumVAOs};<br />
enum Buffer_IDs {ArrayBuffer, NumBuffers};<br />
enum Attrib_IDs {vPosition=0};<br />
<br />
GLuint VAOs[NumVAOs];<br />
GLuint Buffers[NumBuffers];<br />
<br />
const GLuint NumVertices = 6;<br />
<br />
/* GLUT callback Handlers */<br />
<br />
void resize(int width, int height)<br />
{<br />
<br />
}<br />
<br />
void display(void)<br />
{<br />
<br />
}<br />
<br />
void key(unsigned char key, int x, int y)<br />
{<br />
<br />
}<br />
<br />
void mouse()<br />
{<br />
<br />
}<br />
<br />
void idle(void)<br />
{<br />
<br />
}<br />
<br />
void init(void)<br />
{<br />
    glGenVertexArrays(NumVAOs,VAOs);<br />
    glBindVertexArray(VAOs[Triangles]);<br />
<br />
//    GLfloat vertices[NumVertices][2]={<br />
//    {-0.9,-0.9},{0.85,-0.9},{-0.9,0.85},{0.9,-0.85},{0.9,0.9},{-0.85,0.9}<br />
//    };<br />
}<br />
/* Program entry point */<br />
<br />
int main(int argc, char **argv)<br />
{<br />
    glutInit(&amp;argc, argv);<br />
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);<br />
    glutInitWindowSize(640,480);<br />
    glutInitWindowPosition(0,0);<br />
    glutInitContextVersion(4,0);<br />
    glutInitContextProfile(GLUT_CORE_PROFILE);<br />
    glutCreateWindow(&quot;scientific&quot;);<br />
<br />
<br />
    GLenum err = glewInit();<br />
    if (GLEW_OK != err)<br />
    {<br />
    /* Problem: glewInit failed, something is seriously wrong. */<br />
    cout &lt;&lt; glewGetErrorString(err);<br />
<br />
    }<br />
<br />
    init();<br />
<br />
    glutReshapeFunc(resize);<br />
    glutDisplayFunc(display);<br />
    glutKeyboardFunc(key);<br />
<br />
    glutIdleFunc(idle);<br />
<br />
    glutMainLoop();<br />
<br />
    return EXIT_SUCCESS;<br />
}<br />
<br />
Error:<br />
<br />
C:...\main.cpp|48|undefined reference to `__glewGenVertexArrays'|<br />
C:...\main.cpp|49|undefined reference to `__glewBindVertexArray'|<br />
<br />
<br />
<br />
please help</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>nice87day</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181559-Link-Error-glew</guid>
		</item>
		<item>
			<title>PIXELFORMATDESCTIPTOR problem</title>
			<link>http://www.opengl.org/discussion_boards/showthread.php/181535-PIXELFORMATDESCTIPTOR-problem?goto=newpost</link>
			<pubDate>Tue, 23 Apr 2013 17:13:22 GMT</pubDate>
			<description><![CDATA[Hi everyone, 
 
I'm relatively new to OpenGL programming. I successfully wrote an application with freeGLUT and GLEW displaying some triangles and...]]></description>
			<content:encoded><![CDATA[<div>Hi everyone,<br />
<br />
I'm relatively new to OpenGL programming. I successfully wrote an application with freeGLUT and GLEW displaying some triangles and some textures.<br />
Now I wanted to create an application without freeGLUT.<br />
The problem is that &quot;ChoosePixelFormat()&quot; always returns 0 instead of some matching number.<br />
Here is my PIXELFORMATDESCRIPTOR:<br />
<div class="bbcode_container">
                <div class="bbcode_description">Code :</div>
                <hr /><code class="bbcode_code"><div class="" style="font-family:monospace;"><pre style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">PIXELFORMATDESCRIPTOR pfd = {
		sizeof(PIXELFORMATDESCRIPTOR),
		1, 
		PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,
		PFD_TYPE_RGBA,
		32, 
		0, 0, 0, 0, 0, 0, 
		0, 
		0, 
		0, 
		0, 0, 0, 0, 
		24, 
		0, 
		0, 
		PFD_MAIN_PLANE, 
		0, 
		0, 0, 0
	};
&nbsp;
        int matchingPFD;
	matchingPFD = ChoosePixelFormat(hdc, &amp;pfd);</pre></div></code><hr />
</div><br />
I really have no idea what I am doing wrong here so I hope someone can help me out.<br />
For your information I'm using Windows 8 and Visual Studio 2010.<br />
<br />
Thanks and greetz<br />
sikkiv</div>

]]></content:encoded>
			<category domain="http://www.opengl.org/discussion_boards/forumdisplay.php/13-OpenGL-under-Windows">OpenGL under Windows</category>
			<dc:creator>sikkiv</dc:creator>
			<guid isPermaLink="true">http://www.opengl.org/discussion_boards/showthread.php/181535-PIXELFORMATDESCTIPTOR-problem</guid>
		</item>
	</channel>
</rss>
