ผมกำลังเรียน เกี่ยวกับ oepnGl และพบปัญหาในคำสั่ง
glDrawElements(GL_QUADS, 24, GL_UNSIGNED_BYTE, CubeData::cubeIndices);
มันขึ้นว่า An unhandled exception of type 'System.AccessViolationException' occurred in Cube.exe
แต่พอไป ลองบนเครื่องอื่น บางเครื่องก็เป็น บ้างก็ไม่เป็น เลยอยากจะหาถามวิธีแก้ ไหมครับ
โปรแกรม ครับผม
[code]
/* ------- SIMPLE ROTATING CUBE PROGRAM
Interpolated Color Cube created in the origin
Uses speed up from the glDrawElements
Left, Middle, Right Mouse will change the axis of the transformation
Try playing around with the translation, rotation, and scaling
Try changing the projection
-------------------------------------- */
#include <stdlib.h>
#include <GL/glut.h>
//namespace used to house cube specific variables
namespace CubeData
{