Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

[C++]OpenGL brak niektórych funkcji(np: glGenBuffers, glCreateShader)

Ostatnio zmodyfikowano 2014-02-17 13:59
Autor Wiadomość
kurator125
Temat założony przez niniejszego użytkownika
[C++]OpenGL brak niektórych funkcji(np: glGenBuffers, glCreateShader)
» 2014-02-12 18:28:15
Cześć, postanowiłem się pouczyć openGL ale mam problem z brakującymi funkcjami.
przykładowe brakujące funkcje:
glGenBuffers, glCreateShader

wersja openGL: 4.3
system: windows 8.1
ide: Visual studio 2013

W żadnej bibliotece którą dołączałem nie były tych funkcji więc nie wiem czy to poradniki w internecie są stare czy co ?
jedyne metody którymi da rady coś wyświetlić to :
glBegin(..);
...
glEnd();

i
...
glVertexPointer(3, GL_FLOAT, 0, vertex);
glNormalPointer(GL_FLOAT, 0, normals);
glDrawArrays(GL_TRIANGLES, 0, size);
....

Wiec proszę o nakierowanie jak to jest w tym nowym openGL z VBO shaderami itp i jak się teraz w openGL rysuje obiekty bo to co w google znalazłem nie działa (brak tych funkcji).
a glDrawArrays podobno najszybsze nie jest.
P-104528
DejaVu
» 2014-02-17 13:59:09
Może powinieneś po prostu pobrać nową wersję plików nagłówkowych do obsługi OpenGL-a (w tym również lib-y)?

/edit:
a glDrawArrays podobno najszybsze nie jest.
Szybszym rozwiązaniem są display listy:
http://www.songho.ca/opengl​/gl_displaylist.html

Ważniejsze fragmenty czego googlać należy:
For convenience, OpenGL provides glListBase() to specify the offset that is added to the display list indices when glCallLists() is executed.

In the above example, only 5 display lists are rendered; 1st, 3rd, 5th, 7th and 9th of display lists. Therefore the offset from index value is index+0, index+2, index+4, index+6, and index+8. These offset values are stored in the index array to be rendered. If the index value is 3 returned by glGenLists(), then the actual display lists to be rendered by glCallLists() are, 3+0, 3+2, 3+4, 3+6 and 3+8.

glCallLists() is very useful to display texts with the offsets corresponding ASCII value in the font.

This application draws a teapot (6320 polygons) using display list. Originally, it uses vertex array, glDrawElements(), to render the teapot, but all glDrawElements() calls are placed in the display list. You can see the performance difference between using vertex array and using display list.

Remember that you cannot place any client state commands in the display list, therefore, glEnableClientState(), glVertexPointer() and glNormalPointer() should not be included in the display list.
P-104770
« 1 »
  Strona 1 z 1